Socket
Socket
Sign inDemoInstall

@opentelemetry/resources

Package Overview
Dependencies
Maintainers
4
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 0.19.1-alpha.12 to 0.19.1-alpha.19

1

build/esm/index.d.ts
export * from './Resource';
export * from './platform';
export * from './constants';
export * from './types';
export * from './config';
//# sourceMappingURL=index.d.ts.map

@@ -18,5 +18,4 @@ /*

export * from './platform';
export * from './constants';
export * from './types';
export * from './config';
//# sourceMappingURL=index.js.map

21

build/esm/platform/node/detectors/ProcessDetector.js

@@ -64,3 +64,4 @@ /*

import { diag } from '@opentelemetry/api';
import { Resource, PROCESS_RESOURCE, } from '../../../';
import { ResourceAttributes as SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';
import { Resource } from '../../../';
/**

@@ -79,6 +80,6 @@ * ProcessDetector will be used to detect the resources related current process running

processResource = (_a = {},
_a[PROCESS_RESOURCE.PID] = process.pid,
_a[PROCESS_RESOURCE.NAME] = process.title || '',
_a[PROCESS_RESOURCE.COMMAND] = process.argv[1] || '',
_a[PROCESS_RESOURCE.COMMAND_LINE] = process.argv.join(' ') || '',
_a[SemanticResourceAttributes.PROCESS_PID] = process.pid,
_a[SemanticResourceAttributes.PROCESS_EXECUTABLE_NAME] = process.title || '',
_a[SemanticResourceAttributes.PROCESS_COMMAND] = process.argv[1] || '',
_a[SemanticResourceAttributes.PROCESS_COMMAND_LINE] = process.argv.join(' ') || '',
_a);

@@ -97,6 +98,8 @@ return [2 /*return*/, this._getResourceAttributes(processResource, config)];

ProcessDetector.prototype._getResourceAttributes = function (processResource, _config) {
if (processResource[PROCESS_RESOURCE.NAME] === '' ||
processResource[PROCESS_RESOURCE.PATH] === '' ||
processResource[PROCESS_RESOURCE.COMMAND] === '' ||
processResource[PROCESS_RESOURCE.COMMAND_LINE] === '') {
if (processResource[SemanticResourceAttributes.PROCESS_EXECUTABLE_NAME] ===
'' ||
processResource[SemanticResourceAttributes.PROCESS_EXECUTABLE_PATH] ===
'' ||
processResource[SemanticResourceAttributes.PROCESS_COMMAND] === '' ||
processResource[SemanticResourceAttributes.PROCESS_COMMAND_LINE] === '') {
diag.debug('ProcessDetector failed: Unable to find required process resources. ');

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

@@ -16,4 +16,4 @@ /*

*/
import { ResourceAttributes as SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';
import { SDK_INFO } from '@opentelemetry/core';
import { TELEMETRY_SDK_RESOURCE } from './constants';
/**

@@ -45,5 +45,5 @@ * A Resource describes the entity for which a signals (metrics or trace) are

return new Resource((_a = {},
_a[TELEMETRY_SDK_RESOURCE.LANGUAGE] = SDK_INFO.LANGUAGE,
_a[TELEMETRY_SDK_RESOURCE.NAME] = SDK_INFO.NAME,
_a[TELEMETRY_SDK_RESOURCE.VERSION] = SDK_INFO.VERSION,
_a[SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE] = SDK_INFO[SemanticResourceAttributes.TELEMETRY_SDK_LANGUAGE],
_a[SemanticResourceAttributes.TELEMETRY_SDK_NAME] = SDK_INFO[SemanticResourceAttributes.TELEMETRY_SDK_NAME],
_a[SemanticResourceAttributes.TELEMETRY_SDK_VERSION] = SDK_INFO[SemanticResourceAttributes.TELEMETRY_SDK_VERSION],
_a));

@@ -50,0 +50,0 @@ };

export * from './Resource';
export * from './platform';
export * from './constants';
export * from './types';
export * from './config';
//# sourceMappingURL=index.d.ts.map

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

__exportStar(require("./platform"), exports);
__exportStar(require("./constants"), exports);
__exportStar(require("./types"), exports);
__exportStar(require("./config"), exports);
//# sourceMappingURL=index.js.map

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

const api_1 = require("@opentelemetry/api");
const semantic_conventions_1 = require("@opentelemetry/semantic-conventions");
const __1 = require("../../../");

@@ -29,6 +30,6 @@ /**

const processResource = {
[__1.PROCESS_RESOURCE.PID]: process.pid,
[__1.PROCESS_RESOURCE.NAME]: process.title || '',
[__1.PROCESS_RESOURCE.COMMAND]: process.argv[1] || '',
[__1.PROCESS_RESOURCE.COMMAND_LINE]: process.argv.join(' ') || '',
[semantic_conventions_1.ResourceAttributes.PROCESS_PID]: process.pid,
[semantic_conventions_1.ResourceAttributes.PROCESS_EXECUTABLE_NAME]: process.title || '',
[semantic_conventions_1.ResourceAttributes.PROCESS_COMMAND]: process.argv[1] || '',
[semantic_conventions_1.ResourceAttributes.PROCESS_COMMAND_LINE]: process.argv.join(' ') || '',
};

@@ -45,6 +46,8 @@ return this._getResourceAttributes(processResource, config);

_getResourceAttributes(processResource, _config) {
if (processResource[__1.PROCESS_RESOURCE.NAME] === '' ||
processResource[__1.PROCESS_RESOURCE.PATH] === '' ||
processResource[__1.PROCESS_RESOURCE.COMMAND] === '' ||
processResource[__1.PROCESS_RESOURCE.COMMAND_LINE] === '') {
if (processResource[semantic_conventions_1.ResourceAttributes.PROCESS_EXECUTABLE_NAME] ===
'' ||
processResource[semantic_conventions_1.ResourceAttributes.PROCESS_EXECUTABLE_PATH] ===
'' ||
processResource[semantic_conventions_1.ResourceAttributes.PROCESS_COMMAND] === '' ||
processResource[semantic_conventions_1.ResourceAttributes.PROCESS_COMMAND_LINE] === '') {
api_1.diag.debug('ProcessDetector failed: Unable to find required process resources. ');

@@ -51,0 +54,0 @@ return __1.Resource.empty();

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

exports.Resource = void 0;
const semantic_conventions_1 = require("@opentelemetry/semantic-conventions");
const core_1 = require("@opentelemetry/core");
const constants_1 = require("./constants");
/**

@@ -47,5 +47,5 @@ * A Resource describes the entity for which a signals (metrics or trace) are

return new Resource({
[constants_1.TELEMETRY_SDK_RESOURCE.LANGUAGE]: core_1.SDK_INFO.LANGUAGE,
[constants_1.TELEMETRY_SDK_RESOURCE.NAME]: core_1.SDK_INFO.NAME,
[constants_1.TELEMETRY_SDK_RESOURCE.VERSION]: core_1.SDK_INFO.VERSION,
[semantic_conventions_1.ResourceAttributes.TELEMETRY_SDK_LANGUAGE]: core_1.SDK_INFO[semantic_conventions_1.ResourceAttributes.TELEMETRY_SDK_LANGUAGE],
[semantic_conventions_1.ResourceAttributes.TELEMETRY_SDK_NAME]: core_1.SDK_INFO[semantic_conventions_1.ResourceAttributes.TELEMETRY_SDK_NAME],
[semantic_conventions_1.ResourceAttributes.TELEMETRY_SDK_VERSION]: core_1.SDK_INFO[semantic_conventions_1.ResourceAttributes.TELEMETRY_SDK_VERSION],
});

@@ -52,0 +52,0 @@ }

{
"name": "@opentelemetry/resources",
"version": "0.19.1-alpha.12+25c205aa",
"version": "0.19.1-alpha.19+9ce9eea7",
"description": "OpenTelemetry SDK resources",

@@ -70,5 +70,6 @@ "main": "build/src/index.js",

"dependencies": {
"@opentelemetry/core": "^0.19.1-alpha.12+25c205aa"
"@opentelemetry/core": "^0.19.1-alpha.19+9ce9eea7",
"@opentelemetry/semantic-conventions": "^0.19.0"
},
"gitHead": "25c205aaffb6707d4275be6bade3e078e50e2df3"
"gitHead": "9ce9eea7cad32cbc57bd80830f21e4f366ecf929"
}

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