java.lang.Object
io.helidon.tracing.jersey.AbstractTracingFilter
- All Implemented Interfaces:
ContainerRequestFilter
,ContainerResponseFilter
- Direct Known Subclasses:
MpTracingFilter
,TracingFilter
@ConstrainedTo(SERVER)
@PreMatching
public abstract class AbstractTracingFilter
extends Object
implements ContainerRequestFilter, ContainerResponseFilter
Tracing filter base.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
configureSpan
(Span.Builder<?> spanBuilder) Configure additional properties of a span that is named and has a parent.void
filter
(ContainerRequestContext requestContext) void
filter
(ContainerRequestContext requestContext, ContainerResponseContext responseContext) protected abstract String
spanName
(ContainerRequestContext context) Create name of the newly created span.protected abstract boolean
tracingEnabled
(ContainerRequestContext context) Whether this tracing filter is enabled.protected String
url
(ContainerRequestContext requestContext) Resolves host name based on the "host" header.
-
Constructor Details
-
AbstractTracingFilter
public AbstractTracingFilter()
-
-
Method Details
-
filter
- Specified by:
filter
in interfaceContainerRequestFilter
-
filter
public void filter(ContainerRequestContext requestContext, ContainerResponseContext responseContext) - Specified by:
filter
in interfaceContainerResponseFilter
-
url
Resolves host name based on the "host" header. If this header is not set, thenURI.toString()
is called.- Parameters:
requestContext
- request context- Returns:
- resolved url
-
tracingEnabled
Whether this tracing filter is enabled.- Parameters:
context
- request context- Returns:
- true if filter should trigger and start a new span
-
spanName
Create name of the newly created span.- Parameters:
context
- request context- Returns:
- name of the span to be created
-
configureSpan
Configure additional properties of a span that is named and has a parent.- Parameters:
spanBuilder
- builder of the new span
-