A resource attribute is a key/value pair containing information about the entity producing telemetry.
Resource attributes are mapped to Elastic Common Schema (ECS) fields like
These fields describe the service and the environment that the service runs in.
The examples shown here set the Elastic (ECS)
service.environment field for the resource, i.e. service, that is producing trace events.
Note that Elastic maps the OpenTelemetry
deployment.environment field to
service.environment field on ingestion.
OTEL_RESOURCE_ATTRIBUTES environment variable to pass resource attributes at process invocation.
Use the resource processor to set or apply changes to resource attributes.
- key: deployment.environment
Need to add event attributes instead? Use attributes—not to be confused with resource attributes—to add data to span, log, or metric events. Attributes can be added as a part of the OpenTelemetry instrumentation process or with the attributes processor.
On this page