0.29.0 • Published 7 months ago
opentelemetry-resource-detector-service v0.29.0
OpenTelemetry Service Resource Detector for Node.js
This module provides automatic resource detector for Service
Installation
npm install --save opentelemetry-resource-detector-service
Usage
Synchronous SDK Initialization
import { detectSyncResources } from 'opentelemetry-resource-detector-sync-api';
import { serviceSyncDetector } from 'opentelemetry-resource-detector-service';
const resource = detectSyncResources({
detectors: [serviceSyncDetector, /* add other sync detectors here */],
});
const tracerProvider = new NodeTracerProvider({ resource });
Asynchronous SDK Initialization
import { detectResources } from '@opentelemetry/resources';
import { serviceDetector } from 'opentelemetry-resource-detector-service';
( async () => {
const resource = await detectResources({
detectors: [serviceDetector, /* add other async detectors here */],
});
const tracerProvider = new NodeTracerProvider({ resource });
// Initialize auto instrumentation plugins and register provider.
// Make sure you don't 'require' instrumented packages elsewhere
// before they are registered here
})();
Attributes
Attribute | Type | Source |
---|---|---|
service.name | string | process.env.OTEL_SERVICE_NAME . If not set, will try to read name attribute from package.json. If not set will fallback to unknown_service: concatenated with process.executable.name (according to specification) |
serivce.version | string | version attribute from package.json |
service.instance.id | string (v4 UUID) | Automatically generated by the detector for each invocation of the service |
0.29.0
7 months ago
0.0.0-2023-10-17--13-06
7 months ago
0.0.0-2023-07-26--14-48
9 months ago
0.28.0
2 years ago
0.27.1
2 years ago
0.27.0
2 years ago
0.0.0-2022-07-11--08-09
2 years ago
0.0.0-2022-04-13--14-32
2 years ago
0.0.0-2021-12-15--13-29
2 years ago
0.0.0-2021-12-26--12-31
2 years ago
0.0.0-2021-12-20--13-41
2 years ago
0.0.0-2021-12-15--13-05
2 years ago
0.0.0-2021-12-22--14-33
2 years ago
0.0.0-2021-12-15--16-17
2 years ago
0.0.0-2021-12-26--12-22
2 years ago
0.0.0-2021-12-15--12-47
2 years ago
0.0.0-2021-12-21--15-57
2 years ago
0.26.0
3 years ago
0.0.0-2021-10-20--09-32
3 years ago
0.25.0
3 years ago
0.0.0-2021-09-19--10-26
3 years ago
0.0.0-2021-08-01--12-54
3 years ago
0.24.0
3 years ago
0.23.0
3 years ago
0.22.1
3 years ago
0.22.0
3 years ago
0.0.0-2021-06-23--08-12
3 years ago
0.0.0-2021-06-23--07-47
3 years ago
0.0.0-2021-06-23--15-11
3 years ago
0.21.0
3 years ago
0.5.0
3 years ago
0.4.1
3 years ago
0.0.0-2021-06-17--13-11
3 years ago
0.0.0-2021-06-14--13-06
3 years ago