@opentelemetry/resources
Advanced tools
@@ -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 |
@@ -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 |
+4
-4
| { | ||
| "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
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
544286
0.57%5991
0.98%+ Added
- Removed
Updated