Version 1.9.0
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 coordinatesio.opentelemetry.proto:opentelemetry-proto
.
API
- New
AttributesBuilder#remove(String)
andAttributeBuilder#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. TheDelegatingSpanData
class in theio.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
, andOtlpGrpcMetricExporter
) now include a default client implementation (okhttp
). If agrpc
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 coordinatesio.opentelemetry.contrib:opentelemetry-disruptor-processor
. - The
ExecutorServiceSpanProcessor
from theio.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 nowLogEmitter
.LogEmitter
instances are obtained fromSdkLogEmitterProvider
. Other additions includeMultiLogProcessor
(accessed viaLogProcessor#composite(...)
),SimpleLogProcessor
,InMemoryLogExporter
,OtlpJsonLoggingLogExporter
, andSystemOutLogExporter
. - The Log SDK maven coordinates have changed from
io.opentelemetry:opentelemetry-sdk-extension-logging
toio.opentelemetry:opentelemetry-sdk-logs
.
Metrics (alpha)
- The
new InMemoryMetricReader()
constructor has been deprecated. UseInMemoryMetricReader.create()
instead. - A typo in
Aggregation.explictBucketHistogram()
has been fixed, and is now accessible atAggregation.explicitBucketHistogram()
. - The
PeriodicMetricReader#builder(MetricExporter)
builder replacesPeriodicMetricReader#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
andCUMULATIVE
temporality.CUMULATIVE
is the default preferred, but this can be changed either via programmatic configuration or
viaOTEL_EXPORTER_OTLP_METRICS_TEMPORALITY
if using autoconfigure. - The
MeterProvider#get(String instrumentationName, String instrumentationVersion, String schemaUrl)
method is deprecated. UseMeterProvider#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 useotel.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 withAutoConfigurationCustomizerProvider
. This provides improved ergonomics and control around autoconfigure customization. - Added experimental support for enabling OTLP retry support for the
grpc
exporters. If enabled viaotel.experimental.exporter.otlp.retry.enabled
, a default retry policy will be used. - The metric export interval of
PeriodicMetricReader
is now configured viaotel.metric.export.interval
. The existingotel.imr.export.interval
property has been deprecated. - The SPI classloader can now be specified when using the autoconfigure module programmatically.