Add draft support for thread context configuration keys to process context#67
Merged
felixge merged 1 commit intoMar 10, 2026
Merged
Conversation
…ntext **What does this PR do?** This PR adds support for the `threadlocal.schema_version` and `threadlocal.attribute_key_map` extra attributes to be used by the process context, as per https://docs.google.com/document/d/1eatbHpEXXhWZEPrXZpfR58-5RIx-81mUgF69Zpn3Rz4/edit?tab=t.bmgoq3yor67o **Motivation:** Having these keys being supported makes it easy to experiment with thread context sharing. **Additional Notes:** As discussion around the thread context evolves, it's quite likely these keys might need to change a bit still. I'm stacking this PR on top of open-telemetry#66 to avoid piling more stuff on top of that one, but they are otherwise mostly independent. Reading these extra elements is a bit verbose but since the reader code can be disabled and is mostly only for testing I guess it's still fine? **How to test the change?** As usual, the example has been updated to match!
ivoanjo
force-pushed
the
ivoanjo/thread-context-support
branch
from
March 10, 2026 14:12
7d1ae7d to
91989bc
Compare
Contributor
Author
|
Now that #66 is merged, I've rebased this on top of master to leave only the relevant part for this PR and is ready for merging as well. (I still have one other PR to open after this one, with the monotonic changes) |
felixge
approved these changes
Mar 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR adds support for the
threadlocal.schema_versionandthreadlocal.attribute_key_mapextra attributes to be used by the process context, as per https://docs.google.com/document/d/1eatbHpEXXhWZEPrXZpfR58-5RIx-81mUgF69Zpn3Rz4/edit?tab=t.bmgoq3yor67o .I can't stack this PR on top of #66 because both of the branches are on my fork, but only the last commit (implementing thread context) differs between them. Once #66 is merged a quick rebase should clean things up.
Motivation:
Having these keys being supported makes it easy to experiment with thread context sharing.
Additional Notes:
As discussion around the thread context evolves, it's quite likely these keys might need to change a bit still.
Reading these extra elements is a bit verbose but since the reader code can be disabled and is mostly only for testing I guess it's still fine?
How to test the change?
As usual, the example has been updated to match!