Package io.temporal.opentracing.internal
Class ActionTypeAndNameSpanBuilderProvider
- java.lang.Object
-
- io.temporal.opentracing.internal.ActionTypeAndNameSpanBuilderProvider
-
- All Implemented Interfaces:
SpanBuilderProvider
- Direct Known Subclasses:
DataDogOpenTracingSpanBuilderProvider
public class ActionTypeAndNameSpanBuilderProvider extends java.lang.Object implements SpanBuilderProvider
Default implementation of theSpanBuilderProvider
. Uses both theSpanOperationType
and theSpanCreationContext.getActionName()
as the name of the OpenTracing span, e.g "StartActivity:LoadUsersFromDatabaseActivity".
This class also provides any available IDs, such as workflow ID, run ID, or parent workflow/run ID, as tags depending on the context of the operation.
-
-
Field Summary
Fields Modifier and Type Field Description static ActionTypeAndNameSpanBuilderProvider
INSTANCE
-
Constructor Summary
Constructors Constructor Description ActionTypeAndNameSpanBuilderProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.opentracing.Tracer.SpanBuilder
createSpanBuilder(io.opentracing.Tracer tracer, SpanCreationContext context)
protected java.lang.String
getSpanName(SpanCreationContext context)
Generates the name of the span given the span context.protected java.util.Map<java.lang.String,java.lang.String>
getSpanTags(SpanCreationContext context)
Generates tags for the span given the span creation context
-
-
-
Field Detail
-
INSTANCE
public static final ActionTypeAndNameSpanBuilderProvider INSTANCE
-
-
Method Detail
-
createSpanBuilder
public io.opentracing.Tracer.SpanBuilder createSpanBuilder(io.opentracing.Tracer tracer, SpanCreationContext context)
- Specified by:
createSpanBuilder
in interfaceSpanBuilderProvider
-
getSpanName
protected java.lang.String getSpanName(SpanCreationContext context)
Generates the name of the span given the span context.- Parameters:
context
- Span creation context- Returns:
- The span name
-
getSpanTags
protected java.util.Map<java.lang.String,java.lang.String> getSpanTags(SpanCreationContext context)
Generates tags for the span given the span creation context- Parameters:
context
- The span creation context- Returns:
- The map of tags for the span
-
-