Skip to main content

Resource Processor

Status Available in: core, contrib, k8s Maintainers: @dmitryax Source: opentelemetry-collector-contrib

Supported Telemetry

Logs Metrics Traces

Overview

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 exist
  • UPDATE: Updates an existing key with a value
  • UPSERT: Performs insert or update depending on whether the key exists
  • DELETE: Deletes the attribute
  • HASH: Computes the SHA-256 hash of an existing value
  • EXTRACT: Extracts values using a regular expression

Default Values

The default_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
Examples:
Refer to config.yaml for detailed examples on using the processor.

Configuration

Example Configuration


Last generated: 2026-08-24