Skip to content

Commit

Permalink
Merge branch 'main' into fix_mongoose_model_method_session_instrument…
Browse files Browse the repository at this point in the history
…ation
  • Loading branch information
ferrelucas committed Mar 31, 2024
2 parents adde5d2 + b2bcbed commit 1381823
Show file tree
Hide file tree
Showing 6 changed files with 283 additions and 515 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,19 @@ const tracerProvider = new NodeTracerProvider({ resource });

## Available detectors

- `alibabaCloudEcsDetector`: Populates `cloud` and `host` for processes running on [Alibaba Cloud ECS](https://www.alibabacloud.com/product/ecs).
### Alibaba Cloud Ecs Detector

Populates `cloud` and `host` for processes running on [Alibaba Cloud ECS](https://www.alibabacloud.com/product/ecs). More info about Alibaba Instance Identities can be found [here](https://www.alibabacloud.com/help/en/ecs/user-guide/use-instance-identities).

| Resource Attribute | Description |
|-------------------------|-----------------------------------------------------------------|
| cloud.account.id | Value of `owner-account-id` on Alibaba Cloud |
| cloud.availability_zone | Value of `zone-id` on Alibaba Cloud |
| cloud.platform | In this context, it's always `alibaba_cloud_ecs` |
| cloud.provider | In this context, it's always `alibaba_cloud` |
| cloud.region | Value of `region-id` on Alibaba Cloud |
| host.id | Value of `instance-id` on Alibaba Cloud |
| host.name | The hostname for the app, retrieve from the `hostname` endpoint |
| host.type | Value of `instance-type` on Alibaba Cloud |

[resource-semantic_conventions]: https://github.com/open-telemetry/opentelemetry-specification/tree/master/specification/resource/semantic_conventions
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
},
"dependencies": {
"@opentelemetry/resources": "^1.0.0",
"@opentelemetry/semantic-conventions": "^1.0.0"
"@opentelemetry/semantic-conventions": "^1.22.0"
},
"homepage": "https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/detectors/node/opentelemetry-resource-detector-container#readme"
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
ResourceDetectionConfig,
} from '@opentelemetry/resources';

import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';
import { SEMRESATTRS_CONTAINER_ID } from '@opentelemetry/semantic-conventions';

import * as fs from 'fs';
import * as util from 'util';
Expand All @@ -40,7 +40,7 @@ export class ContainerDetector implements Detector {
return !containerId
? Resource.empty()
: new Resource({
[SemanticResourceAttributes.CONTAINER_ID]: containerId,
[SEMRESATTRS_CONTAINER_ID]: containerId,
});
} catch (e) {
diag.info(
Expand Down
12 changes: 6 additions & 6 deletions examples/fastify/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1381823

Please sign in to comment.