Status: Mixed
This document defines standard attributes for resources. These attributes are typically used in the Resource and are also recommended to be used anywhere else where there is a need to describe a resource in a consistent manner. The majority of these attributes are inherited from OpenCensus Resource standard.
- TODOs
- Document conventions
- Attributes with special handling
- Service
- Telemetry SDK
- Telemetry distro
- Compute unit
- Compute instance
- Environment
- Version attributes
- Cloud-Provider-specific attributes
- Add more compute units: AppEngine unit, etc.
- Add Web Browser.
- Decide if lower case strings only.
- Consider to add optional/required for each attribute and combination of attributes (e.g when supplying a k8s resource all k8s may be required).
Status: Stable
Attributes are grouped logically by the type of the concept that they described. Attributes in the same group have a common prefix that ends with a dot. For example all attributes that describe Kubernetes properties start with "k8s."
See Attribute Requirement Levels for details on when attributes should be included.
Status: Stable
Given their significance some resource attributes are treated specifically as described below.
These are the attributes which MAY be configurable via a dedicated environment variable as specified in OpenTelemetry Environment Variable Specification:
These are the attributes which MUST be provided by the SDK as specified in the Resource SDK specification:
Logical grouping of components.
type: telemetry.sdk
Description: The telemetry SDK used to capture data recorded by the instrumentation libraries.
Attributes:
| Role | Key | Stability | Requirement Level | Value Type | Description | Example Values |
|---|---|---|---|---|---|---|
| Identity | telemetry.sdk.language |
Required |
string | The language of the telemetry SDK. | cpp; dotnet; erlang |
|
| Identity | telemetry.sdk.name |
Required |
string | The name of the telemetry SDK as defined above. [1] | opentelemetry |
|
| Description | telemetry.sdk.version |
Required |
string | The version string of the telemetry SDK. | 1.2.3 |
[1] telemetry.sdk.name: The OpenTelemetry SDK MUST set the telemetry.sdk.name attribute to opentelemetry.
If another SDK, like a fork or a vendor-provided implementation, is used, this SDK MUST set the
telemetry.sdk.name attribute to the fully-qualified class or module name of this SDK's main entry point
or another suitable identifier depending on the language.
The identifier opentelemetry is reserved and MUST NOT be used in this case.
All custom identifiers SHOULD be stable across different versions of an implementation.
telemetry.sdk.language has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.
| Value | Description | Stability |
|---|---|---|
cpp |
cpp | |
dotnet |
dotnet | |
erlang |
erlang | |
go |
go | |
java |
java | |
nodejs |
nodejs | |
php |
php | |
python |
python | |
ruby |
ruby | |
rust |
rust | |
swift |
swift | |
webjs |
webjs |
type: telemetry.distro
Description: The distribution of telemetry SDK used to capture data recorded by the instrumentation libraries.
Warning
This entity definition contains attributes without a role. Stable Entities MUST NOT have attributes without a defined role.
Attributes:
| Role | Key | Stability | Requirement Level | Value Type | Description | Example Values |
|---|---|---|---|---|---|---|
| Other | telemetry.distro.name |
Recommended |
string | The name of the auto instrumentation agent or distribution, if used. [1] | parts-unlimited-java |
|
| Other | telemetry.distro.version |
Recommended |
string | The version string of the auto instrumentation agent or distribution, if used. | 1.2.3 |
[1] telemetry.distro.name: Official auto instrumentation agents and distributions SHOULD set the telemetry.distro.name attribute to
a string starting with opentelemetry-, e.g. opentelemetry-java-instrumentation.
Status: Development
Attributes defining a compute unit (e.g. Container, Process, Function as a Service):
Status: Development
Attributes defining a computing instance (e.g. host):
Status: Development
Attributes defining a running environment (e.g. Operating System, Cloud, Data Center, Deployment Service):
- Operating System
- Device
- Cloud
- CICD
- Deployment:
- Browser
Status: Stable
Version attributes, such as service.version, are values of type string. They are
the exact version used to identify an artifact. This may be a semantic version, e.g., 1.2.3, git hash, e.g.,
8ae73a, or an arbitrary version string, e.g., 0.1.2.20210101, whatever was used when building the artifact.
Status: Development
Attributes that are only applicable to resources from a specific cloud provider. Currently, these
resources can only be defined for providers listed as a valid cloud.provider in
Cloud and below. Provider-specific attributes all reside in the cloud-provider directory.
Valid cloud providers are:
- Alibaba Cloud (
alibaba_cloud) - Amazon Web Services (
aws) - Google Cloud Platform (
gcp) - Microsoft Azure (
azure) - Tencent Cloud (
tencent_cloud) - Heroku dyno