Class TracingObservationHandler.TracingContext

java.lang.Object
io.micrometer.tracing.handler.TracingObservationHandler.TracingContext
Enclosing interface:
TracingObservationHandler<T extends io.micrometer.observation.Observation.Context>

public static class TracingObservationHandler.TracingContext extends Object
Basic tracing context.
Since:
1.0.0
  • Constructor Details

    • TracingContext

      public TracingContext()
  • Method Details

    • getSpan

      public Span getSpan()
      Returns the span.
      Returns:
      span
    • setSpan

      public void setSpan(Span span)
      Sets the span.
      Parameters:
      span - span to set
    • getScope

      public CurrentTraceContext.Scope getScope()
      Returns the scope of the span.
      Returns:
      scope of the span
    • setScope

      public void setScope(CurrentTraceContext.Scope scope)
      Sets the current trace context scope.
      Parameters:
      scope - scope to set
    • setSpanAndScope

      public void setSpanAndScope(Span span, CurrentTraceContext.Scope scope)
      Convenience method to set both span and scope.
      Parameters:
      span - span to set
      scope - scope to set
    • toString

      public String toString()
      Overrides:
      toString in class Object