AWS v2: use scope when span is created
@@ -34,9 +34,11 @@ public class TracingExecutionInterceptor implements ExecutionInterceptor {
public void beforeExecution(
final Context.BeforeExecution context, final ExecutionAttributes executionAttributes) {
final Span span = GlobalTracer.get().buildSpan("aws.command").start();
+ try (final Scope scope = GlobalTracer.get().scopeManager().activate(span, false)) {
DECORATE.afterStart(span);
executionAttributes.putAttribute(SPAN_ATTRIBUTE, span);
}
+ }
@Override
public void afterMarshalling(
