Package org.opensearch.telemetry.tracing
Class SpanContext
java.lang.Object
org.opensearch.telemetry.tracing.SpanContext
Wrapped Span will be exposed to the code outside of tracing package for sharing the
Span without having access to
its properties.- Opensearch.experimental:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
SpanContext
Constructor.- Parameters:
span- span to be wrapped.
-
-
Method Details
-
setError
Sets the error for the current span behind this context- Parameters:
cause- error
-
endSpan
public void endSpan()Ends current span
-