0.30.0 • Published 1 year ago
opentelemetry-resource-detector-git v0.30.0
OpenTelemetry Service Resource Detector for Node.js
This module provides automatic resource detector for Git Version Control System. This resource is not part of open telemetry semantic conventions specification for resources.
The detector is doing best effort to extract git info, including these cases:
- Git info from common CI environment variables.
- Docker environment where
.gitdb is present (copied to image or mounted into the container) butgitcli is not installed on the image. - Docker environment where
.gitdb is missing, but node_modules is copied to image from source environment where.gitdb was available
Installation
npm install --save opentelemetry-resource-detector-gitUsage
Synchronous SDK Initialization
import { detectSyncResources } from 'opentelemetry-resource-detector-sync-api';
import { gitSyncDetector } from 'opentelemetry-resource-detector-git';
const resource = detectSyncResources({
detectors: [gitSyncDetector, /* add other sync detectors here */],
});
const tracerProvider = new NodeTracerProvider({ resource });Asynchronous SDK Initialization
import { detectResources } from '@opentelemetry/resources';
import { gitDetector } from 'opentelemetry-resource-detector-git';
( async () => {
const resource = await detectResources({
detectors: [gitDetector, /* 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 |
|---|---|---|
vcs.system | string | If this repo is identified as git repo, this attribute will be set to constant value 'git' |
vcs.commit.id | string (full SHA-1 object name) | sha-1 of the current git HEAD. This value uniquely identifies the git commit of the codebase |
vcs.clone.id | string (v4 UUID) | Unique id for the clone of the git repo |
vcs.branch.name | string | name of the current active branch |
0.30.0
1 year ago
0.0.0-2024-05-16--12-47
1 year ago
0.29.0
2 years ago
0.0.0-2023-10-17--13-06
2 years ago
0.0.0-2023-07-26--14-48
2 years ago
0.28.0
3 years ago
0.27.1
3 years ago
0.27.0
3 years ago
0.0.0-2022-07-11--08-09
3 years ago
0.0.0-2022-04-13--14-32
4 years ago
0.0.0-2021-12-15--13-29
4 years ago
0.0.0-2021-12-26--12-31
4 years ago
0.0.0-2021-12-20--13-41
4 years ago
0.0.0-2021-12-15--13-05
4 years ago
0.0.0-2021-12-22--14-33
4 years ago
0.0.0-2021-12-15--16-17
4 years ago
0.0.0-2021-12-26--12-22
4 years ago
0.0.0-2021-12-15--12-47
4 years ago
0.0.0-2021-12-21--15-57
4 years ago
0.26.0
4 years ago
0.0.0-2021-10-20--09-32
4 years ago
0.25.0
4 years ago
0.0.0-2021-09-19--10-26
4 years ago
0.0.0-2021-08-01--12-54
4 years ago
0.24.0
4 years ago
0.23.1
4 years ago
0.23.0
4 years ago
0.22.1
4 years ago
0.22.0
4 years ago
0.21.1
4 years ago
0.0.0-2021-06-23--08-12
4 years ago
0.21.0
4 years ago
0.0.0-2021-06-23--07-47
4 years ago
0.0.0-2021-06-23--15-11
4 years ago
0.0.0-2021-06-17--13-11
4 years ago
0.5.0-rc.1
4 years ago
0.5.0-rc.0
4 years ago