# @opentelemetry/resource-detector-alibaba-cloud

> OpenTelemetry resource detector for Alibaba Cloud

Latest version **0.37.0** (published 2026-08-31) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @opentelemetry/resource-detector-alibaba-cloud
pnpm add @opentelemetry/resource-detector-alibaba-cloud
yarn add @opentelemetry/resource-detector-alibaba-cloud
bun add @opentelemetry/resource-detector-alibaba-cloud
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.37.0 |
| Published | 2026-08-31 |
| First published | 2021-09-13 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | ^18.19.0 \|\| >=20.6.0 |
| Dependencies | 2 |
| Unpacked size | 78.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 927 |
| Author | OpenTelemetry Authors |
| Maintainers | dyladan, pichlermarc, overbalance, npmjs-account, trentm, martinkuba |
| Keywords | opentelemetry, nodejs, resources, stats, alibaba-cloud, profiling |

## Links

- npm: https://www.npmjs.com/package/@opentelemetry/resource-detector-alibaba-cloud
- Repository: https://github.com/open-telemetry/opentelemetry-js-contrib
- Homepage: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/main/packages/resource-detector-alibaba-cloud#readme
- Issues: https://github.com/open-telemetry/opentelemetry-js-contrib/issues
- npm.io page: https://npm.io/package/@opentelemetry/resource-detector-alibaba-cloud

## Dependencies (2)

- [@opentelemetry/core](https://npm.io/package/@opentelemetry/core.md) ^2.0.0
- [@opentelemetry/resources](https://npm.io/package/@opentelemetry/resources.md) ^2.0.0

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 0.37.0 (latest) — 2026-08-31
- 0.36.0 — 2026-07-23
- 0.35.0 — 2026-07-03
- 0.34.0 — 2026-06-11
- 0.33.8 — 2026-05-13
- 0.33.7 — 2026-05-06
- 0.33.6 — 2026-04-29
- 0.33.5 — 2026-04-17
- 0.33.4 — 2026-03-26
- 0.33.3 — 2026-03-04
- 0.33.2 — 2026-02-17
- 0.33.1 — 2026-01-22
- 0.33.0 — 2026-01-15
- 0.32.0 — 2025-12-17
- 0.31.11 — 2025-11-06
- … 43 more at https://npm.io/package/@opentelemetry/resource-detector-alibaba-cloud/versions

## README

# 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][resource-semantic_conventions] defines standard attributes for resources.

Supports OpenTelemetry JS SDK 1.0

## Installation

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

## Usage

```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 });
```

## Available detectors

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 [in the Alibaba Cloud documentation](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

---
_Source: https://npm.io/package/@opentelemetry/resource-detector-alibaba-cloud · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
