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

context-propagation: Use new ThreadLocalAccessor contract #3460

Merged
merged 2 commits into from
May 31, 2023

Conversation

marcingrzejszczak
Copy link
Contributor

without this change we can't distinguish in Micrometer (e.g. via ObservationThreadLocalAccessor) whether we're introducing an empty value (setValue(null)) or resetting reset().

with this change we always set a value regardless whether it's null or not

This change is a prerequisite to fix current issues with OTLA and Reactor and scope leaks and memory leaks etc.

@marcingrzejszczak marcingrzejszczak marked this pull request as ready for review May 11, 2023 15:00
@marcingrzejszczak marcingrzejszczak requested a review from a team as a code owner May 11, 2023 15:00
@chemicL chemicL added area/context This issue is related to the Context area/observability labels May 11, 2023
@chemicL chemicL added this to the 3.5.7 milestone May 11, 2023
@chemicL chemicL added the type/enhancement A general enhancement label May 11, 2023
@chemicL
Copy link
Member

chemicL commented May 29, 2023

@OlegDokuka this follows from micrometer-metrics/context-propagation#103 and once context-propagation is released (the week of June 5-9), we can include this in the next release (June 13).

Once we merge micrometer-metrics/context-propagation#105 and release (I don't expect this to be a part of the nearest release, but rather a month later) we can further improve reactor's codebase to not include a custom implementation, but use the context-propagation library directly as it should then allow clearing the missing ThreadLocals.

@OlegDokuka
Copy link
Contributor

@chemicL sounds good to me

@chemicL chemicL merged commit 17ac6f4 into reactor:main May 31, 2023
6 checks passed
@chemicL chemicL changed the title Allow null previous value context-propagation: Use new ThreadLocalAccessor contract May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/context This issue is related to the Context area/observability type/enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants