Carlos Alberto Cortez
Mar 26 · 2 min read

The 0.32 Release of OpenTracing Java is now available. You can find the updated summary of changes below.

Trace identifiers have been added, in order to make it possible to correlate Span objects.

Finishing Span objects upon Scope close has been deprecated, as doing it through try-with statements makes it hard to properly handling Exceptions(Span objects would get finished before a catch block would be reached). This improves API safety, and makes it more difficult to do the wrong thing and end up with unexpected errors.

Changes from v0.31

  • Tracer identifiers were added through SpanContext.toTraceId() and SpanContext.toSpanId().
  • Tracer implements the Closable interface.
  • has been deprecated. This was done to prevent users from accidentally closing Scope objects that they didn’t own.
  • ScopeManager.activate(Span, bool) has been deprecated.
  • SpanBuilder.startActive(bool) has been deprecated.
  • Scope.span() has been deprecated. This was done to prevent the user from passing Scope objects between threads (Scope objects are not guaranteed to be thread-safe). Now Scope will be responsible for Span deactivation only, instead of being Span containers.
  • ScopeManager.activeSpan() exposes the currently active Span, if any ( will reference its corresponding Scope object).
  • Tracer.activateSpan() is a shortcut for Tracer.scopeManager().activateSpan().
  • Updated BINARY format, notifying the user the requested byte length on Tracer.inject() time (before, required byte length was unknown and the user had to try to pass a ByteBuffer with enough free space).
  • User-friendly Tag setters for Span and SpanBuilder.
  • It’s now possible to pass Map<String, Object> (besides Map<String, String>) when using Tracer.inject() with TEXT_MAP/HTTP_HEADERS formats.
  • TextMap format interface now inherits from TextMapInject and TextMapExtract, as the Binary format interface inherits from BinaryInject and BinaryExtract. This was done to separate concerns between injection and extraction, allowing more flexibility for users writing adapters for extraction-only or injection-only scenarios.

Details on 0.32

Maven Artifact

Tracking Issue: motivation, proposals, and pull requests.

Thanks to everyone who contributed code, testing, and feedback into this release, including yurishkuro, felixbarny, tylerbenson, sjoerdtalsma, pavolloffay, jpkrohling, MikeGoldsmith, carlosalberto and many others! 🎉🎉🎉


A blog discussing distributed tracing and context propagation

Carlos Alberto Cortez

Written by


A blog discussing distributed tracing and context propagation

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade