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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidconfigureSpan(Span.Builder spanBuilder) Configure additional properties of a span that is named and has a parent.voidfilter(ContainerRequestContext requestContext) voidfilter(ContainerRequestContext requestContext, ContainerResponseContext responseContext) protected abstract StringspanName(ContainerRequestContext context) Create name of the newly created span.protected abstract booleantracingEnabled(ContainerRequestContext context) Whether this tracing filter is enabled.protected Stringurl(ContainerRequestContext requestContext) Resolves host name based on the "host" header.
-
Constructor Details
-
AbstractTracingFilter
public AbstractTracingFilter()
-
-
Method Details
-
filter
- Specified by:
filterin interfaceContainerRequestFilter
-
filter
public void filter(ContainerRequestContext requestContext, ContainerResponseContext responseContext) - Specified by:
filterin 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
-