You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 23, 2023. It is now read-only.
Tracer.SpanBuilder.startActiveSpan(booleanfinishOnClose) willcreateanewSpanandwillautomaticallysetisastheactiveoneforthecurrentcontext.
importio.opentracing.Scope;
// Strongly encouraged to use them under try statements,// to prevent ending up with the incorrect active Span// in case of error.try (Scopescope = tracer.buildSpan("foo").startActive(true)) {
scope.span().setTag(...);
scope.span().log(...);
}
// The 'foo' Span is finished at this point.
cc: @felixbarny @carlosalberto (after #301, related #361)
"finishSpanOnClose" in "try-with-resources" is still the main documented way of using spans. E.g., see: https://opentracing.io/guides/java/scopes/#scope-objects which recommends
And there are several dead javadoc links throughout the codebase to
startActive(boolean)
, which has been removed. https://github.com/opentracing/opentracing-java/blob/master/opentracing-api/src/main/java/io/opentracing/Tracer.java#L166The text was updated successfully, but these errors were encountered: