Package io.helidon.microprofile.tracing
Class MpTracingFilter
- java.lang.Object
-
- io.helidon.tracing.jersey.AbstractTracingFilter
-
- io.helidon.microprofile.tracing.MpTracingFilter
-
- All Implemented Interfaces:
ContainerRequestFilter
,ContainerResponseFilter
@ConstrainedTo(SERVER) @Priority(-2147483643) @ApplicationScoped public class MpTracingFilter extends AbstractTracingFilter
Adds tracing of Jersey calls using a post-matching filter. Microprofile Opentracing implementation.
-
-
Constructor Summary
Constructors Constructor Description MpTracingFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
configureSpan(Tracer.SpanBuilder spanBuilder)
Configure additional properties of a span that is named and has a parent.void
postConstruct()
Post construct method, initialization procedures.protected String
spanName(ContainerRequestContext context)
Create name of the newly created span.protected boolean
tracingEnabled(ContainerRequestContext context)
Whether this tracing filter is enabled.protected String
url(ContainerRequestContext requestContext)
Resolves host name based on the "host" header.-
Methods inherited from class io.helidon.tracing.jersey.AbstractTracingFilter
filter, filter
-
-
-
-
Method Detail
-
postConstruct
@PostConstruct public void postConstruct()
Post construct method, initialization procedures.
-
tracingEnabled
protected boolean tracingEnabled(ContainerRequestContext context)
Description copied from class:AbstractTracingFilter
Whether this tracing filter is enabled.- Specified by:
tracingEnabled
in classAbstractTracingFilter
- Parameters:
context
- request context- Returns:
- true if filter should trigger and start a new span
-
spanName
protected String spanName(ContainerRequestContext context)
Description copied from class:AbstractTracingFilter
Create name of the newly created span.- Specified by:
spanName
in classAbstractTracingFilter
- Parameters:
context
- request context- Returns:
- name of the span to be created
-
configureSpan
protected void configureSpan(Tracer.SpanBuilder spanBuilder)
Description copied from class:AbstractTracingFilter
Configure additional properties of a span that is named and has a parent.- Specified by:
configureSpan
in classAbstractTracingFilter
- Parameters:
spanBuilder
- builder of the new span
-
url
protected String url(ContainerRequestContext requestContext)
Description copied from class:AbstractTracingFilter
Resolves host name based on the "host" header. If this header is not set, thenURI.toString()
is called.- Overrides:
url
in classAbstractTracingFilter
- Parameters:
requestContext
- request context- Returns:
- resolved url
-
-