Skip to content

Latest commit

 

History

History

README.md

Resource semantic conventions

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

  • 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).

Document conventions

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.

Attributes with special handling

Status: Stable

Given their significance some resource attributes are treated specifically as described below.

Semantic attributes with dedicated environment variable

These are the attributes which MAY be configurable via a dedicated environment variable as specified in OpenTelemetry Environment Variable Specification:

Semantic attributes with SDK-provided default value

These are the attributes which MUST be provided by the SDK as specified in the Resource SDK specification:

Service

Logical grouping of components.

Telemetry SDK

Status: Stable

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 Stable Required string The language of the telemetry SDK. cpp; dotnet; erlang
Identity telemetry.sdk.name Stable Required string The name of the telemetry SDK as defined above. [1] opentelemetry
Description telemetry.sdk.version Stable 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 Stable
dotnet dotnet Stable
erlang erlang Stable
go go Stable
java java Stable
nodejs nodejs Stable
php php Stable
python python Stable
ruby ruby Stable
rust rust Stable
swift swift Stable
webjs webjs Stable

Telemetry distro

Status: Development

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 Development Recommended string The name of the auto instrumentation agent or distribution, if used. [1] parts-unlimited-java
Other telemetry.distro.version Development 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.

Compute unit

Status: Development

Attributes defining a compute unit (e.g. Container, Process, Function as a Service):

Compute instance

Status: Development

Attributes defining a computing instance (e.g. host):

Environment

Status: Development

Attributes defining a running environment (e.g. Operating System, Cloud, Data Center, Deployment Service):

Version attributes

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.

Cloud-Provider-specific attributes

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: