You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@opentelemetry/resources

Package Overview
Dependencies
Maintainers
2
Versions
185
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
2.4.0
to
2.5.0
+7
-0
build/esm/default-service-name.d.ts

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

/**
* Returns the default service name for OpenTelemetry resources.
* In Node.js environments, returns "unknown_service:<process.argv0>".
* In browser/edge environments, returns "unknown_service".
*/
export declare function defaultServiceName(): string;
/** @internal For testing purposes only */
export declare function _clearDefaultServiceNameCache(): void;
//# sourceMappingURL=default-service-name.d.ts.map
+20
-8

@@ -16,12 +16,24 @@ /*

*/
// Check if we are in a Node.js environment and if so, use the process.argv0 property
// to determine the default service name
const DEFAULT_SERVICE_NAME = typeof process === 'object' &&
typeof process.argv0 === 'string' &&
process.argv0.length > 0
? `unknown_service:${process.argv0}`
: 'unknown_service';
let serviceName;
/**
* Returns the default service name for OpenTelemetry resources.
* In Node.js environments, returns "unknown_service:<process.argv0>".
* In browser/edge environments, returns "unknown_service".
*/
export function defaultServiceName() {
return DEFAULT_SERVICE_NAME;
if (serviceName === undefined) {
try {
const argv0 = globalThis.process.argv0;
serviceName = argv0 ? `unknown_service:${argv0}` : 'unknown_service';
}
catch {
serviceName = 'unknown_service';
}
}
return serviceName;
}
/** @internal For testing purposes only */
export function _clearDefaultServiceNameCache() {
serviceName = undefined;
}
//# sourceMappingURL=default-service-name.js.map

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

export declare const VERSION = "2.4.0";
export declare const VERSION = "2.5.0";
//# sourceMappingURL=version.d.ts.map

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

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

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

/**
* Returns the default service name for OpenTelemetry resources.
* In Node.js environments, returns "unknown_service:<process.argv0>".
* In browser/edge environments, returns "unknown_service".
*/
export declare function defaultServiceName(): string;
/** @internal For testing purposes only */
export declare function _clearDefaultServiceNameCache(): void;
//# sourceMappingURL=default-service-name.d.ts.map

@@ -16,12 +16,24 @@ /*

*/
// Check if we are in a Node.js environment and if so, use the process.argv0 property
// to determine the default service name
const DEFAULT_SERVICE_NAME = typeof process === 'object' &&
typeof process.argv0 === 'string' &&
process.argv0.length > 0
? `unknown_service:${process.argv0}`
: 'unknown_service';
let serviceName;
/**
* Returns the default service name for OpenTelemetry resources.
* In Node.js environments, returns "unknown_service:<process.argv0>".
* In browser/edge environments, returns "unknown_service".
*/
export function defaultServiceName() {
return DEFAULT_SERVICE_NAME;
if (serviceName === undefined) {
try {
const argv0 = globalThis.process.argv0;
serviceName = argv0 ? `unknown_service:${argv0}` : 'unknown_service';
}
catch {
serviceName = 'unknown_service';
}
}
return serviceName;
}
/** @internal For testing purposes only */
export function _clearDefaultServiceNameCache() {
serviceName = undefined;
}
//# sourceMappingURL=default-service-name.js.map

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

export declare const VERSION = "2.4.0";
export declare const VERSION = "2.5.0";
//# sourceMappingURL=version.d.ts.map

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

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

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

/**
* Returns the default service name for OpenTelemetry resources.
* In Node.js environments, returns "unknown_service:<process.argv0>".
* In browser/edge environments, returns "unknown_service".
*/
export declare function defaultServiceName(): string;
/** @internal For testing purposes only */
export declare function _clearDefaultServiceNameCache(): void;
//# sourceMappingURL=default-service-name.d.ts.map

@@ -18,14 +18,27 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.defaultServiceName = void 0;
// Check if we are in a Node.js environment and if so, use the process.argv0 property
// to determine the default service name
const DEFAULT_SERVICE_NAME = typeof process === 'object' &&
typeof process.argv0 === 'string' &&
process.argv0.length > 0
? `unknown_service:${process.argv0}`
: 'unknown_service';
exports._clearDefaultServiceNameCache = exports.defaultServiceName = void 0;
let serviceName;
/**
* Returns the default service name for OpenTelemetry resources.
* In Node.js environments, returns "unknown_service:<process.argv0>".
* In browser/edge environments, returns "unknown_service".
*/
function defaultServiceName() {
return DEFAULT_SERVICE_NAME;
if (serviceName === undefined) {
try {
const argv0 = globalThis.process.argv0;
serviceName = argv0 ? `unknown_service:${argv0}` : 'unknown_service';
}
catch {
serviceName = 'unknown_service';
}
}
return serviceName;
}
exports.defaultServiceName = defaultServiceName;
/** @internal For testing purposes only */
function _clearDefaultServiceNameCache() {
serviceName = undefined;
}
exports._clearDefaultServiceNameCache = _clearDefaultServiceNameCache;
//# sourceMappingURL=default-service-name.js.map

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

export declare const VERSION = "2.4.0";
export declare const VERSION = "2.5.0";
//# sourceMappingURL=version.d.ts.map

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

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

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

"@types/mocha": "10.0.10",
"@types/node": "18.6.5",
"@types/node": "18.19.130",
"@types/sinon": "17.0.4",

@@ -86,3 +86,3 @@ "@types/webpack-env": "1.16.3",

"dependencies": {
"@opentelemetry/core": "2.4.0",
"@opentelemetry/core": "2.5.0",
"@opentelemetry/semantic-conventions": "^1.29.0"

@@ -92,3 +92,3 @@ },

"sideEffects": false,
"gitHead": "5e6504d2a3a7ce3aaa211d9e2a5b002a0e4d7da1"
"gitHead": "38924cbff2a6e924ce8a2a227d3a72de52fbcd35"
}

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