OpenTelemetry resource detector for Alibaba Cloud
npm install @opentelemetry/resource-detector-alibaba-cloudResource detector for Alibaba Cloud.
The OpenTelemetry Resource is an immutable representation of the entity producing telemetry. For example, a process producing telemetry that is running in a container on Kubernetes has a Pod name, it is in a namespace and possibly is part of a Deployment which also has a name. All three of these attributes can be included in the Resource.
[This document][resource-semantic_conventions] defines standard attributes for resources.
Supports OpenTelemetry JS SDK 1.0
``bash`
npm install --save @opentelemetry/resource-detector-alibaba-cloud
`typescript
import { detectResources } from '@opentelemetry/resources';
import { alibabaCloudEcsDetector } from '@opentelemetry/resource-detector-alibaba-cloud'
const resource = await detectResources({
detectors: [alibabaCloudEcsDetector],
})
const tracerProvider = new NodeTracerProvider({ resource });
`
This package uses @opentelemetry/semantic-conventions version 1.22+, which implements Semantic Convention Version 1.7.0
Populates cloud and host for processes running on Alibaba Cloud ECS. More info about Alibaba Instance Identities can be found in the Alibaba Cloud documentation.
| Resource Attribute | Description |
|-------------------------|-----------------------------------------------------------------|
| cloud.account.id | Value of owner-account-id on Alibaba Cloud |zone-id
| cloud.availability_zone | Value of on Alibaba Cloud |alibaba_cloud_ecs
| cloud.platform | In this context, it's always |alibaba_cloud
| cloud.provider | In this context, it's always |region-id
| cloud.region | Value of on Alibaba Cloud |instance-id
| host.id | Value of on Alibaba Cloud |hostname
| host.name | The hostname for the app, retrieve from the endpoint |instance-type` on Alibaba Cloud |
| host.type | Value of
[resource-semantic_conventions]: https://github.com/open-telemetry/opentelemetry-specification/tree/master/specification/resource/semantic_conventions