- java.lang.Object
-
- io.helidon.tracing.jersey.TracingHelper
-
public final class TracingHelper extends Object
Utilities for tracing in helidon.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static String
classMethodName(ContainerRequestContext requestContext)
Name is generated from class and method as {http-method}:{fully-qualified-class-name}.{method-name}.static TracingHelper
create()
Create helper with default span name function.static TracingHelper
create(Function<ContainerRequestContext,String> nameFunction)
Create helper with custom span name function.String
generateSpanName(ContainerRequestContext context)
Generate span using the function provided bycreate(Function)
.static String
httpPathMethodName(ContainerRequestContext requestContext)
Name is generated from path as {http-method}:{request-path}.
-
-
-
Method Detail
-
create
public static TracingHelper create()
Create helper with default span name function.- Returns:
- tracing helper
- See Also:
classMethodName(ContainerRequestContext)
-
create
public static TracingHelper create(Function<ContainerRequestContext,String> nameFunction)
Create helper with custom span name function.- Parameters:
nameFunction
- function to get span name from context- Returns:
- tracing helper
- See Also:
classMethodName(ContainerRequestContext)
,httpPathMethodName(ContainerRequestContext)
-
httpPathMethodName
public static String httpPathMethodName(ContainerRequestContext requestContext)
Name is generated from path as {http-method}:{request-path}.- Parameters:
requestContext
- context to extract information from- Returns:
- name of span to use
-
classMethodName
public static String classMethodName(ContainerRequestContext requestContext)
Name is generated from class and method as {http-method}:{fully-qualified-class-name}.{method-name}.- Parameters:
requestContext
- context to extract information from- Returns:
- name of span to use
-
generateSpanName
public String generateSpanName(ContainerRequestContext context)
Generate span using the function provided bycreate(Function)
.- Parameters:
context
- request context of the container- Returns:
- name of the span to use
-
-