Class TracingInterceptor
- java.lang.Object
-
- jadex.bridge.service.component.interceptors.AbstractApplicableInterceptor
-
- jadex.bridge.service.component.interceptors.ComponentThreadInterceptor
-
- jadex.bridge.service.component.interceptors.TracingInterceptor
-
- All Implemented Interfaces:
IServiceInvocationInterceptor
public class TracingInterceptor extends ComponentThreadInterceptor
Interceptor that creates traces.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
TracingInterceptor.ReturnValueResultListener
Listener that handles the end of the call.static class
TracingInterceptor.TextMapExtractAdapter
static class
TracingInterceptor.TextMapInjectAdapter
static class
TracingInterceptor.TracingMode
-
Field Summary
Fields Modifier and Type Field Description static IComponentIdentifier
ECID
protected static long
pcnt
protected static java.util.Map<IComponentIdentifier,io.opentelemetry.sdk.resources.Resource>
resources
-
Fields inherited from class jadex.bridge.service.component.interceptors.ComponentThreadInterceptor
ia
-
-
Constructor Summary
Constructors Constructor Description TracingInterceptor(IInternalAccess component)
Create a new interceptor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected io.opentelemetry.api.trace.Span
createSpan(io.opentelemetry.api.trace.Tracer tracer, java.lang.String invoked, java.lang.reflect.Method method, IComponentIdentifier caller, java.lang.Boolean system, io.opentelemetry.context.Context parent)
IFuture<java.lang.Void>
execute(ServiceInvocationContext sic)
Execute the interceptor.protected io.opentelemetry.sdk.resources.Resource
getOrCreateResource(IComponentIdentifier cid)
Add cid to pid mapping.boolean
isApplicable(ServiceInvocationContext context)
Test if the interceptor is applicable.protected void
setResource(io.opentelemetry.api.trace.Span span, IComponentIdentifier cid)
-
Methods inherited from class jadex.bridge.service.component.interceptors.ComponentThreadInterceptor
getComponent
-
-
-
-
Field Detail
-
resources
protected static java.util.Map<IComponentIdentifier,io.opentelemetry.sdk.resources.Resource> resources
-
pcnt
protected static long pcnt
-
ECID
public static final IComponentIdentifier ECID
-
-
Constructor Detail
-
TracingInterceptor
public TracingInterceptor(IInternalAccess component)
Create a new interceptor.
-
-
Method Detail
-
isApplicable
public boolean isApplicable(ServiceInvocationContext context)
Test if the interceptor is applicable.- Specified by:
isApplicable
in interfaceIServiceInvocationInterceptor
- Overrides:
isApplicable
in classComponentThreadInterceptor
- Returns:
- True, if applicable.
-
execute
public IFuture<java.lang.Void> execute(ServiceInvocationContext sic)
Execute the interceptor.- Parameters:
context
- The invocation context.
-
createSpan
protected io.opentelemetry.api.trace.Span createSpan(io.opentelemetry.api.trace.Tracer tracer, java.lang.String invoked, java.lang.reflect.Method method, IComponentIdentifier caller, java.lang.Boolean system, io.opentelemetry.context.Context parent)
-
setResource
protected void setResource(io.opentelemetry.api.trace.Span span, IComponentIdentifier cid)
-
getOrCreateResource
protected io.opentelemetry.sdk.resources.Resource getOrCreateResource(IComponentIdentifier cid)
Add cid to pid mapping.- Parameters:
cid
- The component id.- Returns:
- pid The process id.
-
-