Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
package io.opentelemetry.javaagent.instrumentation.servlet;

import io.opentelemetry.context.Context;
import io.opentelemetry.context.Scope;

public class AsyncRunnableWrapper<REQUEST> implements Runnable {
private final ServletHelper<REQUEST, ?> helper;
Expand All @@ -27,7 +28,7 @@ public static <REQUEST> Runnable wrap(ServletHelper<REQUEST, ?> helper, Runnable

@Override
public void run() {
try {
try (Scope ignored = context.makeCurrent()) {
runnable.run();
} catch (Throwable throwable) {
helper.recordAsyncException(context, throwable);
Expand Down
Loading