| Modifier and Type | Class and Description |
|---|---|
| public static class | TracingObservationHandler.TracingContext
Basic tracing context. |
| Modifier and Type | Method and Description |
|---|---|
| public default void | |
| public default Span | Returns: parent span ornull when there's noneGet the current span from parent if applicable. |
| public default Span | Returns: span or exceptioncontext context)Returns the span from the context or throws an exception if it's not there. |
| public default String | |
| public Tracer | |
| public default TracingObservationHandler. | Returns: tracing contextGet the current tracing context and updates the context if it's missing. |
| public default void | onError(T context)
Overrides default io. Observation.
|
| public default void | onEvent(Observation.
the event,Observation. that was signaledOverrides default io. Observation.
|
| public default void | onScopeClosed(T
recording with context containing scope context)Overrides default io. |
| public default void | onScopeOpened(T
recording with context containing scope context)Overrides default io. |
| public default void | onScopeReset(T context)
Overrides default io. |
| public default void | setMaybeScopeOnTracingContext(TracingObservationHandler.
handler's tracing context tracingContext,span, whose context will be used to create a new scope. Span can be
newSpan)null.Creates or reuses an existing |
| public default boolean | supportsContext(Observation.
Implements io. Observation.
|
| public default void |
| endSpan | back to summary |
|---|---|
| public default void endSpan(T context, Span span) Ends span and clears resources.
| |
| getParentSpan | back to summary |
|---|---|
| public default Span getParentSpan(Observation. Get the current span from parent if applicable.
| |
| getRequiredSpan | back to summary |
|---|---|
| public default Span getRequiredSpan(T context) Returns the span from the context or throws an exception if it's not there.
| |
| getSpanName | back to summary |
|---|---|
| public default String getSpanName(T context) Get the span name.
| |
| getTracer | back to summary |
|---|---|
| public Tracer getTracer() Returns the
| |
| getTracingContext | back to summary |
|---|---|
| public default TracingObservationHandler. Get the current tracing context and updates the context if it's missing.
| |
| onError | back to summary |
|---|---|
| public default void onError(T context) Overrides default io. Doc from io. Reacts to an error during an
| |
| onEvent | back to summary |
|---|---|
| public default void onEvent(Observation. Overrides default io. Doc from io. Reacts to arbitrary
| |
| onScopeClosed | back to summary |
|---|---|
| public default void onScopeClosed(T context) Overrides default io. Cleans the scope present in the context.
| |
| onScopeOpened | back to summary |
|---|---|
| public default void onScopeOpened(T context) Overrides default io. Puts the span in scope.
| |
| onScopeReset | back to summary |
|---|---|
| public default void onScopeReset(T context) Overrides default io. Doc from io. Reacts to resetting of scopes. If your handler uses a
| |
| setMaybeScopeOnTracingContext | back to summary |
|---|---|
| public default void setMaybeScopeOnTracingContext(TracingObservationHandler. Creates or reuses an existing
| |
| supportsContext | back to summary |
|---|---|
| public default boolean supportsContext(Observation. Implements io. Doc from io. Tells the registry whether this handler should be applied for a given
| |
| tagSpan | back to summary |
|---|---|
| public default void tagSpan(T context, Span span) Tags the span.
| |
| Modifier and Type | Field and Description |
|---|---|
| private Map | |
| private Span |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Implements java. |
| public Map | Returns: baggage attached to the span
Deprecated
scheduled for removal in 1.5.0
Returns the baggage corresponding to this span.
|
| public CurrentTraceContext. | |
| public Span | |
| public void | setBaggage(Map<String, String>
baggage to set baggage)
Deprecated
scheduled for removal in 1.5.0
Sets the baggage
|
| public void | |
| public void | |
| public void | setSpanAndScope(Span
span to set span, CurrentTraceContext.scope to set scopeConvenience method to set both span and scope. |
| public String | |
| private String |
| scopes | back to summary |
|---|---|
| private Map<Thread, CurrentTraceContext. | |
| span | back to summary |
|---|---|
| private Span span | |
| TracingContext | back to summary |
|---|---|
| public TracingContext() | |
| close | back to summary |
|---|---|
| public void close() Implements java. Doc from java. Closes this resource, relinquishing any underlying resources.
This method is invoked automatically on objects managed by the
| |
| getBaggage | back to summary |
|---|---|
| public Map Deprecated scheduled for removal in 1.5.0 Returns the baggage corresponding to this span. | |
| getScope | back to summary |
|---|---|
| public CurrentTraceContext. Returns the scope of the span.
| |
| getSpan | back to summary |
|---|---|
| public Span getSpan() Returns the span.
| |
| setBaggage | back to summary |
|---|---|
| public void setBaggage(Map<String, String> baggage)
Deprecated scheduled for removal in 1.5.0 Sets the baggage
| |
| setScope | back to summary |
|---|---|
| public void setScope(CurrentTraceContext. Sets the current trace context scope.
| |
| setSpan | back to summary |
|---|---|
| public void setSpan(Span span) Sets the span.
| |
| setSpanAndScope | back to summary |
|---|---|
| public void setSpanAndScope(Span span, CurrentTraceContext. Convenience method to set both span and scope.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| traceContextFromSpan | back to summary |
|---|---|
| private String traceContextFromSpan() | |