Package io.micrometer.tracing.handler
Class TracingObservationHandler.TracingContext
java.lang.Object
io.micrometer.tracing.handler.TracingObservationHandler.TracingContext
- Enclosing interface:
TracingObservationHandler<T extends io.micrometer.observation.Observation.Context>
Basic tracing context.
- Since:
- 1.0.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetScope()
Returns the scope of the span.getSpan()
Returns the span.void
Sets the current trace context scope.void
Sets the span.void
setSpanAndScope
(Span span, CurrentTraceContext.Scope scope) Convenience method to set both span and scope.toString()
-
Constructor Details
-
TracingContext
public TracingContext()
-
-
Method Details
-
getSpan
Returns the span.- Returns:
- span
-
setSpan
Sets the span.- Parameters:
span
- span to set
-
getScope
Returns the scope of the span.- Returns:
- scope of the span
-
setScope
Sets the current trace context scope.- Parameters:
scope
- scope to set
-
setSpanAndScope
Convenience method to set both span and scope.- Parameters:
span
- span to setscope
- scope to set
-
toString
-