Class ActionTypeAndNameSpanBuilderProvider

java.lang.Object
io.temporal.opentracing.internal.ActionTypeAndNameSpanBuilderProvider
All Implemented Interfaces:
SpanBuilderProvider
Direct Known Subclasses:
DataDogOpenTracingSpanBuilderProvider

public class ActionTypeAndNameSpanBuilderProvider extends Object implements SpanBuilderProvider
Default implementation of the SpanBuilderProvider. Uses both the SpanOperationType and the SpanCreationContext.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 Details

  • Constructor Details

    • ActionTypeAndNameSpanBuilderProvider

      public ActionTypeAndNameSpanBuilderProvider()
  • Method Details

    • createSpanBuilder

      public io.opentracing.Tracer.SpanBuilder createSpanBuilder(io.opentracing.Tracer tracer, SpanCreationContext context)
      Specified by:
      createSpanBuilder in interface SpanBuilderProvider
    • getSpanName

      protected 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 Map<String,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