Socket
Socket
Sign inDemoInstall

@opentelemetry/resources

Package Overview
Dependencies
Maintainers
2
Versions
168
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opentelemetry/resources - npm Package Compare versions

Comparing version 1.10.0 to 1.10.1

2

build/esm/platform/node/machine-id/getMachineId-bsd.js

@@ -52,3 +52,3 @@ /*

};
import * as fs from 'fs/promises';
import { promises as fs } from 'fs';
import { execAsync } from './execAsync';

@@ -55,0 +55,0 @@ import { diag } from '@opentelemetry/api';

@@ -63,3 +63,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

*/
import * as fs from 'fs/promises';
import { promises as fs } from 'fs';
import { diag } from '@opentelemetry/api';

@@ -66,0 +66,0 @@ export function getMachineId() {

@@ -8,11 +8,6 @@ import { ResourceAttributes } from './types';

export declare class Resource implements IResource {
/**
* A dictionary of attributes with string keys and values that provide
* information about the entity as numbers, strings or booleans
* TODO: Consider to add check/validation on attributes.
*/
private _attributes;
static readonly EMPTY: Resource;
private _syncAttributes;
private _asyncAttributesPromise;
private _syncAttributes?;
private _asyncAttributesPromise?;
private _attributes?;
/**

@@ -24,3 +19,3 @@ * Check if async attributes have resolved. This is useful to avoid awaiting

*/
asyncAttributesPending: boolean;
asyncAttributesPending?: boolean;
/**

@@ -40,3 +35,3 @@ * Returns an empty Resource

*/
_attributes: ResourceAttributes, asyncAttributesPromise?: Promise<ResourceAttributes>);
attributes: ResourceAttributes, asyncAttributesPromise?: Promise<ResourceAttributes>);
get attributes(): ResourceAttributes;

@@ -48,3 +43,3 @@ /**

*/
waitForAsyncAttributes(): Promise<void>;
waitForAsyncAttributes?(): Promise<void>;
/**

@@ -51,0 +46,0 @@ * Returns a new, merged {@link Resource} by merging the current Resource

@@ -94,7 +94,8 @@ /*

*/
_attributes, asyncAttributesPromise) {
attributes, asyncAttributesPromise) {
var _this = this;
this._attributes = _attributes;
var _a;
this._attributes = attributes;
this.asyncAttributesPending = asyncAttributesPromise != null;
this._syncAttributes = _attributes;
this._syncAttributes = (_a = this._attributes) !== null && _a !== void 0 ? _a : {};
this._asyncAttributesPromise = asyncAttributesPromise === null || asyncAttributesPromise === void 0 ? void 0 : asyncAttributesPromise.then(function (asyncAttributes) {

@@ -130,6 +131,7 @@ _this._attributes = Object.assign({}, _this._attributes, asyncAttributes);

get: function () {
var _a;
if (this.asyncAttributesPending) {
diag.error('Accessing resource attributes before async attributes settled');
}
return this._attributes;
return (_a = this._attributes) !== null && _a !== void 0 ? _a : {};
},

@@ -136,0 +138,0 @@ enumerable: false,

@@ -1,2 +0,2 @@

export declare const VERSION = "1.10.0";
export declare const VERSION = "1.10.1";
//# sourceMappingURL=version.d.ts.map

@@ -17,3 +17,3 @@ /*

// this is autogenerated file, see scripts/version-update.js
export var VERSION = '1.10.0';
export var VERSION = '1.10.1';
//# sourceMappingURL=version.js.map

@@ -16,3 +16,3 @@ /*

*/
import * as fs from 'fs/promises';
import { promises as fs } from 'fs';
import { execAsync } from './execAsync';

@@ -19,0 +19,0 @@ import { diag } from '@opentelemetry/api';

@@ -16,3 +16,3 @@ /*

*/
import * as fs from 'fs/promises';
import { promises as fs } from 'fs';
import { diag } from '@opentelemetry/api';

@@ -19,0 +19,0 @@ export async function getMachineId() {

@@ -8,11 +8,6 @@ import { ResourceAttributes } from './types';

export declare class Resource implements IResource {
/**
* A dictionary of attributes with string keys and values that provide
* information about the entity as numbers, strings or booleans
* TODO: Consider to add check/validation on attributes.
*/
private _attributes;
static readonly EMPTY: Resource;
private _syncAttributes;
private _asyncAttributesPromise;
private _syncAttributes?;
private _asyncAttributesPromise?;
private _attributes?;
/**

@@ -24,3 +19,3 @@ * Check if async attributes have resolved. This is useful to avoid awaiting

*/
asyncAttributesPending: boolean;
asyncAttributesPending?: boolean;
/**

@@ -40,3 +35,3 @@ * Returns an empty Resource

*/
_attributes: ResourceAttributes, asyncAttributesPromise?: Promise<ResourceAttributes>);
attributes: ResourceAttributes, asyncAttributesPromise?: Promise<ResourceAttributes>);
get attributes(): ResourceAttributes;

@@ -48,3 +43,3 @@ /**

*/
waitForAsyncAttributes(): Promise<void>;
waitForAsyncAttributes?(): Promise<void>;
/**

@@ -51,0 +46,0 @@ * Returns a new, merged {@link Resource} by merging the current Resource

@@ -31,6 +31,7 @@ /*

*/
_attributes, asyncAttributesPromise) {
this._attributes = _attributes;
attributes, asyncAttributesPromise) {
var _a;
this._attributes = attributes;
this.asyncAttributesPending = asyncAttributesPromise != null;
this._syncAttributes = _attributes;
this._syncAttributes = (_a = this._attributes) !== null && _a !== void 0 ? _a : {};
this._asyncAttributesPromise = asyncAttributesPromise === null || asyncAttributesPromise === void 0 ? void 0 : asyncAttributesPromise.then(asyncAttributes => {

@@ -64,6 +65,7 @@ this._attributes = Object.assign({}, this._attributes, asyncAttributes);

get attributes() {
var _a;
if (this.asyncAttributesPending) {
diag.error('Accessing resource attributes before async attributes settled');
}
return this._attributes;
return (_a = this._attributes) !== null && _a !== void 0 ? _a : {};
}

@@ -70,0 +72,0 @@ /**

@@ -1,2 +0,2 @@

export declare const VERSION = "1.10.0";
export declare const VERSION = "1.10.1";
//# sourceMappingURL=version.d.ts.map

@@ -17,3 +17,3 @@ /*

// this is autogenerated file, see scripts/version-update.js
export const VERSION = '1.10.0';
export const VERSION = '1.10.1';
//# sourceMappingURL=version.js.map

@@ -19,3 +19,3 @@ "use strict";

exports.getMachineId = void 0;
const fs = require("fs/promises");
const fs_1 = require("fs");
const execAsync_1 = require("./execAsync");

@@ -25,3 +25,3 @@ const api_1 = require("@opentelemetry/api");

try {
const result = await fs.readFile('/etc/hostid', { encoding: 'utf8' });
const result = await fs_1.promises.readFile('/etc/hostid', { encoding: 'utf8' });
return result.trim();

@@ -28,0 +28,0 @@ }

@@ -19,3 +19,3 @@ "use strict";

*/
const fs = require("fs/promises");
const fs_1 = require("fs");
const api_1 = require("@opentelemetry/api");

@@ -26,3 +26,3 @@ async function getMachineId() {

try {
const result = await fs.readFile(path, { encoding: 'utf8' });
const result = await fs_1.promises.readFile(path, { encoding: 'utf8' });
return result.trim();

@@ -29,0 +29,0 @@ }

@@ -8,11 +8,6 @@ import { ResourceAttributes } from './types';

export declare class Resource implements IResource {
/**
* A dictionary of attributes with string keys and values that provide
* information about the entity as numbers, strings or booleans
* TODO: Consider to add check/validation on attributes.
*/
private _attributes;
static readonly EMPTY: Resource;
private _syncAttributes;
private _asyncAttributesPromise;
private _syncAttributes?;
private _asyncAttributesPromise?;
private _attributes?;
/**

@@ -24,3 +19,3 @@ * Check if async attributes have resolved. This is useful to avoid awaiting

*/
asyncAttributesPending: boolean;
asyncAttributesPending?: boolean;
/**

@@ -40,3 +35,3 @@ * Returns an empty Resource

*/
_attributes: ResourceAttributes, asyncAttributesPromise?: Promise<ResourceAttributes>);
attributes: ResourceAttributes, asyncAttributesPromise?: Promise<ResourceAttributes>);
get attributes(): ResourceAttributes;

@@ -48,3 +43,3 @@ /**

*/
waitForAsyncAttributes(): Promise<void>;
waitForAsyncAttributes?(): Promise<void>;
/**

@@ -51,0 +46,0 @@ * Returns a new, merged {@link Resource} by merging the current Resource

@@ -34,6 +34,7 @@ "use strict";

*/
_attributes, asyncAttributesPromise) {
this._attributes = _attributes;
attributes, asyncAttributesPromise) {
var _a;
this._attributes = attributes;
this.asyncAttributesPending = asyncAttributesPromise != null;
this._syncAttributes = _attributes;
this._syncAttributes = (_a = this._attributes) !== null && _a !== void 0 ? _a : {};
this._asyncAttributesPromise = asyncAttributesPromise === null || asyncAttributesPromise === void 0 ? void 0 : asyncAttributesPromise.then(asyncAttributes => {

@@ -67,6 +68,7 @@ this._attributes = Object.assign({}, this._attributes, asyncAttributes);

get attributes() {
var _a;
if (this.asyncAttributesPending) {
api_1.diag.error('Accessing resource attributes before async attributes settled');
}
return this._attributes;
return (_a = this._attributes) !== null && _a !== void 0 ? _a : {};
}

@@ -73,0 +75,0 @@ /**

@@ -1,2 +0,2 @@

export declare const VERSION = "1.10.0";
export declare const VERSION = "1.10.1";
//# sourceMappingURL=version.d.ts.map

@@ -20,3 +20,3 @@ "use strict";

// this is autogenerated file, see scripts/version-update.js
exports.VERSION = '1.10.0';
exports.VERSION = '1.10.1';
//# sourceMappingURL=version.js.map
{
"name": "@opentelemetry/resources",
"version": "1.10.0",
"version": "1.10.1",
"description": "OpenTelemetry SDK resources",

@@ -93,8 +93,8 @@ "main": "build/src/index.js",

"dependencies": {
"@opentelemetry/core": "1.10.0",
"@opentelemetry/semantic-conventions": "1.10.0"
"@opentelemetry/core": "1.10.1",
"@opentelemetry/semantic-conventions": "1.10.1"
},
"homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-resources",
"sideEffects": false,
"gitHead": "56e6b1bb890f844b8963a146780d0b9cfa8abd0d"
"gitHead": "486df99906958de9b8b666839785b00160a6a229"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc