Releases: open-telemetry/opentelemetry-java
Version 1.20.0
API
- Fix bug in
W3CBaggagePropagator
that caused+
characters to be decoded as whitespace
API Extensions
- DEPRECATION: the
opentelemetry-extension-aws
module containing variousAwsXrayPropagator
implementations has been deprecated for removal in next major version. A copy of the code will instead be maintained in opentelemetry-java-contrib/aws-xray-propagator and published under coordinatesio.opentelemetry.contrib:opentelemetry-aws-xray-propagator:{version}
. (#4862)
SDK
Traces
- Add graal hints for shaded dependencies, allowing
JcTools
queue to be used in graal environment. (#4832) Sampler#getDescription()
implementations are now locale independent. (#4877)- Allow SDK to run in environments prohibiting use of
sun.misc.Unsafe
. (#4902)
Metrics
- Add
toString
toAbstractInstrument
. (#4833) - Add zero bucket boundary to default explicit bucket histogram aggregation. (#4819)
Logs
- Optimize log hot path, reducing allocations significantly. (#4913)
- BREAKING: Add
Context
argument toLogRecordProcessor#onEmit
. (#4889)
Exporter
OtlpLogging{Signal}Exporter
s encode enums as numbers. (#4783)- Add
User-Agent
header ofOTel OTLP Exporter Java/{version}
to OTLP export requests. (#4784)
SDK Extensions
- WARNING:
opentelemetry-sdk-extension-aws
has been removed following its relocation to opentelemetry-java-contrib/instrumentation-aws-xray, which is published under coordinatesio.opentelemetry.contrib:opentelemetry-aws-resources:{version}
. We will push security patches to1.19.x
as needed. The latestopentelemetry-bom
will point to the latest published version, currently1.19.0
. (#4830) - WARNING:
opentelemetry-sdk-extension-resources
has been removed following its relocation to opentelemetry-java-instrumentation/instrumentation/resources/library, which is published under coordinatesio.opentelemetry.instrumentation:opentelemetry-resources:{version}
. We will push security patches to1.19.x
as needed. The latestopentelemetry-bom
will point to the latest published version, currently1.19.0
. (#4828) - Add autoconfigure support for
BatchLogRecordProcessor
. (#4811) - Autoconfigure performs percent decoding on
otel.resource.attributes
values. (#4653) - Unify compression configuration for exporters including (#4775): * Fix handling of
none
in OTLP exporters. * AddJaegerGrpcSpanExporterBuilder#setCompression(String)
. * AddZipkinSpanExporterBuilder#setCompression(String)
.
Semantic Conventions
- Add migration notes to deprecated attributes (#4840)
OpenTracing Shim
- Use
opentracing-shim
as instrumentation scope name. (#4890) - Add full support for multiple parents. (#4916)
🙇 Thank you
This release was possible thanks to the following contributors who shared their brilliant ideas and awesome pull requests:
@amouhadi
@bogdandrutu
@breedx-splk
@carlosalberto
@codeboten
@Donnerbart
@fniephaus
@jack-berg
@jkwatson
@jsuereth
@kubawach
@lgfa29
@lmonkiewicz
@lukiano
@marcingrzejszczak
@mateuszrzeszutek
@mkorzeniewski
@reyang
@rrva
@sdeleuze
@trask
Version 1.19.0
This release contains a large number of changes to the log signal following a series of significant changes to the log specification. The changes include renaming key classes like LogExporter
to LogRecordExporter
, and LogProcessor
to LogRecordProcessor
, and LogEmitter
to Logger
, and more. Additionally, a log API component has been added for emitting events and for writing log appenders. Note, the log API is not a substitute for traditional log frameworks like Log4j, JUL, SLF4J, or Logback. While the event portion of the API is intended for instrumentation authors and end users, the API for emitting LogRecords is not. See LoggerProvider and Logger javadoc for more details.
General
- Add
opentelemetry-bom
as a dependency toopentelemetry-bom-alpha
, ensuring synchronization between alpha and stable artifact versions.
API
API Extensions
- WARNING:
opentelemetry-extension-annotations
has been removed following its relocation to opentelemetry-java-instrumentation/instrumentation-annotations, which is published under coordinatesio.opentelemetry.instrumentation:opentelemetry-instrumentation-annotations:{version}
. We will push security patches to1.18.x
as needed. The latestopentelemetry-bom
will point to the latest published version, currently1.18.0
.
Logs
- Introduce log API for emitting events and writing log appenders. The artifact is available at coordinates
io.opentelemetry:opentelemetry-api-logs:1.19.0-alpha
.
SDK
Metrics
- Change exponential histogram bucket boundaries to be lower exclusive / upper inclusive, instead of lower inclusive / upper exclusive.
Logs
- BREAKING: Rename
SdkLogEmitterProvider
toSdkLoggerProvider
.OpenTelemetrySdkBuilder#setLogEmitterProvider
has changed toOpenTelemetrySdkBuilder#setLoggerProvider
.OpenTelemetrySdk#getSdkLogEmitterProvider
has changed toOpenTelemetrySdk#getSdkLoggerProvider
.AutoConfigurationCustomizer#addLogEmitterProviderCustomizer
has changed toAutoConfigurationCustomizer#addLoggerProviderCustomizer
. - BREAKING: Rename
LogEmitter
toLogger
. - BREAKING: Rename
LogExporter
toLogRecordExporter
.SystemOutLogExporter
has changed toSystemOutLogRecordExporter
.OtlpJsonLoggingLogExporter
has changed toOtlpJsonLoggingLogRecordExporter
.OtlpHttpLogExporter
has changed toOtlpHttpLogRecordExporter
.OtlpGrpcLogExporter
has changed toOtlpGrpcLogRecordExporter
.InMemoryLogExporter
has changed toInMemoryLogRecordExporter
. ConfigurableLogExporterProviderhas changed to
ConfigurableLogRecordExporterProvider`. - BREAKING: Rename
LogData
toLogRecordData
.TestLogData
has changed toTestLogRecordData
. - BREAKING: Rename
LogProcessor
toLogRecordProcessor
.BatchLogProcessor
has changed toBatchLogRecordProcessor
.SimpleLogProcessor
has changed toSimpleLogRecordProcessor
.
Exporter
- OTLP log record exporters now include dropped_attributes_count.
SDK Extensions
- Autoconfigure now supports an option to disable the SDK. If
otel.sdk.disabled=true
,AutoConfiguredOpenTelemetrySdk#getOpenTelemetrySdk()
returns a minimal (but not noop)OpenTelemetrySdk
with noop tracing, metric and logging providers. The same minimal instance is set toGlobalOpenTelemetry
. The now deprecated propertyotel.experimental.sdk.enabled
will continue to work in the same way during a transition period. - Fix
ProcessResource
directory separator to use/
or\
instead of:
or;
. - DEPRECATION: the
opentelemetry-sdk-extension-resource
module containing variousResourceProvider
implementations has been deprecated for removal in next major version. A copy of the code will instead be maintained in opentelemetry-java-instrumentation/instrumentation/resources/library and published under coordinatesio.opentelemetry.instrumentation:opentelemetry-resources:{version}
. - DEPRECATION: the
opentelemetry-sdk-extension-aws
module containing AWSResourceProvider
implementations has been deprecated for removal in next major version. A copy of the code will instead be maintained in opentelemetry-java-contrib/aws-resources and published under coordinatesio.opentelemetry.contrib:opentelemetry-aws-resources:{version}
.
OpenTracing Shim
- Fully support Baggage-only propagation.
Semantic conventions
- The semantic conventions have been updated to 1.13.0.
🙇 Thank you
This release was possible thanks to the following contributors who shared their brilliant ideas and awesome pull requests:
@anuraaga
@breedx-splk
@brunobat
@carlosalberto
@jack-berg
@jamesmoessis
@jkwatson
@jmacd
@joshua-bell-sonrai
@jsuereth
@mateuszrzeszutek
@rapphil
@SampathKumarAmex
@trask
Version 1.18.0
SDK
- Added scope attributes to
InstrumentationScopeInfo
accessible viaInstrumentationScopeInfo#getAttributes()
. Will add the ability to specify scope attributes in Meter, Tracer, and Logger in a future version. - DEPRECATION: The
InstrumentationScopeInfo#create(String, String, String)
method has been deprecated in favor ofInstrumentationScopeInfo#builer(String).setVersion(String).setSchemaUrl(String).build()
. - Optimize
Resource#merge(Resource)
by returning early if the other resource is empty.
Logs
- Fix module name of
opentelemetry-sdk-logs
by changing fromio.opentelemetry.sdk.extension.logging
toio.opentelemetry.sdk.logs
.
Testing
- Add methods to assert attributes do not contain keys via
AttributeAssert#doesNotContainKey()
.
Exporter
- Added ability to specify local IP address in
ZipkinSpanExporter
viaZipkinSpanExporterBuilder#setLocalIpAddressSupplier(Supplier<InetAddress>)
. - Upgrade to OTLP protobuf version 0.19.0.
- OTLP exporters now serialize
InstrumentationScopeInfo#getAttributes()
. - Stop publishing
opentelemetry-exporter-jaeger-proto
. Theopentelemetry-bom
will include a constraint on the last published version1.17.0
. If security issues are discovered, patches will be published to1.17.x
.
SDK Extensions
- BREAKING:
opentelemetry-sdk-extension-metric-incubator
,opentelemetry-sdk-extension-tracing-incubator
, andopentelemetry-sdk-extension-zpages
merged intoopentelemetry-sdk-extension-incubator
. - BREAKING: Move
opentelemetry-sdk-extension-jfr-events
to opentelemetry-java-contrib/jfr-events. It will now be published under the coordinatesio.opentelemetry.contrib:opentelemetry-jfr-events:{version}
. - BREAKING: Move
opentelemetry-extension-noop-api
to opentelemetry-java-contrib/noop-api. It will now be published under the coordinatesio.opentelemetry.contrib:opentelemetry-noop-api:{version}
. - Improve ECS resource detection to include
aws.ecs.container.arn
,container.image.name
,container.image.tag
,aws.ecs.container.image.id
,aws.log.group.arns
,aws.log.group.names
,aws.log.steam.names
,aws.ecs.task.arn
,aws.ecs.task.family
, andaws.ecs.task.revision
. - Fix resource
container.id
detection when using k8s with containerd v1.5.0+. - Add experimental
ConditionalResourceProvider
SPI, for conditionally applying resource providers based on current config and resource.
Micrometer shim
- BREAKING: Move
opentelemetry-micrometer1-shim
to opentelemetry-java-instrumentation/instrumentation/micrometer/micrometer-1.5/library. It will now be published under the coordinatesio.opentelemetry.instrumentation:opentelemetry-micrometer-1.5:{version}
.
🙇 Thank you
This release was possible thanks to the following contributors who shared their brilliant ideas and awesome pull requests:
@anuraaga
@bogdandrutu
@breedx-splk
@felixscheinost
@jack-berg
@jj22ee
@jkwatson
@kubawach
@mateuszrzeszutek
@mmanciop
@SampathKumarAmex
@trask
@willarmiros
@wzy531a
Version 1.17.0
API
API Extensions
- DEPRECATION: the
opentelemetry-extension-annotations
module containing@WithSpan
and@SpanAttribute
annotations has been deprecated for removal in next major version. A copy of the code will instead be maintained in opentelemetry-java-instrumentation/instrumentation-annotations and published under coordinatesio.opentelemetry.instrumentation:opentelemetry-instrumentation-annotations:{version}
.
SDK
Traces
- Add default implementation for
SpanData#getInstrumentationScopeInfo()
andReadableSpan#getInstrumentationScopeInfo()
. This fixes a previous mistake where those interfaces were extended without default implementation, a breaking change for source compatibility. Stricter checks have been added to ensure this mistake is not repeated.
Logs
- BREAKING: delete
LogDataBuilder
. A similar implementation ofLogData
calledTestLogData
has been added toopentelemetry-sdk-logs-testing
. - BREAKING: rename
LogProcessor#emit(LogData)
toLogProcessor#onEmit(ReadWriteLogRecord)
. The argument change fromLogData
toReadWriteLogRecord
allows implementations to mutate logs. To obtainLogData
, callReadWriteLogRecord#toLogData()
. - Optimize
SdkLogEmitterProvider
to return noopLogEmitter
when noLogProcessor
s are registered.
Exporter
- Split out shared and internal exporter classes from
opentelemetry-exporter-otlp-common
toopentelemetry-exporter-common
. - Add experimental support for OTLP header based authentication. To use, add a dependency on
opentelemetry-exporter-common
and callio.opentelemetry.exporter.internal.auth.Authenticator#setAuthenticatorOnDelegate(OtlpHttp{Signal}Builder, Authenticator)
. - Add ability to collect export metrics on
ZipkinSpanExporter
viaZipkinSpanExporter#setMeterProvider(MeterProvider)
. - Minor optimization to OkHttp based exporters to cache endpoint URLs. Applies to
OtlpHttp{Signal}Exporter
,OtlpGrpc{Signal}Exporter
, and more. - Fix diagnostic log message in
OtlpGrpc{Signal}Exporter
to include correct environment variables.
SDK Extensions
- Extend View file based configuration with support for specifying explicit bucket histogram bucket boundaries and exponential bucket counts.
- Extend autoconfigure SPI
AutoConfigurationCustomizerProvider
andResourceProvider
with option to specify ordering. - Add autoconfigure SPI with
ConfigurableLogExporterProvider
, allowing custom named log exporters to be provided and selected via autoconfigure. - Extend autoconfigure SPI with
AutoConfigurationCustomizer#addPropertiesCustomizer
, providing the ability examine current configuration properties and add / overwrite properties.
🙇 Thank you
This release was possible thanks to the following contributors who shared their brilliant ideas and awesome pull requests:
@anuraaga
@bogdandrutu
@breedx-splk
@chalin
@DaveCTurner
@deejgregor
@Donnerbart
@GrahamLea
@iRevive
@jack-berg
@JavaPerformance
@jkwatson
@lmolkova
@mateuszrzeszutek
@sfriberg
@trask
@trivikr
Version 1.16.0
API
- Fix bug
ImmutableKeyValuePairs
implementation that causesArrayIndexOutOfBoundsException
to be thrown under certain conditions.
SDK
Traces
- Optimize
BatchSpanProcessor
using JcTools.
Metrics
- Tighten up exponential histogram implementation for alignment with specification: Default to 160 positive and negative buckets. Remove ability to configure starting scale. Minimum number of buckets is one instead of zero.
- Allow
MetricExporter
andMetricReader
to influence default aggregation. The default aggregation is used when no registered views match an instrument.
Exporter
- Fix handling of client keys in PEM format.
- For OTLP exporters, change behavior to use
OkHttpGrpcExporter
(OkHttp implementation that doesn't use any gRPC dependencies) unlessOtlpGrpc{Signal}Builder#setChannel(ManagedChannel)
is called by user. Previously,OkHttpGrpcExporter
was used if no gRPC implementation was found on classpath. - Add support to configure default aggregation on OTLP metric exporters via
Otlp{Protocol}MetricExporterBuilder#setDefaultAggregationSelector(DefaultAggregationSelector)
.
Testing
- Add span status assertions.
SDK Extensions
- Autoconfigure properly handles non-string system properties.
- Autoconfigure normalizes hyphens
-
to periods.
when accessingConfigProperties
.
OpenTracing Shim
- Add support for span wrappers.
- Store OpenTracing
SpanContext
in OpenTracingSpan
wrapper. - Use
Baggage
of active span.
🙇 Thank you
This release was possible thanks to the following contributors who shared their brilliant ideas and awesome pull requests:
@aaron-ai
@anuraaga
@breedx-splk
@carlosalberto
@codeboten
@cuichenli
@fax4ever
@HaloFour
@jack-berg
@jkwatson
@jsuereth
@mateuszrzeszutek
@mohitmahi
@pavolloffay
@pureklkl
@trask
@xiangtianyu
@zeitlinger
Version 1.15.0
API
- Add batch callback API, allowing a single callback to record measurements to multiple metric instruments.
SDK
Metrics
SdkMeterProvider#toString()
now returns a useful string describing configuration.- Fix bug preventing proper function of Metrics SDK when multiple readers are present (#4436).
- Fix reporting intervals for metrics for delta readers (#4400).
Exporter
- BREAKING: merge all stable OTLP exporters into
opentelemetry-exporter-otlp
.opentelemetry-exporter-otlp-trace
,opentelemetry-exporter-otlp-metrics
,opentelemetry-exporter-otlp-http-trace
, andopentelemetry-exporter-otlp-http-metrics
are no longer published and their contents have been merged into a single artifact. - BREAKING: merge log OTLP exporters into
opentelemetry-exporter-otlp-logs
.opentelemetry-exporter-otlp-http-logs
is no longer published and its contents have been merged into a single artifact. - Upgrade to OTLP protobuf version 0.18.0.
- RetryInterceptor retries on
SocketTimeoutException
with no message. - Added
JaegerGrpcSpanExporterBuilder#setMeterProvider()
, enabling support of experimental jaeger span export metrics. - DEPRECATION: the
opentelemetry-exporter-jaeger-proto
module containing jaeger proto definitions and corresponding generated classes is deprecated for removal in next major version. - OTLP gRPC exporters support overriding
:authority
viaOtlpGrpc*ExporterBuilder#addHeader("host", "my-authority-override")
.
SDK Extensions
- BREAKING: Move
ConfigureableMetricExporterProvider
fromopentelemetry-sdk-extension-autoconfigure
to stableopentelemetry-sdk-extension-autoconfigure-spi
. - Autoconfigure now supports multiple values for
otel.metrics.exporter
. - Autoconfigure now supports general attribute limits, applicable to span attributes, span event attributes, span link attributes, and log attributes.
- Autoconfigure now supports an experimental option to disable the SDK. If
otel.experimental.sdk.enabled=true
,AutoConfiguredOpenTelemetrySdk#getOpenTelemetrySdk()
returns a minimal (but not noop)OpenTelemetrySdk
. The same minimal instance is set toGlobalOpenTelemetry
. - New "get or default" methods have been added to
ConfigProperties
. E.g.ConfigProperties#getString("otel.metrics.exporter", "otlp")
fetches the value for the propertyotel.metrics.exporter
and returnsotlp
if it is not set. - Fix bug in
ContainerResource
provider that caused it to throw an exception in some instances when containerd is used.
Micrometer shim
- Cache descriptions such that metrics with the same name use the first seen description.
🙇 Thank you
This release was possible thanks to the following contributors who shared their brilliant ideas and awesome pull requests:
@anuraaga
@breedx-splk
@chenjazz
@cyrille-leclerc
@donce
@Donnerbart
@evantorrie
@jack-berg
@jkwatson
@jonahaapala
@jsuereth
@kubawach
@laurit
@marcalff
@mateuszrzeszutek
@nicklocaso
@Oberon00
@pkgonan
@rupinder10
@trask
@wallezhang
Version v1.14.0
The metrics SDK is stable! New stable artifacts include:
io.opentelemetry:opentelemetry-sdk-metrics
(also now included inio.opentelemetry:opentelemetry-sdk
)io.opentelemetry:opentelemetry-exporter-otlp-metrics
(also now included inio.opentelemetry:opentelemetry-exporter-otlp
)io.opentelemetry:opentelemetry-exporter-otlp-http-metrics
- Metrics testing components have been moved from
io.opentelemetry:opentelemetry-sdk-metrics-testing
to the stableio.opentelemetry:opentelemetry-sdk-testing
.
While the API of the metrics SDK is now stable, there are a couple of known issues that will be addressed in the next release:
- The start time is incorrect for delta metrics when the first recording for a set of attributes occurs after the first collections (#4400).
- Registering multiple readers results in incorrect metrics (#4436).
SDK
Traces
- Fix bug where non-runtime exception breaks
BatchSpanProcessor
. - Fix bug preventing attribute limits from applying to exception events.
Logs
- BREAKING: Drop deprecated methods referencing
InstrumentationLibraryInfo
from Log SDK.
Metrics
- Instrument name is validated. If invalid, a warning is logged and a noop instrument is returned.
- Default unit is empty instead of
1
. If an invalid unit is set, a warning is logged and empty is used. - Ensure symmetry between type of
PointData
and their type of exemplars (double or long). - BREAKING: Rename
MetricReader#flush()
toMetricReader#forceFlush()
. - Introduce
AggregationTemporalitySelector
interface for selecting aggregation temporality based on instrument.MetricReader
andMetricExporter
extendAggregationTemporalitySelector
.
SDK Extensions
- BREAKING: Remove deprecated option to specify temporality with
otel.exporter.otlp.metrics.temporality
. Useotel.exporter.otlp.metrics.temporality.preference
instead. - Log warning when
AwsXrayPropagator
can't identify parent span id. - Fix jaeger remote sampling bug preventing correct parsing of 0-probability sampling strategies.
Exporter
- Fix prometheus exporter formatting bug when there are no attributes.
- Ensure prometheus metrics with the same name are serialized as a group.
- BREAKING:
OtlpHttpMetricExporterBuilder
andOtlpGrpcMetricExporterBuilder
configure aggregation temporality via#setAggregationTemporalitySelector(AggregationTemporalitySelector)
.
Testing
- BREAKING: Metrics testing components added to stable
io.opentelemetry:opentelemetry-sdk-testing
module, includingInMemoryMetricReader
,InMemoryMetricExporter
, andMetricAssertions.assertThat(MetricData)
has been moved toOpenTelemetryAssertions.assertThat(MetricData)
. - BREAKING: The patterns for metrics assertions have been adjusted to better align with assertj conventions. See #4444 for examples demonstrating the change in assertion patterns.
- BREAKING: Metric assertion class names have been simplified.
- Add
TraceAssert.hasSpansSatisfyingExactlyInAnyOrder(..)
methods.
Micrometer shim
- Instrumentation scope name changed to
io.opentelemetry.micrometer1shim
.
Project tooling
- Many improvements to the build and release workflows. Big thanks to @trask for driving standardization across
opentelemetry-java
,opentelemetry-java-instrumentation
, andopentelemetry-java-contrib
!
🙇 Thank you
This release was possible thanks to the following contributors who shared their brilliant ideas and awesome pull requests:
@anuraaga
@arminru
@cbos
@chrismgrayftsinc
@gfelbing
@jack-berg
@jkwatson
@jsuereth
@kubawach
@laurit
@mateuszrzeszutek
@middlewareman
@OliverO2
@trask
@wallezhang
@ZQiannnn
Version v1.13.0
Although we originally intended 1.13.0 to be the first stable release of the metrics SDK, we've postponed it out of caution due to a large number of changes in both the metrics SDK specification and the java implementation. This release should be considered a release candidate for the metrics SDK. There are several notable changes mentioned in the Metrics section. Additionally, please note that the Auto-configuration module now enables metric export by default via OTLP, i.e. by default otel.metrics.exporter
is set to otlp
instead of none
.
API
- Fix
TraceStateBuilder
reuse bug.
SDK
InstrumentationScopeInfo
replacesInstrumentationLibraryInfo
. Methods returningInstrumentationLibraryInfo
are deprecated.- Add
ResourceBuilder#removeIf(Predicate)
method for symmetry withAttributesBuilder
.
Traces
- Span events that record exceptions are instances of
ExceptionEventData
.
Metrics
- BREAKING: Remove
MetricReader
factory pattern:MetricReader
instances, rather thanMetricReaderFacotry
, are registered withSdkMeterProviderBuilder
. For example:SdkMeterProvider.builder().registerMetricReader(PeriodicMetricReader.builder(exporter).build())
.MetricReader
does not support custom implementations. Built-in readers include:PeriodicMetricReader
,PrometheusHttpServer
, and for testing,InMemoryMetricReader
.
- BREAKING: Several breaking changes metrics to the
Data
classes:MetriaData
returnsInstrumentationScopeInfo
instead ofInstrumentationLibraryInfo
.MetricData
factories classes have been moved internal.- Exemplar data classes have been migrated to interfaces, and deprecated methods have been removed.
- PointData classes have been migrated to interfaces.
ValueAtPercentile
has been converted toValueAtQuantile
to reflect specification.- Drop
HistogramPointData
utility methods for finding bucket bounds.
- BREAKING: Move
InstrumentType
andInstrumentValueType
toio.opentelemetry.sdk.metrics
package. - BREAKING: Several breaking changes to the
InstrumentSelector
/View
APIs:InstrumentSelector
/View
and corresponding builders have been moved toio.opentelemetry.sdk.metrics
package.InstrumentSelector
meter selection criteria has been inlined andMeterSelector
has been removed.InstrumentSelector
criteria has been reduced to reflect specification. All fields are exact match, except instrument name which accepts wildcard*
and?
matches.- If
InstrumentSelectorBuilder#build()
is called without any selection criteria, an exception will be thrown. View
baggage appending attribute processor has been removed. Available for experimental use viaSdkMeterProviderUtil#appendFilteredBaggageAttributes
.- Concept of
AttributeProcessor
has been moved internal. - If a View configures an aggregation that is not compatible with the instrument type of a selected instrument, a warning is logged and the View is ignored.
- BREAKING: Remove deprecated
Aggregation#histogram()
. UseAggregation#explicitBucketHistogram()
instead. - Relax behavior around conflicting instruments. If you register two instruments with the same name but conflicting description, unit, type, or value type, both will be exported and a warning will be logged indicating the metric identity conflict. Previously, the second registered would have produced a noop instrument. Likewise, if two views are registered that produce instruments with conflicting names, or if an instrument conflicts with a registered view's name, both will be exported and a warning will be logged indicating the view conflict.
- BREAKING: Exemplars have been moved to internal. By default, exemplars are enabled with
with_sampled_trace
filter. This can be adjusted via experimental APIs viaSdkMeterProviderUtil#setExemplarFilter
. - BREAKING:
MetricExporter#getPreferredTemporality()
has been removed and replaced withgetAggregationTemporality(InstrumentType)
, which allows exporters to dictate the aggregation temporality on a per-instrument basis.MetricExporter#alwaysCumulative(InstrumentType)
andMetricExporter#deltaPreferred(Instrument)
are provided as utilities representing common configurations. - Callbacks associated with asynchronous instruments with multiple matching views will only be called once per collection, instead of once per view per collection.
PeriodicMetricReader
will no longer callMetricExporter#export
if no metrics are available.- BREAKING:
SdkMeterProviderBuilder#setMinimumCollectionInterval
has been removed. Available for experimental use viaSdkMeterProviderUtil#setMinimumCollectionInterval
. - Introduce lock ensuring that metric collections occur sequentially.
- Add min and max to
HistogramDataPoint
.
Logs
- BREAKING: Deprecated name field has been removed.
Exporter
- Upgrade to OTLP protobuf version 0.16.0.
- Jaeger and Zipkin exporters export
otel.scope.name
andotel.scope.version
, in addition tootel.library.name
andotel.library.version
which are retained for backwards compatibility. - BREAKING: Remove deprecated
PrometheusCollector
. UsePrometheusHttpServer
instead. - Add support for mTLS authentication to OTLP and jaeger exporters.
- Only log once if OTLP gRPC export receives
UNIMPLEMENTED
. - Jaeger remote sampler sets appropriate sampling strategy type if not provided in response.
- BREAKING: The
setPreferredTemporality
method has been removed fromOtlpGrpcMetricExporterBuilder
andOtlpHttpMetricExporterBuilder
. UsesetAggregationTemporality(Function<InstrumentType, AggregationTemporality>)
instead.
SDK Extensions
- IMPORTANT: Auto-configuration sets
otel.metrics.exporter
tootlp
instead ofnone
, enabling metric export by default. - Auto-configuration added
otel.java.enabled.resource-providers
property for opting into specific resource providers.
Micrometer shim
- Bring micrometer shim over from
opentelemetry-java-instrumentation
. Artifact is available at maven coordinatesio.opentelemetry:opentelemetry-micrometer1-shim:1.13.0-alpha
. - Add support for "prometheus mode", enabling better naming when exporting micrometer metrics via prometheus.
Testing
- Add int overload for equalTo attribute assertion.
- Add
SpanDataAssert.hasAttribute
methods.
🙇 Thank you
This release was possible thanks to the following contributors who shared their brilliant ideas and awesome pull requests:
@anuraaga
@bogdandrutu
@breedx-splk
@HaloFour
@jack-berg
@jkamon
@jkwatson
@jsuereth
@kubawach
@mateuszrzeszutek
@mdii
@pokusak
@Rocksnake
@trask
@wallezhang
@zeitlinger
Version 1.12.0
This release includes many breaking changes to the metrics SDK as we move towards marking its first stable release.
Notably, if you configure metric View
s or have written a custom metric exporter, many of the classes and methods will
have been moved or renamed. There are still a few remaining cleanups targeted for the next release after which there
should not be many. Thanks for bearing with us on this.
API
- New methods have been added to
Context
to propagate context for common Java 8 callback types AttributesBuilder.put
now supports vararg versions for lists withAttributeKey
- Multiple metric async callbacks can be registered for the same instrument, and callbacks can be removed
SDK
- An issue with Android desugaring of the SDK has been worked around
- EXPERIMENTAL: Support for disabling resource keys with
OTEL_EXPERIMENTAL_RESOURCE_DISABLED_KEYS
- Fixed handling of
schemaUrl
inResource.toBuilder()
- BREAKING: Many changes to
Data
classes used during export - BREAKING: Many view configuration methods have been removed
Metrics
- APIs deprecated in the previous release have been removed
- DEPRECATION:
PrometheusCollector
for exporting OpenTelemetry metrics with the prometheus client library has been deprecated - EXPERIMENTAL: File-based configuration of views
- Prometheus exporter now supports JPMS modules
Logs
- DEPRECATION:
LogData.getName
has been deprecated for removal
Version 1.11.0
General
- Examples moved to opentelemetry-java-docs
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
andInMemoryMetricReader
have been removed. Use versions inopentelemetry-sdk-metrics-testing
instead - Deprecate
InstrumentType
valuesOBSERVABLE_SUM
andOBSERVABLE_UP_DOWN_SUM
in favor ofOBSERVABLE_COUNTER
andOBSERVABLE_UP_DOWN_COUNTER
Logs
- Add ability to configure log attribute limits via
SdkLogEmitterProviderBuilder#setLogLimits(..)
SDK Extensions
- Auto-configuration added options to
AutoConfigurationCustomizer
for customizingSdkTracerProviderBuilder
,SdkMeterProviderBuilder
,MetricExporter
,SdkLogEmitterProviderBuilder
, andLogExporter
- 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
onBatchLogProcessor
andBatchSpanProcessor
- Auto-configuration deprecated
SdkTracerProviderConfigurer
in favor ofAutoConfigurationCustomizer#addTracerProviderCustomizer(..)