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 for undertow async dispatch #4950

Merged
merged 1 commit into from
Dec 21, 2021

Conversation

laurit
Copy link
Contributor

@laurit laurit commented Dec 20, 2021

Resolves #4897

@Advice.OnMethodEnter(suppress = Throwable.class)
public static PropagatedContext enterJobSubmit(
@Advice.Argument(value = 1, readOnly = false) Runnable task) {
Context context = Java8BytecodeBridge.currentContext();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Alternatively could wrap the Runnable and handle restoring context there

import static io.opentelemetry.instrumentation.test.base.HttpServerTest.ServerEndpoint.REDIRECT
import static io.opentelemetry.instrumentation.test.base.HttpServerTest.ServerEndpoint.SUCCESS

class UndertowServerDispatchTest extends HttpServerTest<Undertow> implements AgentTestTrait {
Copy link
Member

Choose a reason for hiding this comment

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

👍

@trask trask merged commit 2531b6e into open-telemetry:main Dec 21, 2021
@lokeshcse6
Copy link

Hi @mateuszrzeszutek @trask,
When can we get release with this fix?
Thanks,
Lokesh

@trask
Copy link
Member

trask commented Jan 4, 2022

hey @lokeshcse6! the current plan is for OpenTelemetry Java SDK 1.10.0 release at the end of this week and OpenTelemetry Java Instrumentation 1.10.0 at the end of next week.

@laurit laurit deleted the undertow-dispatch branch January 4, 2022 08:48
@lokeshcse6
Copy link

Hi @trask
Thanks for you quick reply, Is there any GA version to test the fix in my code?

@trask
Copy link
Member

trask commented Jan 5, 2022

@lokeshcse6 are you looking for snapshot builds?

@lokeshcse6
Copy link

@lokeshcse6 are you looking for snapshot builds?

@trask Yes that is correct tested with snapshot jar fix is working fine. Thanks for help!!!

RashmiRam pushed a commit to RashmiRam/opentelemetry-auto-instr-java that referenced this pull request May 23, 2022
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.

Unable to print trace id and span id for undertow non-blocking IO server
4 participants