0.28.9 • Published 13 days ago

@opentelemetry/resource-detector-alibaba-cloud v0.28.9

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
13 days ago

OpenTelemetry Resource Detector for Alibaba Cloud

Resource 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 defines standard attributes for resources.

Supports OpenTelemetry JS SDK 1.0

Installation

npm install --save @opentelemetry/resource-detector-alibaba-cloud

Usage

import { detectResources } from '@opentelemetry/resources';
import { alibabaCloudEcsDetector } from '@opentelemetry/resource-detector-alibaba-cloud'
const resource = await detectResources({
   detectors: [alibabaCloudEcsDetector],
})

const tracerProvider = new NodeTracerProvider({ resource });

Available detectors

Alibaba Cloud Ecs Detector

Populates cloud and host for processes running on Alibaba Cloud ECS. More info about Alibaba Instance Identities can be found here.

Resource AttributeDescription
cloud.account.idValue of owner-account-id on Alibaba Cloud
cloud.availability_zoneValue of zone-id on Alibaba Cloud
cloud.platformIn this context, it's always alibaba_cloud_ecs
cloud.providerIn this context, it's always alibaba_cloud
cloud.regionValue of region-id on Alibaba Cloud
host.idValue of instance-id on Alibaba Cloud
host.nameThe hostname for the app, retrieve from the hostname endpoint
host.typeValue of instance-type on Alibaba Cloud