github open-telemetry/opentelemetry-java v0.10.0
Version 0.10.0

latest releases: v1.44.1, v1.44.0, v1.43.0...
4 years ago

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 Span now returns the Span to enable call-chaining.

Bug fixes

  • The package-info file was removed from the io.otel.context package 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-context as the context implementation. It now uses io.opentelemetry.context.Context. This is published in the opentelemetry-context artifact. Interactions with the context were mostly moved to static methods in the Span and Baggage interfaces.
  • 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.
  • TracingContextUtils and BaggageUtils were removed from the public API. Instead, use the appropriate static methods on the Span and Baggage classes, or use methods on the Context itself.
  • The context propagation APIs have moved into the new opentelemetry-context context module.
  • DefaultSpan was removed from the public API. Instead, use Span.wrap(spanContext) if you need a non-functional span that propagates the trace context.
  • DefaultMeter, DefaultMeterProvider, DefaultTracer and DefaultTracerProvider were removed from the public API. You can access the same functionality with getDefault() methods on the Meter, MeterProvider, Tracer, and TracerProvider` classes, respectively.
  • Some functionality from the Tracer interface is now available either on the Span interface or Context interface.
  • The OpenTelemetry class 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().
  • StatusCanonicalCode has been renamed to StatusCode.
  • Span.getContext() has been renamed to Span.getSpanContext().
  • AttributesBuilder now uses put instead of add as the method name for adding attributes.
  • All parameters are now marked as non-nullable by default.
  • TextMapPropagators could receive a null carrier passed to the extract method.
  • The TextMapPropagator.Getter interface has added a method to return the keys that the propagator uses.

SDK

Enhancements

  • A new MetricData gauge metric type is now available.
  • A new opentelemetry-sdk-testing module with a JUnit 5 extension to assist with testing is now available.
  • The Prometheus metric exporter now consumes gauge metrics.
  • The Jaeger gRPC exporter now maps Resource entries to process tags.
  • The OTLP protobuf definitions were updated to the latest released version: 0.6.0. Both the Span and Metric exporters were updated to match.
  • The Sampler interface now allows a Sampler implementation to update the TraceState that is applied to the SpanContext for the resulting span.

Breaking changes

  • TraceConfig configuration 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 message log entry attribute has been renamed to event and a new dropped attributes count attribute was added. For more information, see the Overview.
  • The SpanData.getHasRemoteParent() and SpanData.getHasEnded() methods were renamed to hasRemoteParent() and hasEnded(), respectively.
  • The IdsGenerator interface has been renamed to IdGenerator, and all implementations and relevant factory methods were similarly renamed.
  • The RandomIdGenerator is now accessible via a factory method on the IdGenerator class, rather than being exposed itself. Use IdGenerator.random() to acquire an instance.
  • The OTLP metric exporter now emits gauge metrics where appropriate.
  • ValueObserver instruments now generate gauge metrics, rather than non-monotonic counter-style metrics.
  • ValueObserver instruments now use the LastValue aggregation instead of MinMaxSumCount.
  • The SpanData.* implementation classes were removed from the public SDK, but the interfaces are still available.
  • SpanProcessor.onStart now takes a Context as its first parameter.
  • The Sampler interface now takes a parent Context rather than a SpanContext.
  • Each Sampler has been reorganized into their own classes and moved into the io.opentelemetry.sdk.trace.samplers package. Factory methods that used to be on the Samplers class were moved to the Sampler interface.

Extensions

Enhancements

  • A new JUnit5 extension was added for writing tests. For more information, see OpenTelemetryExtension.java.
  • A Jaeger SpanExporter which exports via the thrift-over-http protocol is now available.
  • A Jaeger Propagator is now available.

Breaking changes

  • The in-memory exporter(s) have been moved to the opentelemetry-sdk-testing artifact.
  • The OpenTracing shim factory class has been renamed from TraceShim to OpenTracingShim. The factory methods have changed because BaggageManager was removed and non-global OpenTelemetry instances are now available.
  • The 's' was removed from the word "exporters" for every exporter artifact. For example, opentelemetry-exporters-logging was renamed to opentelemetry-exporter-logging.
  • The 's' was removed from the word "extensions" for the package for every SDK extension. For example, io.opentelemetry.sdk.extensions.otproto.TraceProtoUtils was renamed to io.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

Don't miss a new opentelemetry-java release

NewReleases is sending notifications on new releases.