Skip to content

Conversation

@ozanichkovsky
Copy link
Contributor

@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 logs across both decoding modes (use_otlp_decoding enabled or disabled).

What the PR Does
Ensures headers are also applied when use_otlp_decoding: true, where enrichment was previously skipped entirely.

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).

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
Contributor Author

recheck

@ozanichkovsky
Copy link
Contributor Author

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

@ozanichkovsky
Copy link
Contributor Author

recheck

@ozanichkovsky ozanichkovsky changed the title fix(opetelemetry source): collect headers for logs, metrics, traces with/without use_otlp_decoding fix(opetelemetry source): collect headers for logs with use_otlp_decoding set to true Dec 15, 2025
Copy link
Member

@pront pront left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ozanichkovsky (FYI I just happened to see this, I am on a leave so ping the Vector team instead to drive this forward)

@ozanichkovsky ozanichkovsky changed the title fix(opetelemetry source): collect headers for logs with use_otlp_decoding set to true fix(sources): collect headers for logs in opentelemetry source with use_otlp_decoding set to true Dec 16, 2025
@ozanichkovsky
Copy link
Contributor Author

Thanks @pront. I don't know for sure if there is a way to properly tag Vector team, so I'm tagging @thomasqueirozb and
@michaelcretzman I found as reviewers in other closed PRs.

@ozanichkovsky
Copy link
Contributor Author

Maybe I can also tag @jszwedko

@thomasqueirozb
Copy link
Contributor

Hey @ozanichkovsky, pinging @vectordotdev/vector should work (without the backticks)

Copy link
Contributor

@thomasqueirozb thomasqueirozb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes make sense. Thanks for your contribution!

auto-merge was automatically disabled December 23, 2025 19:05

Head branch was pushed to by a user without write access

@ozanichkovsky
Copy link
Contributor Author

ozanichkovsky commented Dec 23, 2025

@thomasqueirozb I updated the changelog to actually say that it is for logs only. I tried to implement this for all event types first, but it would rather be a new feature implementation, not a bug fix.

@ozanichkovsky
Copy link
Contributor Author

@vectordotdev/vector should be ready to pass all the checks.

@ozanichkovsky
Copy link
Contributor Author

@thomasqueirozb I unfortunately can't run all checks, so merging is still blocked until something is done by the vector team.

@thomasqueirozb thomasqueirozb added this pull request to the merge queue Dec 23, 2025
Merged via the queue into vectordotdev:master with commit 3749b70 Dec 23, 2025
50 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Dec 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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

3 participants