Minor refacotrings to JaxRsAnnotationsInstrumentation.java
This commit is contained in:
parent
37dcfe5385
commit
d9f09e6af5
|
@ -59,7 +59,7 @@ public class JaxRsAnnotationsDecorator extends BaseDecorator {
|
|||
|
||||
/**
|
||||
* Returns the resource name given a JaxRS annotated method. Results are cached so this method can
|
||||
* be called multiple times without significantly impacting on performance.
|
||||
* be called multiple times without significantly impacting performance.
|
||||
*
|
||||
* @return The result can be an empty string but will never be {@code null}.
|
||||
*/
|
||||
|
|
|
@ -60,10 +60,10 @@ public final class JaxRsAnnotationsInstrumentation extends Instrumenter.Default
|
|||
|
||||
@Advice.OnMethodEnter(suppress = Throwable.class)
|
||||
public static Scope nameSpan(@Advice.Origin final Method method) {
|
||||
Tracer tracer = GlobalTracer.get();
|
||||
// Rename the parent span according to the path represented by these annotations.
|
||||
final Scope parent = GlobalTracer.get().scopeManager().active();
|
||||
Tracer.SpanBuilder span = GlobalTracer.get().buildSpan(JAX_ENDPOINT_OPERATION_NAME);
|
||||
Scope scope = span.startActive(true);
|
||||
final Scope parent = tracer.scopeManager().active();
|
||||
Scope scope = tracer.buildSpan(JAX_ENDPOINT_OPERATION_NAME).startActive(true);
|
||||
DECORATE.updateParent(parent, method);
|
||||
DECORATE.updateCurrentScope(scope, method);
|
||||
return DECORATE.afterStart(scope);
|
||||
|
|
Loading…
Reference in New Issue