Socket
Socket
Sign inDemoInstall

@opentelemetry/resources

Package Overview
Dependencies
Maintainers
3
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.24.1 to 1.25.0

10

build/esm/detectors/BrowserDetectorSync.js

@@ -27,3 +27,3 @@ /*

};
import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';
import { SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION, SEMRESATTRS_PROCESS_RUNTIME_NAME, SEMRESATTRS_PROCESS_RUNTIME_VERSION, } from '@opentelemetry/semantic-conventions';
import { diag } from '@opentelemetry/api';

@@ -49,5 +49,5 @@ import { Resource } from '../Resource';

var browserResource = (_a = {},
_a[SemanticResourceAttributes.PROCESS_RUNTIME_NAME] = 'browser',
_a[SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION] = 'Web Browser',
_a[SemanticResourceAttributes.PROCESS_RUNTIME_VERSION] = navigator.userAgent,
_a[SEMRESATTRS_PROCESS_RUNTIME_NAME] = 'browser',
_a[SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION] = 'Web Browser',
_a[SEMRESATTRS_PROCESS_RUNTIME_VERSION] = navigator.userAgent,
_a);

@@ -64,3 +64,3 @@ return this._getResourceAttributes(browserResource, config);

BrowserDetectorSync.prototype._getResourceAttributes = function (browserResource, _config) {
if (browserResource[SemanticResourceAttributes.PROCESS_RUNTIME_VERSION] === '') {
if (browserResource[SEMRESATTRS_PROCESS_RUNTIME_VERSION] === '') {
diag.debug('BrowserDetector failed: Unable to find required browser resources. ');

@@ -67,0 +67,0 @@ return Resource.empty();

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

*/
import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';
import { SEMRESATTRS_HOST_ARCH, SEMRESATTRS_HOST_ID, SEMRESATTRS_HOST_NAME, } from '@opentelemetry/semantic-conventions';
import { Resource } from '../../../Resource';

@@ -32,4 +32,4 @@ import { arch, hostname } from 'os';

var attributes = (_a = {},
_a[SemanticResourceAttributes.HOST_NAME] = hostname(),
_a[SemanticResourceAttributes.HOST_ARCH] = normalizeArch(arch()),
_a[SEMRESATTRS_HOST_NAME] = hostname(),
_a[SEMRESATTRS_HOST_ARCH] = normalizeArch(arch()),
_a);

@@ -42,3 +42,3 @@ return new Resource(attributes, this._getAsyncAttributes());

if (machineId) {
attributes[SemanticResourceAttributes.HOST_ID] = machineId;
attributes[SEMRESATTRS_HOST_ID] = machineId;
}

@@ -45,0 +45,0 @@ return attributes;

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

*/
import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';
import { SEMRESATTRS_OS_TYPE, SEMRESATTRS_OS_VERSION, } from '@opentelemetry/semantic-conventions';
import { Resource } from '../../../Resource';

@@ -31,4 +31,4 @@ import { platform, release } from 'os';

var attributes = (_a = {},
_a[SemanticResourceAttributes.OS_TYPE] = normalizeType(platform()),
_a[SemanticResourceAttributes.OS_VERSION] = release(),
_a[SEMRESATTRS_OS_TYPE] = normalizeType(platform()),
_a[SEMRESATTRS_OS_VERSION] = release(),
_a);

@@ -35,0 +35,0 @@ return new Resource(attributes);

@@ -42,3 +42,3 @@ /*

import { diag } from '@opentelemetry/api';
import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';
import { SEMRESATTRS_PROCESS_COMMAND, SEMRESATTRS_PROCESS_COMMAND_ARGS, SEMRESATTRS_PROCESS_EXECUTABLE_NAME, SEMRESATTRS_PROCESS_EXECUTABLE_PATH, SEMRESATTRS_PROCESS_OWNER, SEMRESATTRS_PROCESS_PID, SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION, SEMRESATTRS_PROCESS_RUNTIME_NAME, SEMRESATTRS_PROCESS_RUNTIME_VERSION, } from '@opentelemetry/semantic-conventions';
import { Resource } from '../../../Resource';

@@ -56,18 +56,18 @@ import * as os from 'os';

var attributes = (_a = {},
_a[SemanticResourceAttributes.PROCESS_PID] = process.pid,
_a[SemanticResourceAttributes.PROCESS_EXECUTABLE_NAME] = process.title,
_a[SemanticResourceAttributes.PROCESS_EXECUTABLE_PATH] = process.execPath,
_a[SemanticResourceAttributes.PROCESS_COMMAND_ARGS] = __spreadArray(__spreadArray([
_a[SEMRESATTRS_PROCESS_PID] = process.pid,
_a[SEMRESATTRS_PROCESS_EXECUTABLE_NAME] = process.title,
_a[SEMRESATTRS_PROCESS_EXECUTABLE_PATH] = process.execPath,
_a[SEMRESATTRS_PROCESS_COMMAND_ARGS] = __spreadArray(__spreadArray([
process.argv[0]
], __read(process.execArgv), false), __read(process.argv.slice(1)), false),
_a[SemanticResourceAttributes.PROCESS_RUNTIME_VERSION] = process.versions.node,
_a[SemanticResourceAttributes.PROCESS_RUNTIME_NAME] = 'nodejs',
_a[SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION] = 'Node.js',
_a[SEMRESATTRS_PROCESS_RUNTIME_VERSION] = process.versions.node,
_a[SEMRESATTRS_PROCESS_RUNTIME_NAME] = 'nodejs',
_a[SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION] = 'Node.js',
_a);
if (process.argv.length > 1) {
attributes[SemanticResourceAttributes.PROCESS_COMMAND] = process.argv[1];
attributes[SEMRESATTRS_PROCESS_COMMAND] = process.argv[1];
}
try {
var userInfo = os.userInfo();
attributes[SemanticResourceAttributes.PROCESS_OWNER] = userInfo.username;
attributes[SEMRESATTRS_PROCESS_OWNER] = userInfo.username;
}

@@ -74,0 +74,0 @@ catch (e) {

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

export declare const VERSION = "1.24.1";
export declare const VERSION = "1.25.0";
//# sourceMappingURL=version.d.ts.map

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

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

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

*/
import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';
import { SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION, SEMRESATTRS_PROCESS_RUNTIME_NAME, SEMRESATTRS_PROCESS_RUNTIME_VERSION, } from '@opentelemetry/semantic-conventions';
import { diag } from '@opentelemetry/api';

@@ -35,5 +35,5 @@ import { Resource } from '../Resource';

const browserResource = {
[SemanticResourceAttributes.PROCESS_RUNTIME_NAME]: 'browser',
[SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION]: 'Web Browser',
[SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]: navigator.userAgent,
[SEMRESATTRS_PROCESS_RUNTIME_NAME]: 'browser',
[SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION]: 'Web Browser',
[SEMRESATTRS_PROCESS_RUNTIME_VERSION]: navigator.userAgent,
};

@@ -50,3 +50,3 @@ return this._getResourceAttributes(browserResource, config);

_getResourceAttributes(browserResource, _config) {
if (browserResource[SemanticResourceAttributes.PROCESS_RUNTIME_VERSION] === '') {
if (browserResource[SEMRESATTRS_PROCESS_RUNTIME_VERSION] === '') {
diag.debug('BrowserDetector failed: Unable to find required browser resources. ');

@@ -53,0 +53,0 @@ return Resource.empty();

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

*/
import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';
import { SEMRESATTRS_HOST_ARCH, SEMRESATTRS_HOST_ID, SEMRESATTRS_HOST_NAME, } from '@opentelemetry/semantic-conventions';
import { Resource } from '../../../Resource';

@@ -29,4 +29,4 @@ import { arch, hostname } from 'os';

const attributes = {
[SemanticResourceAttributes.HOST_NAME]: hostname(),
[SemanticResourceAttributes.HOST_ARCH]: normalizeArch(arch()),
[SEMRESATTRS_HOST_NAME]: hostname(),
[SEMRESATTRS_HOST_ARCH]: normalizeArch(arch()),
};

@@ -39,3 +39,3 @@ return new Resource(attributes, this._getAsyncAttributes());

if (machineId) {
attributes[SemanticResourceAttributes.HOST_ID] = machineId;
attributes[SEMRESATTRS_HOST_ID] = machineId;
}

@@ -42,0 +42,0 @@ return attributes;

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

*/
import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';
import { SEMRESATTRS_OS_TYPE, SEMRESATTRS_OS_VERSION, } from '@opentelemetry/semantic-conventions';
import { Resource } from '../../../Resource';

@@ -28,4 +28,4 @@ import { platform, release } from 'os';

const attributes = {
[SemanticResourceAttributes.OS_TYPE]: normalizeType(platform()),
[SemanticResourceAttributes.OS_VERSION]: release(),
[SEMRESATTRS_OS_TYPE]: normalizeType(platform()),
[SEMRESATTRS_OS_VERSION]: release(),
};

@@ -32,0 +32,0 @@ return new Resource(attributes);

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

import { diag } from '@opentelemetry/api';
import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';
import { SEMRESATTRS_PROCESS_COMMAND, SEMRESATTRS_PROCESS_COMMAND_ARGS, SEMRESATTRS_PROCESS_EXECUTABLE_NAME, SEMRESATTRS_PROCESS_EXECUTABLE_PATH, SEMRESATTRS_PROCESS_OWNER, SEMRESATTRS_PROCESS_PID, SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION, SEMRESATTRS_PROCESS_RUNTIME_NAME, SEMRESATTRS_PROCESS_RUNTIME_VERSION, } from '@opentelemetry/semantic-conventions';
import { Resource } from '../../../Resource';

@@ -28,6 +28,6 @@ import * as os from 'os';

const attributes = {
[SemanticResourceAttributes.PROCESS_PID]: process.pid,
[SemanticResourceAttributes.PROCESS_EXECUTABLE_NAME]: process.title,
[SemanticResourceAttributes.PROCESS_EXECUTABLE_PATH]: process.execPath,
[SemanticResourceAttributes.PROCESS_COMMAND_ARGS]: [
[SEMRESATTRS_PROCESS_PID]: process.pid,
[SEMRESATTRS_PROCESS_EXECUTABLE_NAME]: process.title,
[SEMRESATTRS_PROCESS_EXECUTABLE_PATH]: process.execPath,
[SEMRESATTRS_PROCESS_COMMAND_ARGS]: [
process.argv[0],

@@ -37,12 +37,12 @@ ...process.execArgv,

],
[SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]: process.versions.node,
[SemanticResourceAttributes.PROCESS_RUNTIME_NAME]: 'nodejs',
[SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION]: 'Node.js',
[SEMRESATTRS_PROCESS_RUNTIME_VERSION]: process.versions.node,
[SEMRESATTRS_PROCESS_RUNTIME_NAME]: 'nodejs',
[SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION]: 'Node.js',
};
if (process.argv.length > 1) {
attributes[SemanticResourceAttributes.PROCESS_COMMAND] = process.argv[1];
attributes[SEMRESATTRS_PROCESS_COMMAND] = process.argv[1];
}
try {
const userInfo = os.userInfo();
attributes[SemanticResourceAttributes.PROCESS_OWNER] = userInfo.username;
attributes[SEMRESATTRS_PROCESS_OWNER] = userInfo.username;
}

@@ -49,0 +49,0 @@ catch (e) {

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

export declare const VERSION = "1.24.1";
export declare const VERSION = "1.25.0";
//# sourceMappingURL=version.d.ts.map

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

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

@@ -37,5 +37,5 @@ "use strict";

const browserResource = {
[semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]: 'browser',
[semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION]: 'Web Browser',
[semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]: navigator.userAgent,
[semantic_conventions_1.SEMRESATTRS_PROCESS_RUNTIME_NAME]: 'browser',
[semantic_conventions_1.SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION]: 'Web Browser',
[semantic_conventions_1.SEMRESATTRS_PROCESS_RUNTIME_VERSION]: navigator.userAgent,
};

@@ -52,3 +52,3 @@ return this._getResourceAttributes(browserResource, config);

_getResourceAttributes(browserResource, _config) {
if (browserResource[semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_VERSION] === '') {
if (browserResource[semantic_conventions_1.SEMRESATTRS_PROCESS_RUNTIME_VERSION] === '') {
api_1.diag.debug('BrowserDetector failed: Unable to find required browser resources. ');

@@ -55,0 +55,0 @@ return Resource_1.Resource.empty();

@@ -31,4 +31,4 @@ "use strict";

const attributes = {
[semantic_conventions_1.SemanticResourceAttributes.HOST_NAME]: (0, os_1.hostname)(),
[semantic_conventions_1.SemanticResourceAttributes.HOST_ARCH]: (0, utils_1.normalizeArch)((0, os_1.arch)()),
[semantic_conventions_1.SEMRESATTRS_HOST_NAME]: (0, os_1.hostname)(),
[semantic_conventions_1.SEMRESATTRS_HOST_ARCH]: (0, utils_1.normalizeArch)((0, os_1.arch)()),
};

@@ -41,3 +41,3 @@ return new Resource_1.Resource(attributes, this._getAsyncAttributes());

if (machineId) {
attributes[semantic_conventions_1.SemanticResourceAttributes.HOST_ID] = machineId;
attributes[semantic_conventions_1.SEMRESATTRS_HOST_ID] = machineId;
}

@@ -44,0 +44,0 @@ return attributes;

@@ -30,4 +30,4 @@ "use strict";

const attributes = {
[semantic_conventions_1.SemanticResourceAttributes.OS_TYPE]: (0, utils_1.normalizeType)((0, os_1.platform)()),
[semantic_conventions_1.SemanticResourceAttributes.OS_VERSION]: (0, os_1.release)(),
[semantic_conventions_1.SEMRESATTRS_OS_TYPE]: (0, utils_1.normalizeType)((0, os_1.platform)()),
[semantic_conventions_1.SEMRESATTRS_OS_VERSION]: (0, os_1.release)(),
};

@@ -34,0 +34,0 @@ return new Resource_1.Resource(attributes);

@@ -30,6 +30,6 @@ "use strict";

const attributes = {
[semantic_conventions_1.SemanticResourceAttributes.PROCESS_PID]: process.pid,
[semantic_conventions_1.SemanticResourceAttributes.PROCESS_EXECUTABLE_NAME]: process.title,
[semantic_conventions_1.SemanticResourceAttributes.PROCESS_EXECUTABLE_PATH]: process.execPath,
[semantic_conventions_1.SemanticResourceAttributes.PROCESS_COMMAND_ARGS]: [
[semantic_conventions_1.SEMRESATTRS_PROCESS_PID]: process.pid,
[semantic_conventions_1.SEMRESATTRS_PROCESS_EXECUTABLE_NAME]: process.title,
[semantic_conventions_1.SEMRESATTRS_PROCESS_EXECUTABLE_PATH]: process.execPath,
[semantic_conventions_1.SEMRESATTRS_PROCESS_COMMAND_ARGS]: [
process.argv[0],

@@ -39,12 +39,12 @@ ...process.execArgv,

],
[semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_VERSION]: process.versions.node,
[semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_NAME]: 'nodejs',
[semantic_conventions_1.SemanticResourceAttributes.PROCESS_RUNTIME_DESCRIPTION]: 'Node.js',
[semantic_conventions_1.SEMRESATTRS_PROCESS_RUNTIME_VERSION]: process.versions.node,
[semantic_conventions_1.SEMRESATTRS_PROCESS_RUNTIME_NAME]: 'nodejs',
[semantic_conventions_1.SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION]: 'Node.js',
};
if (process.argv.length > 1) {
attributes[semantic_conventions_1.SemanticResourceAttributes.PROCESS_COMMAND] = process.argv[1];
attributes[semantic_conventions_1.SEMRESATTRS_PROCESS_COMMAND] = process.argv[1];
}
try {
const userInfo = os.userInfo();
attributes[semantic_conventions_1.SemanticResourceAttributes.PROCESS_OWNER] = userInfo.username;
attributes[semantic_conventions_1.SEMRESATTRS_PROCESS_OWNER] = userInfo.username;
}

@@ -51,0 +51,0 @@ catch (e) {

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

export declare const VERSION = "1.24.1";
export declare const VERSION = "1.25.0";
//# sourceMappingURL=version.d.ts.map

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

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

@@ -36,3 +36,4 @@ "main": "build/src/index.js",

"prewatch": "npm run precompile",
"peer-api-check": "node ../../scripts/peer-api-check.js"
"peer-api-check": "node ../../scripts/peer-api-check.js",
"align-api-deps": "node ../../scripts/align-api-deps.js"
},

@@ -69,11 +70,11 @@ "keywords": [

"devDependencies": {
"@opentelemetry/api": ">=1.0.0 <1.9.0",
"@opentelemetry/api": ">=1.0.0 <1.10.0",
"@opentelemetry/resources_1.9.0": "npm:@opentelemetry/resources@1.9.0",
"@types/mocha": "10.0.6",
"@types/node": "18.6.5",
"@types/sinon": "10.0.20",
"@types/sinon": "17.0.3",
"@types/webpack-env": "1.16.3",
"codecov": "3.8.3",
"cross-var": "1.1.0",
"karma": "6.4.2",
"karma": "6.4.3",
"karma-chrome-launcher": "3.1.0",

@@ -84,3 +85,3 @@ "karma-coverage": "2.2.1",

"karma-spec-reporter": "0.0.36",
"karma-webpack": "4.0.2",
"karma-webpack": "5.0.1",
"lerna": "6.6.2",

@@ -98,11 +99,11 @@ "mocha": "10.2.0",

"peerDependencies": {
"@opentelemetry/api": ">=1.0.0 <1.9.0"
"@opentelemetry/api": ">=1.0.0 <1.10.0"
},
"dependencies": {
"@opentelemetry/core": "1.24.1",
"@opentelemetry/semantic-conventions": "1.24.1"
"@opentelemetry/core": "1.25.0",
"@opentelemetry/semantic-conventions": "1.25.0"
},
"homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-resources",
"sideEffects": false,
"gitHead": "41c2626fe0ed03e2e83bd79ee43c9bdf0ffd80d8"
"gitHead": "c4d3351b6b3f5593c8d7cbfec97b45cea9fe1511"
}

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

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