Skip to content

opentelemetry source: http headers work only for logs with use_otlp_decoding set to false #24306

@ozanichkovsky

Description

@ozanichkovsky

A note for the community

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Problem

Incorrect Handling of headers in opentelemetry Source for Metrics, Traces, and OTLP-Decoded Events

The opentelemetry source in Vector currently supports adding headers to incoming events so they can be enriched and later routed or filtered based on those values. However, this functionality is inconsistent across event types and decoding modes:

  • Headers are only applied to log events when use_otlp_decoding: false (the default).
  • Headers are not applied to metrics or traces.
  • Headers are not applied to any event type when use_otlp_decoding: true.

This means that Vector users cannot rely on headers for enrichment or routing when receiving OTLP metrics/traces or when using native OTLP decoding, even though the configuration allows specifying them.

Expected behavior

  • Headers defined in the opentelemetry source should be added to logs, metrics, and traces, regardless of whether the events are:
  • decoded natively, or
  • decoded via use_otlp_decoding: true.

Actual behavior

  • Only logs with use_otlp_decoding: false receive the configured headers.
  • Logs with use_otlp_decoding: true, metrics, and traces do not receive headers at all.

Impact

This prevents consistent enrichment and routing across event types, particularly for users adopting OTLP-based ingestion pipelines.

Solution

It works when enrichment logic is added to all event types and was tested with a custom local build based on the PR #24307

Configuration


Version

0.51.1

Debug Output


Example Data

No response

Additional Context

No response

References

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions