Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(resource-detector-alibaba): add Semantic Conventions to alibaba README #2077

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,23 @@ const resource = await detectResources({
const tracerProvider = new NodeTracerProvider({ resource });
```

## Available detectors
## Available detectors & Semantic Conventions

This package uses `@opentelemetry/semantic-conventions` version `1.22+`, which implements Semantic Convention [Version 1.7.0](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/semantic_conventions/README.md)

### 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 Attribute | Description | Notes |
|-------------------------|-----------------------------------------------------------------| ------------------------------------------ |
| cloud.account.id | Value of `owner-account-id` on Alibaba Cloud | Key: `SEMRESATTRS_CLOUD_ACCOUNT_ID` |
| cloud.availability_zone | Value of `zone-id` on Alibaba Cloud | Key: `SEMRESATTRS_CLOUD_AVAILABILITY_ZONE` |
| cloud.platform | In this context, it's always `alibaba_cloud_ecs` | Key: `SEMRESATTRS_CLOUD_PLATFORM` |
| cloud.provider | In this context, it's always `alibaba_cloud` | Key: `SEMRESATTRS_CLOUD_PROVIDER` |
| cloud.region | Value of `region-id` on Alibaba Cloud | Key: `SEMRESATTRS_CLOUD_REGION` |
| host.id | Value of `instance-id` on Alibaba Cloud | Key: `SEMRESATTRS_HOST_ID` |
| host.name | The hostname for the app, retrieve from the `hostname` endpoint | Key: `SEMRESATTRS_HOST_TYPE` |
| host.type | Value of `instance-type` on Alibaba Cloud | Key: `SEMRESATTRS_HOST_NAME` |
Comment on lines +37 to +46
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on comments over on #1778 we may decide not to move forward with this Notes section as it is extra to maintain.


[resource-semantic_conventions]: https://github.com/open-telemetry/opentelemetry-specification/tree/master/specification/resource/semantic_conventions