Sitemap
OpenTracing

A blog discussing distributed tracing and context propagation

Announcing Java OpenTracing v0.31

2 min readDec 22, 2017

--

The release candidate for the v0.31 version of Java OpenTracing is now available.

Based on feedback, the v0.30 context propagation has been simplified. The capture phase and reference-counting are removed. For asynchronous code, span lifecycle management is now handled in framework instrumentation rather than tracer internals.

Assuming there are no blockers, this work will be merged into master on January 8th. At this time, we recommend tracer implementers start porting to the new API and check out the backwards compatibility layer, while instrumentation maintainers begin preparing a v0.31 version of their library on an ot_v031 branch.

Changes from v0.30

  • BaseSpan and ActiveSpan are simplified into a single Span class.
  • Scope replaces ActiveSpan, removing the continuation concept. There is no longer a capture phase. Scopes are only activated and then closed.
  • ScopeManager replaces ActiveSpanSource, and is expected to be passed to the tracer at initialization time.
  • ScopeManager.activate(Span,bool) creates a Scope for the current context. The finishOnClose flag optionally calls Span.finish() on Scope.close().
  • ScopeManager.active() returns the Scope associated with the current context.
  • Tracer.activeSpan() returns the current value of Tracer.scopeManager().active().span() as a convenience.
  • ThreadLocalScopeManager replaces ThreadLocalActiveSpanSource. It still uses thread-local storage for tracking active spans, but removes the reference counting used previously for span lifetime handling.
  • The binary carrier format has been changed from a fixed-size ByteBuffer to a streaming Binary implementation.
  • A backwards compatibility package has been created to allow v0.30 and v0.31 instrumentation to coexist. The package contains the io.opentracing.v_030 namespace and a shim which provides a v0.31 tracer with a v0.30 interface.

Details on v0.31

Release Candidate branch
https://github.com/opentracing/opentracing-java/tree/v0.31.0

Get Ted Young’s stories in your inbox

Join Medium for free to get updates from this writer.

Maven artifact https://mvnrepository.com/artifact/io.opentracing/opentracing-api/0.31.0-RC2

io.opentracing.v_030 compatibility package
https://github.com/opentracing/opentracing-java-v030

Tracking Issue: motivation, proposals, and pull requests
https://github.com/opentracing/opentracing-java/issues/189

API Examples
Please check out the io.opentracing.examples package for common instrumentation patterns.

Thanks to everyone who contributed code, testing and feedback into this release, including carlosalberto, pavolloffay, objectiser, yurishkuro, tylerbenson, mabn, bhs, gkumar7, sjoerdtalsma, wu-sheng, malafeev, mcumings, hypnoce, rbtcollins, adriancole, ivantopo, eli-jordan, and many others! 🎉🎉🎉

--

--

Ted Young
Ted Young

Written by Ted Young

Tracing all the things. Director of Developer Education at Lightstep. All purpose OpenTelemetry contributor.

OpenTracing
OpenTracing

Published in OpenTracing

A blog discussing distributed tracing and context propagation