Skip to content

Add draft support for thread context configuration keys to process context#67

Merged
felixge merged 1 commit into
open-telemetry:mainfrom
ivoanjo:ivoanjo/thread-context-support
Mar 10, 2026
Merged

Add draft support for thread context configuration keys to process context#67
felixge merged 1 commit into
open-telemetry:mainfrom
ivoanjo:ivoanjo/thread-context-support

Conversation

@ivoanjo

@ivoanjo ivoanjo commented Mar 5, 2026

Copy link
Copy Markdown
Contributor

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 .

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!

@ivoanjo
ivoanjo requested a review from a team as a code owner March 5, 2026 14:20

@christos68k christos68k left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

…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
ivoanjo force-pushed the ivoanjo/thread-context-support branch from 7d1ae7d to 91989bc Compare March 10, 2026 14:12
@ivoanjo

ivoanjo commented Mar 10, 2026

Copy link
Copy Markdown
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
felixge merged commit b46256f into open-telemetry:main Mar 10, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants