opentelemetry-collector-contrib
opentelemetry-collector-contrib copied to clipboard
default value for header setter extension
Component(s)
extension/headerssetter
Is your feature request related to a problem? Please describe.
When using the header setter with from_context
configuration set, and the key is not set within context from receiver, the header is set to nil on the exporter.
Describe the solution you'd like
extensions:
headers_setter:
headers:
- action: upsert
key: X-TENANT
from_context: X-TENANT
default_value: my-tenant-1 # new proposed config field
Describe alternatives you've considered
Allow to specify a default value per header action in case X-TENANT
on the provided context is empty/nil
Additional context
No response