Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding ThreadLocalAccessor for TwContext #49

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

hussainkarafallah
Copy link

@hussainkarafallah hussainkarafallah commented Nov 8, 2024

Context

Adding ThreadLocalAccessor for TwContext so it's available for libraries using micrometer context API
Reactor uses context-propagation API to set and restore thread locals

Checklist

@hussainkarafallah hussainkarafallah requested a review from a team as a code owner November 8, 2024 12:23
private static final RateLimiter throwableLoggingRateLimiter = RateLimiter.create(2);

static final TwContext ROOT_CONTEXT = new TwContext(null, true);

static {
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably might be better to put this logic into the starter package and using an autoconfiguration mechanism for that. Using the static block is probably too hard coded in this case.

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.

2 participants