Version 0.10.0
Version 0.10.0 contains very many breaking changes, especially in the APIs. This will probably be an extremely disruptive release for direct users of our APIs. If you need help migrating from older versions to 0.10.0, please reach out on gitter, and we’ll be happy to help. This release can be considered Milestone 1 for the Tracing, Context and Baggage APIs.
Changes since 0.9.1:
API
Enhancements
- The W3C Baggage Propagator is now available.
- The B3 Propagator now handles both single and multi-header formats, and defaults to injecting the single-header format.
- Mutating a method on
Spannow returns theSpanto enable call-chaining.
Bug fixes
- The
package-infofile was removed from theio.otel.contextpackage because it made the project incompatible with JPMS.
Breaking changes
- There have been many updates to the semantic conventions constants. The constants are now auto-generated from the YAML specification files, so the names will now be consistent across languages. For more information, see the YAML Model for Semantic Conventions.
- All API classes have been moved into the
io.opentelemetry.api.prefix to support JPMS users. - The API no longer uses the
grpc-contextas the context implementation. It now usesio.opentelemetry.context.Context. This is published in theopentelemetry-contextartifact. Interactions with the context were mostly moved to static methods in theSpanandBaggageinterfaces. - The Baggage API has been reworked to more closely match the specification. This includes the removal of the
BaggageManager. Baggage is fully functional within the API, without needing to install an SDK. TracingContextUtilsandBaggageUtilswere removed from the public API. Instead, use the appropriate static methods on theSpanandBaggageclasses, or use methods on theContextitself.- The context propagation APIs have moved into the new
opentelemetry-contextcontext module. DefaultSpanwas removed from the public API. Instead, useSpan.wrap(spanContext)if you need a non-functional span that propagates the trace context.DefaultMeter,DefaultMeterProvider,DefaultTracerandDefaultTracerProviderwere removed from the public API. You can access the same functionality withgetDefault()methods on theMeter,MeterProvider,Tracer, andTracerProvider` classes, respectively.- Some functionality from the
Tracerinterface is now available either on theSpaninterface orContextinterface. - The
OpenTelemetryclass is now an interface, with implementations. Methods on this interface have changed their names to reflect this change. For more information, see OpenTelemetry.java. - All builder-creation methods have been renamed to
.builder(). StatusCanonicalCodehas been renamed toStatusCode.Span.getContext()has been renamed toSpan.getSpanContext().AttributesBuildernow usesputinstead ofaddas the method name for adding attributes.- All parameters are now marked as non-nullable by default.
TextMapPropagatorscould receive a null carrier passed to the extract method.- The
TextMapPropagator.Getterinterface has added a method to return the keys that the propagator uses.
SDK
Enhancements
- A new
MetricDatagauge metric type is now available. - A new
opentelemetry-sdk-testingmodule with a JUnit 5 extension to assist with testing is now available. - The Prometheus metric exporter now consumes
gaugemetrics. - The Jaeger gRPC exporter now maps
Resourceentries to process tags. - The OTLP protobuf definitions were updated to the latest released version: 0.6.0. Both the
SpanandMetricexporters were updated to match. - The
Samplerinterface now allows aSamplerimplementation to update theTraceStatethat is applied to theSpanContextfor the resulting span.
Breaking changes
TraceConfigconfiguration option names (environment variables and system properties) were renamed to match the OpenTelemetery Specification. For more information, see TraceConfig.- The Jaeger gRPC exporter was updated to match the OpenTelemetry Specification. The
messagelog entry attribute has been renamed toeventand a newdropped attributes countattribute was added. For more information, see the Overview. - The
SpanData.getHasRemoteParent()andSpanData.getHasEnded()methods were renamed tohasRemoteParent()andhasEnded(), respectively. - The
IdsGeneratorinterface has been renamed toIdGenerator, and all implementations and relevant factory methods were similarly renamed. - The
RandomIdGeneratoris now accessible via a factory method on theIdGeneratorclass, rather than being exposed itself. UseIdGenerator.random()to acquire an instance. - The OTLP metric exporter now emits
gaugemetrics where appropriate. ValueObserverinstruments now generate gauge metrics, rather than non-monotonic counter-style metrics.ValueObserverinstruments now use theLastValueaggregation instead ofMinMaxSumCount.- The
SpanData.*implementation classes were removed from the public SDK, but the interfaces are still available. SpanProcessor.onStartnow takes aContextas its first parameter.- The
Samplerinterface now takes a parentContextrather than aSpanContext. - Each
Samplerhas been reorganized into their own classes and moved into theio.opentelemetry.sdk.trace.samplerspackage. Factory methods that used to be on theSamplersclass were moved to theSamplerinterface.
Extensions
Enhancements
- A new JUnit5 extension was added for writing tests. For more information, see OpenTelemetryExtension.java.
- A Jaeger
SpanExporterwhich exports via thethrift-over-http protocolis now available. - A Jaeger Propagator is now available.
Breaking changes
- The in-memory exporter(s) have been moved to the
opentelemetry-sdk-testingartifact. - The OpenTracing shim factory class has been renamed from
TraceShimtoOpenTracingShim. The factory methods have changed becauseBaggageManagerwas removed and non-globalOpenTelemetryinstances are now available. - The 's' was removed from the word "exporters" for every exporter artifact. For example,
opentelemetry-exporters-loggingwas renamed toopentelemetry-exporter-logging. - The 's' was removed from the word "extensions" for the package for every SDK extension. For example,
io.opentelemetry.sdk.extensions.otproto.TraceProtoUtilswas renamed toio.opentelemetry.sdk.extension.otproto.TraceProtoUtils.
Many thanks to everyone who made this release possible!
@anuraaga @bogdandrutu @Oberon00 @thisthat @HaloFour @jkwatson @kenfinnigan @MariusVolkhart @malafeev @trask @tylerbenson @XiXiaPdx @dengliming @hengyunabc @jarebudev @brianashby-sfx