Skip to content

Conversation

@ozanichkovsky
Copy link

@ozanichkovsky ozanichkovsky commented Nov 26, 2025

Summary

This PR expands the existing header-enrichment logic in the opentelemetry source so that headers are applied consistently to all event types—logs, metrics, and traces—and across both decoding modes (use_otlp_decoding enabled or disabled).

What the PR Does

  • Adds header-enrichment support to metrics and traces, which previously ignored configured headers.
  • Ensures headers are also applied when use_otlp_decoding: true, where enrichment was previously skipped entirely.
  • Unifies the enrichment behavior so users can reliably attach metadata for routing, filtering, or downstream correlation regardless of event type or decoding method.

Verification

The changes were tested using a custom local build derived from this PR, confirming that headers are now correctly attached to:

  • logs (both decode modes),
  • metrics,
  • traces.

Vector configuration

How did you test this PR?

Change Type

  • Bug fix
  • New feature
  • Non-functional (chore, refactoring, docs)
  • Performance

Is this a breaking change?

  • Yes
  • No

Does this PR include user facing changes?

  • Yes. Please add a changelog fragment based on our guidelines.
  • No. A maintainer will apply the no-changelog label to this PR.

References

Closes: #24306

Notes

  • Please read our Vector contributor resources.
  • Do not hesitate to use @vectordotdev/vector to reach out to us regarding this PR.
  • Some CI checks run only after we manually approve them.
    • We recommend adding a pre-push hook, please see this template.
    • Alternatively, we recommend running the following locally before pushing to the remote branch:
      • make fmt
      • make check-clippy (if there are failures it's possible some of them can be fixed with make clippy-fix)
      • make test
  • After a review is requested, please avoid force pushes to help us review incrementally.
    • Feel free to push as many commits as you want. They will be squashed into one before merging.
    • For example, you can run git merge origin master and git push.
  • If this PR introduces changes Vector dependencies (modifies Cargo.lock), please
    run make build-licenses to regenerate the license inventory and commit the changes (if any). More details here.

@ozanichkovsky ozanichkovsky requested a review from a team as a code owner November 26, 2025 20:54
@github-actions github-actions bot added the domain: sources Anything related to the Vector's sources label Nov 26, 2025
@github-actions
Copy link

github-actions bot commented Nov 26, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@ozanichkovsky
Copy link
Author

recheck

@ozanichkovsky
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

@ozanichkovsky
Copy link
Author

recheck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain: sources Anything related to the Vector's sources

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant