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.
- ScopeManager.active() 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 (ScopeManager.active() 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
Tracking Issue: motivation, proposals, and pull requests.
0.32.0 Release · Issue #314 · opentracing/opentracing-java
This issue tracks the Release Candidate iterations towards the the new 0.32 API for OpenTracing-Java. RC Branch…
Thanks to everyone who contributed code, testing, and feedback into this release, including yurishkuro, felixbarny, tylerbenson, sjoerdtalsma, pavolloffay, jpkrohling, MikeGoldsmith, carlosalberto and many others! 🎉🎉🎉