Resource Processor
core, contrib, k8s
Maintainers: @jinja2, @jkoronaAtCisco
Source: opentelemetry-collector-contrib
Supported Telemetry
Overview
[!NOTE] This component has been superseded by the transform processor. Migrate to using it instead.The resource processor can be used to apply changes on resource attributes. Please refer to config.go for the config spec.
attributes represents actions that can be applied on resource attributes.
See Attributes Processor for more details on supported attributes actions.
Supported Actions
INSERT: Inserts the key/value to attributes when the key does not existUPDATE: Updates an existing key with a valueUPSERT: Performs insert or update depending on whether the key existsDELETE: Deletes the attributeHASH: Computes the SHA-256 hash of an existing valueEXTRACT: Extracts values using a regular expression
Default Values
Thedefault_value field can be used to specify a fallback value when the primary value source (e.g., attribute, or context value) is not available. This is useful for:
- Providing sensible defaults when attributes don’t exist
- Ensuring the pipeline doesn’t fail due to missing configuration
Warnings
In general, the Resource processor is a very safe processor to use. Care only needs to be taken when modifying resource attributes of metrics:-
Identity Conflict: Resource attributes are part of a metric stream’s identity. Deleting or changing existing resource attributes (e.g., with the
delete,updateorupsertactions) has the potential to create an identity conflict, since the Resource processor does not perform any re-aggregation of the data points. Adding new resource attributes is safe. For example, two pods of the same service send the same counter. Their resources differ only byk8s.pod.name:Before the processor these are two separate streams. After it, both pods reporthttp.server.requestswith the same resource, so the backend merges them into one stream and receives1000, 50, 1010, 60, 1020, 70. Every drop (e.g.1000to50) looks like a counter reset, so rates and totals become wrong.
Configuration
Example Configuration
Last generated: 2026-11-09