Releases: open-telemetry/opentelemetry-java
Version 0.17.1 (RC)
This release addresses a minor issue where the old ResourceProvider class before moving to the autoconfigure module had not been deleted, so if you have a custom ResourceProvider, you would not get the intended compilation failure while your attributes would not actually be reflected.
There is no other difference or any change in behavior - if you are already using 0.17.0 you do not need to update.
Version 0.17.0 (RC)
0.17.0 is planned to be the final release before 1.0.0. Due to some confusion, we have consistently wavered on the goal of API stability and apologize for it. All maintainers are committed to making sure there are no further breaking changes unless a critical user facing bug or security issue is found. This is it. If you have trouble updating any code, let us know - if it's open source we can even make the change.
General
Note: In an effort to accelerate our work toward a 1.0.0 release, we have skipped the deprecation phase
on a number of breaking changes. We apologize for the inconvenience this may have caused. We are very
aware that these changes will impact users. If you need assistance in migrating from previous releases,
please open a discussion topic at
https://github.com/open-telemetry/opentelemetry-java/discussions.
Many classes have been made final that previously were not. Please reach out if you have a need to
provide extended functionality, and we can figure out how best to solve your use-case.
API
☢️Breaking Changes
TraceStateBuilder.set(String, String)has been renamed toTraceStateBuilder.put(String, String).BaggageBuilder.setParent()andBaggageBuilder.setNoParent()have been removed from the Baggage APIs.
In addition, Baggage will no longer be implicitly generated from Baggage that is in the current context. You now must explicitly
get theBaggageinstance from theContextand calltoBuilder()on it in order to get the entries pre-populated in your builder.TextMapPropagator.SetterandTextMapPropagator.Getterhave been moved to the top level and renamed to
TextMapSetterandTextMapGetterrespectively.OpenTelemetry.getDefault()has been renamed toOpenTelemetry.noop().OpenTelemetry.getPropagating()has been renamed toOpenTelemetry.propagating().TracerProvider.getDefault()has been renamed toTracerProvider.noop()Tracer.getDefault()has been removed.TraceId.getTraceIdRandomPart(CharSequence)has been removed.- The
B3Propagator.getInstance()has been renamed toB3Propagator.injectingSingleHeader(). - The
B3Propagator.builder()method has been removed. As a replacement, you can useB3Propagator.injectingMultiHeaders()directly.
SDK
☢️Breaking Changes
- The SPI for configuring Resource auto-populators has been removed from the SDK and moved to the
opentelemetry-sdk-extension-autoconfiguremodule.
This means thatResource.getDefault()will no longer be populated via SPI, but only include the bare minimum values from the SDK itself.
In order to get the auto-configured Resource attributes, you will need to use theopentelemetry-sdk-extension-autoconfiguremodule directly. InstrumentationLibraryInfo.getEmpty()has been renamed toInstrumentationLibraryInfo.empty().Resource.getEmpty()has been renamed toResource.empty().- When specifying the endpoints for grpc-based exporters, you now are required to specify the protocol. Hence, you must include
thehttp://orhttps://in front of your endpoint. - The option on
SpanLimitsto truncate String-valued Span attributes has been removed (this is still pending in the specification). - The
InMemoryMetricsExporterhas been removed from theopentelemetry-sdk-testingmodule.
🌟Miscellaneous
- The default values for SpanLimits have been changed to 128, from 1000, to match the spec.
Extensions
☢️Breaking Changes
- In the
opentelemetry-sdk-extension-autoconfiguremodule, we have changed the system property used to exclude some Resource auto-populators to be
otel.java.disabled.resource-providersinstead ofotel.java.disabled.resource_providers. - In the
opentelemetry-sdk-extension-autoconfiguremodule, you now specify theOtTracePropagatorwith the"ottrace"option, rather than"ottracer". - In the
opentelemetry-sdk-extension-autoconfiguremodule, the default exporters are now set to be"otlp", as required by the 1.0.0 specification. - In the
opentelemetry-sdk-extension-autoconfiguremodule, the default propagators are now set to be"tracecontext,baggage", as required by the 1.0.0 specification. - The
CommonPropertiesclass has been removed from theopentelemetry-sdk-extension-otprotomodule.
Metrics (alpha)
☢️API
Meter.getDefault()has been removed.MeterProvider.getDefault()has been renamed toMeterProvider.noop().
Version 0.16.0 (RC)
0.16.0 is planned to be the final release before 1.0.0. It is a release candidate and reflects our final API, no further breaking changes will be made unless a critical user-facing bug or security issue is found.
This release contains final cleanups of the API - apologies for any needed updates but this is it.
General
Note: In an effort to accelerate our work toward a 1.0.0 release, we have skipped the deprecation phase
on a number of breaking changes. We apologize for the inconvenience this may have caused. We are very
aware that these changes will impact users. If you need assistance in migrating from previous releases,
please open a discussion topic at
https://github.com/opentelemetry/opentelemetry-java/discussions.
☢️ Breaking Changes
- Methods and classes deprecated in 0.15.0 have been removed.
API
☢️Breaking Changes
- The
Span.Kindenum has been moved to the top level, and namedSpanKind. DefaultOpenTelemetryis no longer a public class. If you need the functionality previously provided by this
implementation, it can be accessed via new static methods on theOpenTelemetryinterface itself.- The
TraceFlagsinterface has been re-introduced. This is now used, rather than a barebytewherever
trace flags is used. In particular,SpanContext.create(),SpanContext.createFromRemoteParent()now require
aTraceFlagsinstance, andSpanContext.getTraceFlags()returns aTraceFlagsinstance. - The names of static methods on
TraceFlagshave been normalized to match other similar classes, and now
returnTraceFlagsinstead ofbytewhere appropriate. - The
Labelsinterface and related classes have been moved into the alpha metrics modules and repackaged. TraceId.copyHexInto(byte[] traceId, char[] dest, int destOffset)has been removed.SpanContext.getTraceIdAsHexString()has been renamed toSpanContext.getTraceId()SpanContext.getSpanIdAsHexString()has been renamed toSpanContext.getSpanId()BaggageEntry.getEntryMetadata()has been renamed toBaggageEntry.getMetadata()BaggageConsumerhas been removed in favor of a standardjava.util.function.BiConsumer<String, BaggageEntry>TraceFlags.isSampledFromHex(CharSequence src, int srcOffset)has been removed.SpanIdandTraceIdmethods that had aStringparameter now acceptCharSequence
and assume the id starts at the beginning.SpanId.getSize()andTraceId.getSize()have been removed.SpanId.bytesFromHex()has been removed.SpanId.asLong(CharSequence)has been removed.SpanId.asBytes(CharSequence)has been removed.SpanId.getHexLength()has been renamed toSpanId.getLength()SpanId.bytesToHex()has been renamed toSpanId.fromBytes()TraceId.bytesFromHex()has been removed.TraceId.traceIdLowBytesAsLong(CharSequence)has been removed.TraceId.traceIdHighBytesAsLong(CharSequence)has been removed.TraceId.asBytes(CharSequence)has been removed.TraceId.getHexLength()has been renamed toTraceId.getLength()TraceId.bytesToHex()has been renamed toTraceId.fromBytes()StrictContextStoragehas been made private. Use -Dio.opentelemetry.context.enableStrictContext=true` to enable it
📈Enhancements
- The
W3CTraceContextPropagatorclass now directly implements theTextMapPropagatorinterface. - The
OpenTelemetryinterface now has agetDefault()method which will return a completely no-op implementation. - The
OpenTelmmetryinterface now has agetPropagating(ContextPropagators propagators)method which will
return an implementation that contains propagators, but is otherwise no-op.
🌟Misc Notes
- The internal
StringUtilsclass has had metrics-related methods removed from it. But, you weren't using
internal classes, were you? - The internal
AbstractWeakConcurrentMapclass has been made non-public. See the line above about internal classes.
Extensions
☢️ Breaking Changes
- The
OtTracerPropagatorhas been renamed toOtTracePropagatorin the trace-propagators extension module. AwsXrayPropagatorhas been moved to theopentelemetry-extension-awsartifact
SDK
☢️ Breaking Changes
TraceConfighas been renamed toSpanLimitsand relocated to theio.opentelemetry.sdk.tracingpackage.
All related method names have been renamed to match.SpanData.getTraceState()has been removed. The TraceState is still available via the SpanContext accessor.SpanData.isSampled()has been removed. The isSampled property is still available via the SpanContext accessor.
📈Enhancements
SpanDatanow directly exposes the underlyingSpanContextinstance.
SDK Extensions
☢️Breaking Changes
- In the
opentelemetry-autoconfiguremodule, three environment variables/system properties
have been renamed to match the spec:OTEL_TRACE_EXPORTER/otel.trace.exporterhas been replaced withOTEL_TRACES_EXPORTER/otel.traces.exporterOTEL_TRACE_SAMPLER/otel.trace.samplerhas been replaced withOTEL_TRACES_SAMPLER/otel_traces_samplerOTEL_TRACE_SAMPLER_ARG/otel.trace.sampler.arghas been replaced withOTEL_TRACES_SAMPLER_ARG/otel.traces.sampler.arg
📈Enhancements
- The
opentelemetry-autoconfiguremodule now supports using non-millisecond values for duration &
interval configuration options. See the javadoc on theio.opentelemetry.sdk.autoconfigure.ConfigProperties.getDuration(String)
method for details on supported formats. - The
opentelemetry-autoconfiguremodule now provides automatic SPI-based parsing of theOTEL_RESOURCE_ATTRIBUTESenv var
(and the correspondingotel.resource.attributessystem property). If you include this module on your
classpath, it will automatically update theResource.getDefault()instance with that configuration.
Metrics (alpha)
API
- The
Labelsinterface has been moved into the metrics API module and repackaged into the
io.opentelemetry.api.metrics.commonpackage.
Version 0.15.0 (RC)
0.15.0 is planned to be the final release before 1.0.0. It is a release candidate and should mostly reflect our final API.
General
☢️ Breaking Changes
- Methods and classes deprecated in 0.14.x have been removed.
🌟 Miscellaneous
- The
opentelemetry-semconvmodule has been marked as-alphaand removed from the bom. This was done because the OpenTelemetry project has not decided on a specification for stability of semantic conventions or the specific telemetry produced by
instrumentation. - The items in the
io.opentelemetry.semconv.trace.attributes.SemanticAttributeswhich were previously
generated form the Resource semantic conventions have been deprecated. Please use the ones in the new
io.opentelemetry.semconv.resource.attributes.ResourceAttributesclass.
📈 Enhancements
- A new
io.opentelemetry.semconv.resource.attributes.ResourceAttributeshas been introduced to hold the
generated semantic attributes to be used in creatingResources.
🌟 Miscellaneous
- The SemanticAttributes class has been moved to a new module:
opentelemetry-semconvand repackaged into a new package:
io.opentelemetry.semconv.trace.attributes. The oldSemanticAttributesclass will be removed in the next release. - The SPI interfaces for OpenTelemetry have been deprecated. We are moving to a new auto-configuration approach with the
new SDK auto-configuration module:io.opentelemetry.sdk.autoconfigure. This module should be considered the officially
supported auto-configuration library moving forward.
SDK
🛠️ Bugfixes:
- The Jaeger exporters will now properly populate the process service name from the Resource service.name attribute.
☢️ Breaking Changes
SamplingResult.Decisionhas been removed in favor of theio.opentelemetry.sdk.trace.samplers.SamplingDecisiontop-level class.Resource.merge(Resource)now will resolve conflicts by preferring theResourcepassed in, rather than the original.- The default Resource (accessible via
Resource.getDefault()) now includes a fallbackservice.nameattribute. The implication
of this is that exporters that have configured fallback service names will only use them if the SDK is intentionally
configured with a Resource that does not utilize the default Resource for its underlying Resource data. - The
Sampleris now specified when building theSdkTracerProviderdirectly, rather than being a part of the TraceConfig.
📈 Enhancements
Resource.getDefault()now includes a fallbackservice.nameattribute. Exporters that require aservice.name
should acquire the fallback from the default resource, rather than having it configured in.
🌟 Miscellaneous
- Going forward, OTLP exporter endpoint specifications must include a scheme, either
http://orhttps://.
We will support endpoints without schemes until the next release, at which point not providing a scheme will generate
an error when trying to use them. This applies to the use of system properties, environment variables, or programmatic
specifications of the endpoints. - The
exportOnlySampledconfiguration of theBatchSpanProcessorhas been deprecated and will be removed in the next
release. - The
io.opentelemetry.sdk.resources.ResourceAttributeshas been deprecated and will be removed in the next release.
Please use the newio.opentelemetry.semconv.resource.attributes.ResourceAttributesclass in theopentelemetry-semconv
module. - The serviceName configuration option for the Jaeger and Zipkin exporters has been deprecated. In the next release, those
configuration options will be removed, and the fallbackservice.namewill always be pulled from the default Resource.
Extensions
☢️ Breaking Changes
- The
otel.bsp.schedule.delay.millisenv var/system property configuration option for the batch span processor has been renamed to
otel.bsp.schedule.delayto match the specification. - The
otel.bsp.export.timeout.millisenv var/system property configuration option for the batch span processor has been renamed to
otel.bsp.export.timeoutto match the specification.
📈 Enhancements
- The
opentelemetry-sdk-extension-autoconfiguremodule will now additionally register the auto-configured
SDK as the instance ofGlobalOpenTelemetrywhen used. - The
opentelemetry-sdk-extension-autoconfiguremodule now supports theotel.exporter.otlp.certificateconfiguration
property for specifying a path to a trusted certificate for the OTLP exporters.
Version 0.14.1
Release notes
This patch release fixes the publishing of the opentelemetry-bom artifact, which was mis-published in v0.14.0
For details about what was changed from 0.13.1, please see the release notes for 0.14.0.
Version 0.14.0
Note : This release has been superceded by 0.14.1
This release had issues with publishing the opentelemetry-bom to maven central. This was addressed in v0.14.1.
General
- Several more modules have been updated to have
-alphaappended on their versions:opentelemetry-sdk-extension-jfr-eventsopentelemetry-sdk-extension-async-processoropentelemetry-sdk-extension-loggingopentelemetry-sdk-extension-zpagesopentelemetry-sdk-exporter-prometheusopentelemetry-sdk-exporter-tracing-incubatoropentelemetry-opentracing-shimopentelemetry-opencensus-shim
API
☢️ Breaking Changes
- Code that was deprecated in
0.13.0has been removed from the project.- Metrics interfaces are no longer available as a part of the
opentelemetry-pomor from theopentelemetry-apimodules.
To access the alpha metrics APIs, you will need to explicitly add them as a dependency. OpenTelemetry.setPropagators()has been removed. You should instead create your
OpenTelemetryimplementations with the Propagators preset, via the various builder options. For example, use
DefaultOpenTelemetry.builder().setPropagators(propagators).build()to configure your no-sdk implementation.- The
OpenTelemetry.builder()and theOpenTelemetryBuilderinterface have been removed.
The builder functionality is now only present on individual implementations of OpenTelemetry. For instance, the
DefaultOpenTelemetryclass has a builder available.
- Metrics interfaces are no longer available as a part of the
📈 Enhancements
- The SemanticAttributes have been updated to the latest version of the specification, as of January 7th, 2021.
🌟 Miscellaneous
- The SemanticAttributes class has been moved to a new module:
opentelemetry-semconvand repackaged into a new package:
io.opentelemetry.semconv.trace.attributes. The oldSemanticAttributesclass will be removed in the next release. - The SPI interfaces for OpenTelemetry have been deprecated. We are moving to a new auto-configuration approach with the
new SDK auto-configuration module:io.opentelemetry.sdk.autoconfigure. This module should be considered the officially
supported auto-configuration library moving forward.
SDK
🛠️ Bugfixes:
- Environment variables/system properties that are used to set extra headers for the OTLP exporters have been fixed to now
split on commas, rather than semicolons. This has been brought in line with the specification for these environment
variables. This includesotel.exporter.otlp.span.headers,otel.exporter.otlp.metric.headers, andotel.exporter.otlp.headers. - Passing a null span name when creating a span will no longer cause a NullPointerException. Instead, a default span name will be
provided in place of the missing name.
☢️ Breaking Changes
- The deprecated
SpanData.Link.getContext()method has been removed in favor ofSpanData.Link.getSpanContext(). - The
TracerProviderFactorySdkSPI class has been renamed toSdkTracerProviderFactory. - The
OpenTelemetrySdkBuilder.build()method has been renamed toOpenTelemetrySdkBuilder.buildAndRegisterGlobal().
Thebuild()method still exists, but no longer sets the instance on theGlobalOpenTelemetrywhen invoked. - The
SdkTracerManagement.shutdown()method now returnsCompletableResultCodewhich can be used to wait
asynchronously for shutdown to complete. - The
sampling.probabilitysampling attribute previously generated by theTraceIdRatioBasedSampleris no longer
generated, as it was not conformant with the specifications. - Inner classes of
SpanDatahave been moved to the top level
📈 Enhancements
- The
OtlpGrpcSpanExporternow supports setting trusted TLS certificates for secure communication with the collector. - A new module for supporting auto-configuration of the SDK has been added. The new module,
io.opentelemetry.sdk.autoconfigurewill
be the new path for auto-configuration of the SDK, including via SPI, environment variables and system properties. - The
TraceConfigclass now exposes abuilder()method directly, so you don't need to get the default then calltoBuilder()on it. - The OTLP protobuf definitions were updated to the latest released version:
0.7.0.
Both theSpanand (alpha)Metricexporters were updated to match. - Timeouts in the exporters can now be specified with
java.util.concurrent.TimeUnitandjava.time.Durationbased configurations,
rather than requiring milliseconds. - Objects that can be shutdown now also implement
Closeable StatusData.isUnsetandStatusData.isOkhave been deprecated and will be removed in the following release
🌟 Miscellaneous
SdkTracerProvider.updateActiveTraceConfig()andSdkTracerProvider.addSpanProcessor()have been deprecated. The methods
will be removed in the next release.- All existing auto-configuration mechanisms have been deprecated in favor of using the new
io.opentelemetry.sdk.autoconfigure
module. The existing ones will be removed in the next release. - The methods with the term "deadline" has been deprecated in the configuration of the grpc-based exporters (OTLP and Jaeger) in favor
of the word "timeout". The deadline-named methods will be removed in the next release. - The
StringUtilsclass in theopentelemetry-extension-trace-propagatorsextension module has been deprecated
and will be made non-public in the next release.
Extensions
☢️ Breaking Changes
- The ZPages extension now exposes its SpanProcessor implementation. To use it, you will need to add it to your
SDK implementation directly, rather than it adding itself to the global SDK instance. - The JaegerRemoteSampler builder patterns have been changed and updated to more closely match the rest
of the builders in the project.
🛠️ Bugfixes:
- The JaegerRemoteSampler now uses the ParentBased sampler as the basis for any sampling that is done.
🌟 Miscellaneous
- The
AwsXrayIdGeneratorconstructor has been deprecated in favor of using a simplegetInstance()singleton, since
it has no state. - The
TraceProtoUtilsclass in theopentelemetry-sdk-extension-otprotomodule has been deprecated and
will be removed in the next release.
Version 0.13.1
BUGFIX patch release
- The misconfigured poms from 0.13.0 have been corrected.
Notes:
An easy way to see all the latest (non-alpha) dependencies is to examine the pom from the opentelemetry-bom module: https://search.maven.org/artifact/io.opentelemetry/opentelemetry-bom/0.13.1/pom
Version 0.13.0
KNOWN ISSUE:
This release is mostly unusable due to this issue with mis-configured pom files for the api and sdk:
#2345
We will be releasing version 0.13.1 as soon as we have a fix ready.
General
- Starting with 0.13.0, all unstable modules (the 2 metrics modules for now) will have a
-alphaappended to their
base version numbers to make it clear they are not production ready, and will not be when we get to releasing 1.0.
See our Rationale document for details.
API
☢️ Breaking Changes
- The
Labels.ArrayBackedLabelsBuilderclass has been made non-public.
You can still access theLabelsBuilderfunctionality via theLabels.builder()method. - Methods deprecated in the 0.12.0 release have been removed or made non-public:
- The
HttpTraceContextclass has been removed. - The
toBuilder()method on the OpenTelemetry interface has been removed. - The
Attributes.builder(Attributes)method has been removed in favor ofAttributes.toBuilder(Attributes). - The
DefaultContextPropagatorsclass has made non-public. - The
TraceMultiPropagatorbuilder has been removed in favor of a simple factory method. - The
value()method on theStatusCodeenum has been removed. - The Baggage
EntryMetadataclass has been removed in favor of theBaggageEntryMetadatainterface. - The
setCallback()method on the asynchronous metric instruments has been removed.
- The
- Several public classes have been made
final.
📈 Enhancements
- An
asMapmethod has been added to theLabelsinterface, to expose them as ajava.util.Map. - You can now enable strict Context verification via a system property (
-Dio.opentelemetry.context.enableStrictContext=true)
Enabling this mode will make sure that allScopes that are created are closed, and generate log messages if they
are not closed before being garbage collected. This mode of operation is CPU intensive, so be careful before
enabling it in high-throughput environments that do not need this strict verification. See the javadoc on the
io.opentelemetry.context.Contextinterface for details. - Several of the methods on the
Spaninterface have been given default implementations. - The Semantic Attributes constants have been updated to the version in the yaml spec as of Dec 14, 2020.
🌟 Miscellaneous
- The Metrics API has been deprecated in the
opentelemetry-apimodule, in preparation for releasing a fully-stable 1.0
version of that module. The Metrics API will be removed from the module in the next release. - The API has been broken into separate modules, in preparation for the 1.0 release of the tracing API.
If you depend on theopentelemetry-apimodule, you should get the rest of the API modules as transitive dependencies. - The
OpenTelemetry.builder()and theOpenTelemetryBuilderinterface have been deprecated and will be removed in the next release.
The builder functionality is now only present on individual implementations of OpenTelemetry. For instance, the
DefaultOpenTelemetryclass has a builder available. - The
OpenTelemetry.setPropagators()has been deprecated and will be removed in the next release. You should instead create your
OpenTelemetryimplementations with the Propagators preset, via the various builder options. For example, use
DefaultOpenTelemetry.builder().setPropagators(propagators).build()to configure your no-sdk implementation.
SDK
☢️ Breaking Changes
- Many SDK classes have been renamed to be prefixed with
Sdkrather than havingSdkbeing embedded in the middle of the name.
For example,TracerSdkhas been renamed toSdkTracerandTracerSdkManagementhas been renamed toSdkTracerManagement. - The
ResourcesConfig.builder()method has been made non-public. - The
TraceConfig.Builderclass has been moved to the top-levelTraceConfigBuilderclass. - The built-in exporter
Builderclasses have been moved to the top level, rather than inner classes. Access to the builders
is still available viabuilder()methods on the exporter classes. - The built-in SpanProcessor
Builderclasses have been moved to the top level, rather than inner classes. Access to the builders
is still available viabuilder()methods on the SpanProcessor implementation classes. - The built-in ParentBasedSampler
Builderclass has been moved to the top level, rather than inner classes. Access to the builder
is still available via methods on the Sampler interface. - The
DaemonThreadFactoryclass has been moved to an internal module and should not be used outside of this repository. - The builder class for the
OpenTelemetrySdkclass has been slimmed down. The configurable details have been moved into
the specific provider builders, where they apply more specifically and obviously. - Many public classes have been made
final. - The MetricExporter interface's
shutdown()method now returnsCompletableResultCoderather than void. - The
OpenTelemetrySdk's builder class has been moved to the top level, rather than being an inner class. It has been renamed to
OpenTelemetrySdkBuilderas a part of that change. - The OTLP exporters have been split into two separate modules, and the metrics exporter has been tagged with the
-alphaversion.
If you continue to depend on theopentelemetry-exporters-otlpmodule, you will only get the trace exporter as a transitive dependency.
🌟 Miscellaneous
- The
SpanData.Link.getContext()method has been deprecated in favor of a newSpanData.Link.getSpanContext().
The deprecated method will be removed in the next release of the SDK. - The internals of the (alpha) Metrics SDK have been significantly updated.
- OTLP adapter classes have been moved into the
opentelemetry-sdk-extension-otprotomodule so they can be shared across OTLP usages. - The zipkin exporter has been updated to have its error code handling match the spec.
- The logging exporter's format has changed to something slightly more human-readable.
Extensions
🐛 Bugfixes
- The
opentelemetry-extension-annotationsmodule now includes the api module as anapidependency, rather than justimplementation.
☢️ Breaking Changes
- The deprecated
opentelemetry-extension-runtime-metricsmodule has been removed. The functionality is available in the
opentelemetry-java-instrumentation project under a different module name. - The deprecated
trace-utilsmodule has been removed. - Several public classes have been made
final.
📈 Enhancements
- Some common OTLP adapter utilities have been moved into the
opentelemetry-sdk-extension-otprotomodule so they can
be shared across OTLP exporters.
Version 0.12.0
API
🛠️ Bugfixes
- Usages of tracers and meters on all
OpenTelemetryinstances were being delegated to the global Meter and Tracer.
This has been corrected, and all instances should have independent Tracer and Meter instances.
☢️ Breaking Changes
- The
AttributesBuilderno long accepts null values for array-valued attributes with numeric or boolean types. - The
TextMapPropagator.fields()method now returns aCollectionrather than aList. Labelshas been converted to an interface, from an abstract class. Its API has otherwise remained the same.TraceStatehas been converted to an interface, from an abstract class. Its API has otherwise remained the same.Attributeshas been converted to an interface, from an abstract class. Its API has otherwise remained the same.- The
ReadableAttributesinterface has been removed, as it was redundant with theAttributesinterface. All APIs that
used or returnedReadableAttributesshould accept or return standardAttributesimplementations. SpanContexthas been converted to an interface, from an abstract class. Its API has otherwise remained the same.- The functional
AttributeConsumerinterface has been removed and replaced with a standardjava.util.function.BiConsumer. - The signature of the
BaggageBuilder.put(String, String, EntryMetadata entryMetadata)
method has been changed toput(String, String, BaggageEntryMetadata)
📈 Enhancements
- A
builder()method has been added to the OpenTelemetry interface to facilitate constructing implementations. - An
asMap()method has been added to theAttributesinterface to enable conversion to a standardjava.util.Map. - An
asMap()method has been added to theBaggageinterface to enable conversion to a standardjava.util.Map. - An
asMap()method has been added to theTraceStateinterface to enable conversion to a standardjava.util.Map. - The Semantic Attributes constants have been updated to the version in the yaml spec as of Dec 1, 2020.
🌟 Miscellaneous
- The
HttpTraceContextclass has been deprecated in favor ofW3CTraceContextPropagator.HttpTraceContextwill be removed in 0.13.0. - The
toBuilder()method on the OpenTelemetry interface has been deprecated and will be removed in 0.13.0. - The
DefaultContextPropagatorsclass has been deprecated. Access to it will be removed in 0.13.0. - The
TraceMultiPropagatorbuilder has been deprecated in favor of a simple factory method. The builder will be removed in 0.13.0.
You can access the same functionality via static methods on theContextPropagatorsinterface. - The
setCallback()method on the asynchronous metric instruments has been deprecated and will be removed in 0.13.0.
Instead, use thesetCallback()method on the builder for the instruments. - The
value()method on theStatusCodeenum has been deprecated and will be removed in 0.13.0. - The Baggage
EntryMetadataclass has been deprecated in favor of theBaggageEntryMetadatainterface. The class will be made non-public in 0.13.0.
Extensions
- The
opentelemetry-extension-runtime-metricsmodule has been deprecated. The functionality is available in the
opentelemetry-java-instrumentation project under a different module name. The module here will be removed in 0.13.0. - The
trace-utilsmodule has been deprecated. If you need this module, please let us know! The module will be removed in 0.13.0.
SDK
☢️ Breaking Changes
- The
opentelemetry-sdk-tracingmodule has been renamed toopentelemetry-sdk-trace. - The default port the OTLP exporters use has been changed to
4317. - The deprecated
SpanData.getCanonicalCode()method has been removed, along with the implementations.
📈 Enhancements
- The OpenTelemetrySdk builder now supports the addition of
SpanProcessors to the resulting SDK. - The OpenTelemetrySdk builder now supports the assignment of an
IdGeneratorto the resulting SDK. - The
ReadableSpaninterface now exposes theSpan.Kindof the span. - The SDK no longer depends on the guava library.
- The parent SpanContext is now exposed on the
SpanDatainterface.
🌟 Miscellaneous
- The
toBuilder()method on the OpenTelemetrySdk class has been deprecated and will be removed in 0.13.0. - The MultiSpanProcessor and MultiSpanExporter have been deprecated. You can access the same functionality via
theSpanProcessor.compositeandSpanExporter.compositemethods. The classes will be made non-public in 0.13.0. - The
SpanData.hasRemoteParent()method has been deprecated and will be removed in 0.13.0. If you need this information,
you can now callSpanData.getParentSpanContext().isRemote(). - The default timeouts for the 2 OTLP exporters and the Jaeger exporter have been changed to 10s from 1s.
Extensions
☢️ Breaking Changes
- The
opentelemetry-sdk-extension-aws-v1-supportmodule has been renamed toopentelemetry-sdk-extension-aws
and the classes in it have been repackaged into theio.opentelemetry.sdk.extension.aws.*packages.
🛠️ Bugfixes:
- The OpenTracing
TracerShimnow properly handles keys for context extraction in a case-insensitive manner.
📈 Enhancements
- The
opentelemetry-sdk-extension-resourcesnow includes resource attributes for the process runtime via theProcessRuntimeResourceclass.
This is included in the Resource SPI implementation that the module provides. - The
opentelemetry-sdk-extension-awsextension now will auto-detect AWS Lambda resource attributes.
Version 0.11.0
Changes from 0.10.0:
API
Breaking changes:
- The SPI interfaces have moved to a package (not a module) separate from the API packages, and now live in
io.opentelemetry.spi.*package namespace. - Builder classes have been moved to the top level, rather than being inner classes.
For example, rather thanio.opentelemetry.api.trace.Span.Builder, the builder is now in its own top-level class:io.opentelemetry.api.trace.SpanBuilder.
Methods to create the builders remain in the same place as they were before. - SpanBuilder.setStartTimestamp, Span.end, and Span.addEvent methods which accept a timestamp now accept a timestamp with a TimeUnit instead of requiring a nanos timestamp
Enhancements:
- Versions of SpanBuilder.setStartTimestamp, Span.end, and Span.addEvent added which accept Instant timestamps
- Setting the value of the
io.opentelemetry.context.contextStorageProviderSystem property todefaultwill enforce that
the default (thread local) ContextStorage will be used for the Context implementation, regardless of what SPI implementations are
available.
Miscellaneous:
- Invalid W3C
TraceStateentries will now be silently dropped, rather than causing the invalidation of the entireTraceState.
SDK
Breaking Changes:
- The builder class for the
OpenTelemetrySdknow strictly requires its components to be SDK implementations.
You can only build anOpenTelemetrySdkwithTracerSdkProviderandMeterSdkProviderinstances.
Enhancements:
- An API has been added to the SDK's MeterProvider implementation (
MeterSdkProvider) that allows the end-user to configure
how various metrics will be aggregated. This API should be considered a precursor to a full "Views" API, and will most likely
evolve over the coming months before the metrics implementation is complete. See the javadoc forMeterSdkProvider.registerView()for details.
Miscellaneous:
- The
SpanProcessorinterface now includes default method implementations for theshutdown()andforceFlush()methods. - The BatchRecorder implementation has been updated to actually batch the recordings, rather than simply passing them through.
Extensions
Breaking Changes:
- The
@WithSpanannotation has been moved to theio.opentelemetry.extension.annotationspackage in theopentelemetry-extension-annotationsmodule
Bugfixes:
- The memory pool metrics provided by the MemoryPools class in the
opentelemetry-extension-runtime-metricsmodule
have been fixed to properly report the committed memory values.
Enhancements:
- A new module has been added to assist with propagating the OTel context in kotlin co-routines.
See theopentelemetry-extension-kotlinmodule for details.