Skip to content

Releases: open-telemetry/opentelemetry-java

Version 1.11.0

04 Feb 18:38
5c1bd6c
Compare
Choose a tag to compare

General

SDK

Exporter

  • Switch Jaeger remote sampler to use grpc lite
  • Deprecate .setChannel(ManagedChannel) methods on OTLP gRPC exporters
  • Deprecate .setChannel(ManagedChannel) methods on Jaeger gRPC exporter
  • Experimental OTLP retry support now retries on connection timeouts

Metrics

  • BREAKING Change: Deprecated InMemoryMetricExporter and InMemoryMetricReader have been removed. Use versions in opentelemetry-sdk-metrics-testing instead
  • Deprecate InstrumentType values OBSERVABLE_SUM and OBSERVABLE_UP_DOWN_SUM in favor of OBSERVABLE_COUNTER and OBSERVABLE_UP_DOWN_COUNTER

Logs

  • Add ability to configure log attribute limits via SdkLogEmitterProviderBuilder#setLogLimits(..)

SDK Extensions

  • Auto-configuration added options to AutoConfigurationCustomizer for customizing SdkTracerProviderBuilder, SdkMeterProviderBuilder, MetricExporter, SdkLogEmitterProviderBuilder, and LogExporter
  • Auto-configuration added option to skip shutdown hooks
  • Auto-configuration adjusted the execution order of tracer and meter provider customization to happen after autoconfiguration
  • Auto-configuration adjusted SPI factories to evaluate lazily
  • Auto-configuration now uses sets configured SdkMeterProvider on BatchLogProcessor and BatchSpanProcessor
  • Auto-configuration deprecated SdkTracerProviderConfigurer in favor of AutoConfigurationCustomizer#addTracerProviderCustomizer(..)

Version 1.10.1

21 Jan 18:56
3938d96
Compare
Choose a tag to compare

Bugfixes

  • Fix issue preventing registration of PrometheusCollector with SDK
  • Allow retry policy to be set for OkHttpGrpcExporter

Version 1.10.0

07 Jan 07:20
8967558
Compare
Choose a tag to compare

(These release notes contain the content of the 1.10 RCs)

With this release, the OpenTelemetry metrics API has been marked stable - you can use it through the usual opentelemetry-api artifact. The SDK is still under development and not yet stable, but we hope this can open the door to instrumentation libraries using the metrics API.

API

  • Performance of GlobalOpenTelemetry.get improved
  • buildWithCallback for asynchronous metrics now return interfaces instead of void. The interfaces are empty but will allow adding functionality in the future
  • BREAKING CHANGE: Double/LongMeasurement.observe have been removed, replaced with the record method.
  • BREAKING CHANGE: GlobalMeterProvider has been removed
  • BREAKING CHANGE: ObservableMeasurement, an empty interface, has been removed. This type was not previously deprecated but is expected to have no use in apps due to the lack of functionality
  • The Metrics API has been merged into the opentelemetry-api artifact. OpenTelemetry.getMeterProvider() is the new entrypoint
  • BREAKING CHANGE: Bound metrics instruments have been removed for now to allow more time to bake while still providing a stable metrics API
  • A warning is logged now when registering async instruments with the same name. Previously subsequent invocations were just ignored.
  • GlobalOpenTelemetry extended with helpers for meter creation

SDK

  • The semantic conventions have been updated to 1.8.0
  • Deprecated methods have been removed from the opentelemetry-sdk-autoconfigure artifact.

Exporter

  • The OkHttp gRPC exporters now support experimental retry
  • OkHttp dispatcher threads are now spawned as daemon threads
  • The JPMS module name for the logs exporter has been fixed
  • Metrics exporters can have temporality configured
  • HTTP exporters now support experimental retry
  • Jaeger exporter allows setting trusted certificates
  • gRPC exporter metric typos corected

Metrics

  • InMemoryMetricExporter has been moved to the opentelemetry-sdk-metrics-testing artifact. The current class has been deprecated in this release
  • Metric instrument usage violations consistently report issues as debug logs
  • Some user callbacks have been wrapped to catch exceptions instead of throwing
  • MinMaxSumCount/Count aggregation has been removed
  • Empty aggregator is renamed to drop
  • Cumulative aggregations will not be aggressively dropped every collection cycle

Logs

  • A opentelemetry-sdk-logs-testing module has been added
  • SdkLogEmitterProvider is now available through OpenTelemetrySdk
  • LogDataBuilder can now take a SpanContext directly
  • SdkLogEmitterProvider.get convenience method added

AWS

  • HTTP requests now use OkHttp instead of the JDK

OpenCensus Shim

  • Shim span attributes are set before the span is created instead of after
  • Exceptions are not thrown when activating a null span

SDK Extensions

  • BREAKING CHANGE: Deprecated trace incubator types (DelegatingSpanData, SpanDataBuidler) have been removed
  • BREAKING CHANGE: Deprecated ExecutorServiceSpanProcessor has been removed
  • cloud.platform is now populated in AWS Resource
  • Auto-configuration correctly uses configured class loader for configuring Resource
  • Auto-configuration prints a debug log with the resolved tracer configuration
  • Auto-configuration supports the logs signal

Version 1.10.0 RC2

23 Dec 05:51
538af68
Compare
Choose a tag to compare
Version 1.10.0 RC2 Pre-release
Pre-release

This release continues preparation for the stable release of the metrics API. APIs deprecated in RC1 have been removed. It is expected for 1.10.0 to release with the same API as this release.

API

  • Performance of GlobalOpenTelemetry.get improved
  • buildWithCallback for asynchronous metrics now return interfaces instead of void. The interfaces are empty but will allow adding functionality in the future
  • BREAKING CHANGE: Double/LongMeasurement.observe have been removed
  • BREAKING CHANGE: GlobalMeterProvider has been removed
  • BREAKING CHANGE: ObservableMeasurement, an empty interface, has been removed. This type was not previously deprecated but is expected to have no use in apps due to the lack of functionality

SDK

  • HTTP exporters now support experimental retry
  • Deprecated methods have been removed from the opentelemetry-sdk-autoconfigure artifact.

Metrics

  • InMemoryMetricExporter has been moved to the opentelemetry-sdk-metrics-testing artifact. The current class has been deprecated in this release
  • Metric instrument usage violations consistently report issues as debug logs

Logs

  • A opentelemetry-sdk-logs-testing module has been added
  • SdkLogEmitterProvider is now available through OpenTelemetrySdk

AWS

  • HTTP requests now use OkHttp instead of the JDK

OpenCensus Shim

  • Shim span attributes are set before the span is created instead of after
  • Exceptions are not thrown when activating a null span

Full Changelog: v1.10.0-rc.1...v1.10.0-rc.2

Version 1.10.0 RC1

10 Dec 07:11
16b4e54
Compare
Choose a tag to compare
Version 1.10.0 RC1 Pre-release
Pre-release

OpenTelemetry SDK 1.10 will be the first release where the metrics API is considered stable. The Metrics SDK continues to be in development and will be alpha.

We plan to release this RC1 with redundant metrics APIs deprecated, RC2 with them removed, and 1.10.0 the same as RC2 barring unforeseen issues.

API

  • The Metrics API has been merged into the opentelemetry-api artifact. OpenTelemetry.getMeterProvider() is the new entrypoint
  • BREAKING CHANGE: Bound metrics instruments have been removed for now to allow more time to bake while still providing a stable metrics API
  • Double/LongMeasurement.observe has been renamed to record.observe is deprecated in this release
  • GlobalMeterProvider has been deprecated. GlobalOpenTelemetry.getMeterProvider should be used instead

SDK

  • The semantic conventions have been updated to 1.8.0

Exporter

  • The OkHttp gRPC exporters now support experimental retry
  • OkHttp dispatcher threads are now spawned as daemon threads
  • The JPMS module name for the logs exporter has been fixed
  • Metrics exporters can have temporality configured

Metrics (Alpha)

  • Some user callbacks have been wrapped to catch exceptions instead of throwing
  • MinMaxSumCount/Count aggregation has been removed
  • Empty aggregator is renamed to drop
  • Cumulative aggregations will not be aggressively dropped every collection cycle

Logs (Alpha)

  • LogDataBuilder can now take a SpanContext directly
  • SdkLogEmitterProvider.get convenience method added

SDK Extensions

  • BREAKING CHANGE: Deprecated trace incubator types (DelegatingSpanData, SpanDataBuidler) have been removed
  • BREAKING CHANGE: Deprecated ExecutorServiceSpanProcessor has been removed
  • cloud.platform is now populated in AWS Resource

New Contributors

Full Changelog: v1.9.0...v1.10.0-rc.1

Version 1.9.1

24 Nov 07:07
Compare
Choose a tag to compare

Bugfixes

  • In Prometheus exporter, only populate exemplars for Prometheus types that support them
  • Fix proto encoding of oneof values in metrics
  • Correctly cleanup OkHttp client resources when shutting down exporters

Version 1.9.0

12 Nov 04:33
82e2bc2
Compare
Choose a tag to compare

Note that due to an issue in publishing of Java artifacts, the 1.8.0 version has been skipped. The version before this one is 1.7.1.

General

  • IMPORTANT: The deprecated io.opentelemetry:opentelemetry-proto module was removed. Java bindings for OTLP protobufs are now published via opentelemetry-proto-java, and available at maven coordinates io.opentelemetry.proto:opentelemetry-proto.

API

  • New AttributesBuilder#remove(String) and AttributeBuilder#removeIf(Predicate<AttributeKey<?>>) methods improve ergonomics of modifying attributes.
  • W3CBaggagePropagator now encodes baggage values in URL encoded UTF-8 format, per the W3C Baggage Specification.

SDK

  • DelegatingSpanData has been promoted from incubation and is now available in the Trace SDK. The DelegatingSpanData class in the io.opentelemetry:opentelemetry-sdk-extension-tracing-incubator module is now deprecated.

Exporters

  • The prometheus metric exporter now includes the time_unix_nano representing the epoch timestamp when collection occurred.
  • The OTLP grpc exporters (OtlpGrpcSpanExporter, OtlpGrpcLogExporter, and OtlpGrpcMetricExporter) now include a default client implementation (okhttp). If a grpc implementation is detected on the classpath it will be used, but the exporters now work "out of the box" with no additional dependencies.

SDK Extensions

  • IMPORTANT: The deprecated io.opentelemetry:opentelemetry-sdk-extension-async-processor module was removed. This module is now published via opentelemetry-java-contrib, and available at maven coordinates io.opentelemetry.contrib:opentelemetry-disruptor-processor.
  • The ExecutorServiceSpanProcessor from the io.opentelemetry:opentelemetry-sdk-extension-tracing-incubator module is now deprecated.

Logging (alpha)

  • This release includes a rework of the Log SDK to implement OTEP-0150 and to have more symmetry to the Trace SDK. LogSink is now LogEmitter. LogEmitter instances are obtained from SdkLogEmitterProvider. Other additions include MultiLogProcessor (accessed via LogProcessor#composite(...)), SimpleLogProcessor, InMemoryLogExporter, OtlpJsonLoggingLogExporter, and SystemOutLogExporter.
  • The Log SDK maven coordinates have changed from io.opentelemetry:opentelemetry-sdk-extension-logging to io.opentelemetry:opentelemetry-sdk-logs.

Metrics (alpha)

  • The new InMemoryMetricReader() constructor has been deprecated. Use InMemoryMetricReader.create() instead.
  • A typo in Aggregation.explictBucketHistogram() has been fixed, and is now accessible at Aggregation.explicitBucketHistogram().
  • The PeriodicMetricReader#builder(MetricExporter) builder replaces PeriodicMetricReader#newMetricReaderFactory(MetricExporter, Duration).
  • Aggregation temporality is now influenced by metric exporters, and the ability to configure aggregation temporality via the view API has been removed. For example, the OTLP metric exporters support both DELTA and CUMULATIVE temporality. CUMULATIVE is the default preferred, but this can be changed either via programmatic configuration or
    via OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY if using autoconfigure.
  • The MeterProvider#get(String instrumentationName, String instrumentationVersion, String schemaUrl) method is deprecated. Use MeterProvider#meterBuilder(String instrumentationName) with corresponding builder setters instead.
  • Metric cardinality defenses have been added. Each instrument view now can have at most 2000 distinct metric streams per collection cycle. Recordings for additional streams are dropped with a diagnostic log message. Additionally, cumulative metric streams (both for synchronous and asynchronous instruments) are aggressively forgotten each time a metric export occurs that does not include recordings for a particular stream. The net effect is that there is now a cap on metric memory consumption.

Auto-configuration (alpha)

  • BREAKING CHANGE: Remove deprecated otel.experimental.exporter.otlp.protocol, otel.experimental.exporter.otlp.{signal}.protocol properties. Please use otel.exporter.otlp.protocol, otel.exporter.otlp.{signal}.protocol instead.
  • The autoconfigure module has introduced a powerful new AutoConfiguredOpenTelemetrySdkBuilder, and SPI for programmatically configuring the builder with AutoConfigurationCustomizerProvider. This provides improved ergonomics and control around autoconfigure customization.
  • Added experimental support for enabling OTLP retry support for the grpc exporters. If enabled via otel.experimental.exporter.otlp.retry.enabled, a default retry policy will be used.
  • The metric export interval of PeriodicMetricReader is now configured via otel.metric.export.interval. The existing otel.imr.export.interval property has been deprecated.
  • The SPI classloader can now be specified when using the autoconfigure module programmatically.

Version 1.7.1

03 Nov 20:18
8587b33
Compare
Choose a tag to compare

Version 1.7.1 (2021-11-03):

Exporters:

  • BUGFIX: In 1.7.0, the
    okhttp-based exporters (OtlpHttpSpanExporter, OtlpHttpMetricExporter, OtlpHttpLogExporter)
    did not properly close the okhttp response and hence would leak connections. This has been fixed in
    1.7.1.

Version 1.7.0

08 Oct 16:25
33094f4
Compare
Choose a tag to compare

Version 1.7.0 (2021-10-08):

General

  • IMPORTANT: The io.opentelemetry:opentelemetry-proto module should now be considered deprecated. It will be removed from publications in a future release. If you need Java bindings for the OTLP protobufs, they are now being published via the new opentelemetry-proto-java repository. They are at new maven coordinates: io.opentelemetry.proto:opentelemetry-proto and versioning is aligned with the released version of the protobuf definitions themselves.

SDK

Exporters

  • BREAKING CHANGE: The Jaeger gRPC exporter does not directly use the protobuf-java library for
    marshaling trace data. Along with this, the opentelemetry-exporter-jaeger artifact does not
    contain generated protobuf classes for the Jaeger API. If you were using these in your
    application, you must update your build configuration to also include the new jaeger-proto
    artifact. This artifact will not be included in a future 2.0 release of the SDK so it is
    recommended to instead generated the protobuf classes in your own build.
  • BREAKING CHANGE: The opentelemetry-exporter-otlp-http-* exporter default endpoint ports have
    changed from 4317 to 4318, in line with recent changes to the spec.
  • The OTLP gRPC exporters will now function without the grpc-java dependency, if okhttp is
    present on the classpath.
  • The (alpha) metrics that are generated by the gRPC exporters have changed slightly. They now have
    a slightly different instrumentation library name, "io.opentelemetry.exporters.otlp-grpc" and
    the names of the metrics have also changed. Now emitted are metrics with
    names otlp.exporter.seen and otlp.exported.exported. Note that it is likely this will change
    in the future as the metrics semantic conventions are more defined.

Auto-configuration (alpha)

  • BREAKING CHANGE: The behavior of otel.exporter.otlp.endpoint has changed when the protocol
    is http/protobuf. The new behavior is in line with recent changes to the specification, which states that the signal path (e.g. v1/traces or v1/metrics) is appended to the configured endpoint. Values for signal specific endpoint configuration (e.g. otel.exporter.otlp.traces.endpoint and otel.exporter.otlp.metrics.endpoint) override the generic endpoint configuration and are used as-is without modification.
  • The compression option for exporters now explicitly supports the none value, in addition to the existing gzip value.

Metrics (alpha)

  • BREAKING CHANGE: The IntervalMetricReader has been removed, and replaced with
    a PeriodicMetricReader that provides an implementation of the new MetricReader interface.
  • This release includes initial support for multiple exporters to be configured for a single SDK
    instance. See the SdkMeterProviderBuilder.registerMetricReader method for more details.
  • This release includes initial support for the SDK recording of Metric Exemplars for sampled Spans.
    See SdkMeterProviderBuilder.setExemplarFilter and the ExemplarFilter interface for
    more details.

Logging (alpha)

  • This release includes SDK extension interfaces for LogProcessors and LogExporters, and has
    implementations for batch log processing and export via OTLP. These classes are intended for usage
    in implementations of log appenders that emit OTLP log entries.

Version 1.6.0

13 Sep 06:37
12225fe
Compare
Choose a tag to compare

API

  • Various performance optimizations
    • 1 and 2 element Attributes instances now bypass some logic to reduce object allocations.
    • The result of hashCode() of AttributeKey is now cached.
    • Checks for base-16 validity of TraceId and SpanId have been optimized.
    • Internally created SpanContext instances now bypass unneeded validation.

Semantic Conventions (alpha)

  • The SemanticAttributes and ResourceAttributes classes have been updated to match the semantic
    conventions as of specification release 1.6.1.

SDK

  • The io.opentelemetry.sdk.trace.ReadableSpan interface has been expanded to include
    a getAttribute(AttributeKey) method.
  • The io.opentelemetry.sdk.trace.SpanLimits class now supports enforcing a maximum Span attribute
    length (measured in characters) on String and String-array values.

Exporters

  • The OTLP exporters have been undergone a significant internal rework. Various performance
    optimizations have been done on process of converting to the OTLP formats. Because of this, the exporter libraries
    no longer have a runtime dependency on the opentelemetry-proto artifact, or transitively protobuf. If you were
    using code from these libraries through these transitive dependencies, you will need to add them directly to your
    build.
  • The OTLP metric exporter no longer exports the deprecated metric Labels, only Attributes. This
    means that your collector MUST support at least OTLP version 0.9.0 to properly ingest metric
    data.
  • BREAKING CHANGE: The OtlpHttpMetricExporter class has been moved into
    the io.opentelemetry.exporter.otlp.http.metrics package.
  • BUGFIX: The OtlpGrpcSpanExporter and OtlpGrpcMetricExporter will now wait for the underlying
    grpc channel to be terminated when shutting down.
  • The OTLP exporters now optionally support gzip compression. It is not enabled by default.

SDK Extensions

  • The AwsXrayIdGenerator in the opentelemetry-sdk-extension-aws module has been deprecated. This
    implementation has been superseded by the one in
    the opentelemetry-java-contrib
    project and will not be maintained here going forward.

Auto-configuration (alpha)

  • The otel.traces.exporter/OTEL_TRACES_EXPORTER option now supports a comma-separated list of
    exporters.
  • The Metrics SDK will no longer be configured by default. You must explicitly request an exporter
    configuration in order to have a Metrics SDK configured.
  • BREAKING CHANGE: All SPI interfaces are now in a separate module from the autoconfiguration
    module: opentelemetry-sdk-extension-autoconfigure-spi.
  • BREAKING CHANGE: ConfigProperties and ConfigurationException have been moved to a new
    package (io.opentelemetry.sdk.autoconfigure.spi) and
    module (opentelemetry-sdk-extension-autoconfigure-spi).
  • BREAKING CHANGE: All SPI interfaces now take a ConfigProperties instance on their methods.
  • BUGFIX: Exceptions thrown during the loading of an SPI implementation class are now handled more
    gracefully and will not bubble up unless you have explicitly requested the bad implementation as
    the one to use.
  • You can now specify gzip compress for the OTLP exporters via the otel.exporter.otlp.compression
    /OTEL_EXPORTER_OTLP_COMPRESSION configuration option.
  • You can now specify maximum Span attribute length via the otel.span.attribute.value.length.limit
    /OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT configuration option.

Metrics (alpha)

  • BREAKING CHANGES: The metrics SDK has numerous breaking changes, both behavioral and in the SDK's
    configuration APIs.
    • The default aggregation for a Histogram instrument has been changed to be a Histogram, rather than a Summary.
    • Registration of Views has undergone significant rework to match the current state of the SDK specification. Please reach out on CNCF slack in the #otel-java channel, or in a github discussion if you need assistance with converting to the new Views API.
    • The OTLP exporter no longer exports the deprecated metric Labels, only Attributes. This means that your collector MUST support at least OTLP version 0.9.0 to properly ingest metric data.
    • It is no longer possible to provide custom aggregations via a View. This feature will return in the future.