0.16.0 is planned to be the final release before 1.0.0. It is a release candidate and reflects our final API, no further breaking changes will be made unless a critical user-facing bug or security issue is found.
This release contains final cleanups of the API - apologies for any needed updates but this is it.
General
Note: In an effort to accelerate our work toward a 1.0.0 release, we have skipped the deprecation phase
on a number of breaking changes. We apologize for the inconvenience this may have caused. We are very
aware that these changes will impact users. If you need assistance in migrating from previous releases,
please open a discussion topic at
https://github.com/opentelemetry/opentelemetry-java/discussions.
☢️ Breaking Changes
- Methods and classes deprecated in 0.15.0 have been removed.
API
☢️Breaking Changes
- The
Span.Kind
enum has been moved to the top level, and namedSpanKind
. DefaultOpenTelemetry
is no longer a public class. If you need the functionality previously provided by this
implementation, it can be accessed via new static methods on theOpenTelemetry
interface itself.- The
TraceFlags
interface has been re-introduced. This is now used, rather than a barebyte
wherever
trace flags is used. In particular,SpanContext.create()
,SpanContext.createFromRemoteParent()
now require
aTraceFlags
instance, andSpanContext.getTraceFlags()
returns aTraceFlags
instance. - The names of static methods on
TraceFlags
have been normalized to match other similar classes, and now
returnTraceFlags
instead ofbyte
where appropriate. - The
Labels
interface and related classes have been moved into the alpha metrics modules and repackaged. TraceId.copyHexInto(byte[] traceId, char[] dest, int destOffset)
has been removed.SpanContext.getTraceIdAsHexString()
has been renamed toSpanContext.getTraceId()
SpanContext.getSpanIdAsHexString()
has been renamed toSpanContext.getSpanId()
BaggageEntry.getEntryMetadata()
has been renamed toBaggageEntry.getMetadata()
BaggageConsumer
has been removed in favor of a standardjava.util.function.BiConsumer<String, BaggageEntry>
TraceFlags.isSampledFromHex(CharSequence src, int srcOffset)
has been removed.SpanId
andTraceId
methods that had aString
parameter now acceptCharSequence
and assume the id starts at the beginning.SpanId.getSize()
andTraceId.getSize()
have been removed.SpanId.bytesFromHex()
has been removed.SpanId.asLong(CharSequence)
has been removed.SpanId.asBytes(CharSequence)
has been removed.SpanId.getHexLength()
has been renamed toSpanId.getLength()
SpanId.bytesToHex()
has been renamed toSpanId.fromBytes()
TraceId.bytesFromHex()
has been removed.TraceId.traceIdLowBytesAsLong(CharSequence)
has been removed.TraceId.traceIdHighBytesAsLong(CharSequence)
has been removed.TraceId.asBytes(CharSequence)
has been removed.TraceId.getHexLength()
has been renamed toTraceId.getLength()
TraceId.bytesToHex()
has been renamed toTraceId.fromBytes()
StrictContextStorage
has been made private. Use -Dio.opentelemetry.context.enableStrictContext=true` to enable it
📈Enhancements
- The
W3CTraceContextPropagator
class now directly implements theTextMapPropagator
interface. - The
OpenTelemetry
interface now has agetDefault()
method which will return a completely no-op implementation. - The
OpenTelmmetry
interface now has agetPropagating(ContextPropagators propagators)
method which will
return an implementation that contains propagators, but is otherwise no-op.
🌟Misc Notes
- The internal
StringUtils
class has had metrics-related methods removed from it. But, you weren't using
internal classes, were you? - The internal
AbstractWeakConcurrentMap
class has been made non-public. See the line above about internal classes.
Extensions
☢️ Breaking Changes
- The
OtTracerPropagator
has been renamed toOtTracePropagator
in the trace-propagators extension module. AwsXrayPropagator
has been moved to theopentelemetry-extension-aws
artifact
SDK
☢️ Breaking Changes
TraceConfig
has been renamed toSpanLimits
and relocated to theio.opentelemetry.sdk.tracing
package.
All related method names have been renamed to match.SpanData.getTraceState()
has been removed. The TraceState is still available via the SpanContext accessor.SpanData.isSampled()
has been removed. The isSampled property is still available via the SpanContext accessor.
📈Enhancements
SpanData
now directly exposes the underlyingSpanContext
instance.
SDK Extensions
☢️Breaking Changes
- In the
opentelemetry-autoconfigure
module, three environment variables/system properties
have been renamed to match the spec:OTEL_TRACE_EXPORTER
/otel.trace.exporter
has been replaced withOTEL_TRACES_EXPORTER
/otel.traces.exporter
OTEL_TRACE_SAMPLER
/otel.trace.sampler
has been replaced withOTEL_TRACES_SAMPLER
/otel_traces_sampler
OTEL_TRACE_SAMPLER_ARG
/otel.trace.sampler.arg
has been replaced withOTEL_TRACES_SAMPLER_ARG
/otel.traces.sampler.arg
📈Enhancements
- The
opentelemetry-autoconfigure
module now supports using non-millisecond values for duration &
interval configuration options. See the javadoc on theio.opentelemetry.sdk.autoconfigure.ConfigProperties.getDuration(String)
method for details on supported formats. - The
opentelemetry-autoconfigure
module now provides automatic SPI-based parsing of theOTEL_RESOURCE_ATTRIBUTES
env var
(and the correspondingotel.resource.attributes
system property). If you include this module on your
classpath, it will automatically update theResource.getDefault()
instance with that configuration.
Metrics (alpha)
API
- The
Labels
interface has been moved into the metrics API module and repackaged into the
io.opentelemetry.api.metrics.common
package.