Releases: open-telemetry/opentelemetry-java
Version 1.3.0
Changelog:
API
Enhancements
- Parsing of the W3C Baggage header has been optimized.
SDK
Behavioral Changes
- The implementation of SpanBuilder will no longer throw exceptions when null parameters are passed in. Instead,
it will treat these calls as no-ops.
Enhancements
- Memory usage of the Tracing SDK has been greatly reduced when exporting via the OTLP or Jaeger exporters.
- The OTLP protobuf version has been updated to v0.9.0
Extensions
- A new experimental extension module has been added to provide a truly no-op implementation of the API. This
is published under theio.opentelemetry.extension.noopapi
name. - The
io.opentelemetry.sdk.autoconfigure
module now supports theOTEL_SERVICE_NAME
/otel.service.name
environment variable/system property for configuring the SDK'sResource
implementation.
Metrics (alpha)
- The autoconfiguration code for metrics now supports durations to be provided with units attached to them (eg. "
100ms
"). This includes
the following environment variables/system properties:OTEL_EXPORTER_OTLP_TIMEOUT
/otel.exporter.otlp.timeout
OTEL_IMR_EXPORT_INTERVAL
/otel.imr.export.interval
Many thanks to all the people who contributed to this release:
@anuraaga
@char16t
@iNikem
@jkwatson
@kubawach
@mxiamxia
@piotr-sumo
@wsargent
@xyira
Version 1.2.0
General
Enhancements
- The
"Implementation-Version"
attribute has been added to the jar manifests for all published jar artifacts.
API
Enhancements
- A new method has been added to the Span and the SpanBuilder to enable adding a set of Attributes in one call, rather than
having to iterate over the contents and add them individually. SeeSpan.setAllAttributes(Attributes)
andSpanBuilder.setAllAttributes(Attributes)
Behavioral Changes
- Previously, an AttributeKey with a null underlying key would preserve the null. Now, this will be converted to an empty String.
SDK
Enhancements
- The
IdGenerator.random()
method will now attempt to detect if it is being used in an Android environment, and use
a more Android-friendlyIdGenerator
instance in that case. This will affect any usage of the SDK that does not
explicitly specify a customIdGenerator
instance when running on Android.
Behavioral Changes
- The name used for Tracer instances that do not have a name has been changed to be an empty String, rather than the
previously used"unknown"
value. This change is based on a specification clarification.
Propagators
Bugfixes
- The B3 Propagator injectors now only include the relevant fields for the specific injection format.
Behavioral Changes
- The
W3CBaggagePropagator
will no longer explicitly populate an emptyBaggage
instance into the context when
the header is unparsable. It will now return the provided Context instance unaltered, as is required by the specification. - The
AwsXrayPropagator
will no longer explicitly populate an invalidSpan
instance into the context when
the headers are unparsable. It will now return the provided Context instance unaltered, as is required by the specification.
Exporters
- The
jaeger-thrift
exporter has had its dependency on thejaeger-client
library updated to version1.6.0
. - The
zipkin
exporter now has an option to specific a custom timeout. - The
zipkin
,jaeger
andjaeger-thrift
exporters will now report theotel.dropped_attributes_count
andotel.dropped_events_count
tags if the numbers are greater than zero.
Semantic Conventions (alpha)
Breaking Changes
- The SemanticAttributes and ResourceAttributes have both been updated to match the OpenTelemetry Specification v1.3.0 release, which
includes several breaking changes. - Values that were previously defined as
enum
s are now defined as staticpublic static final
constants of the appropriate type.
OpenTracing Shim (alpha)
Enhancements
- Error logging support in the shim is now implemented according to the v1.2.0 specification.
SDK Extensions
- A new
HostResource
Resource and the correspondingResourceProvider
has been added.
It will populate thehost.name
andhost.arch
Resource Attributes. - A new
ExecutorServiceSpanProcessor
has been added to theopentelemetry-sdk-extension-tracing-incubator
module. This implementation
of a batch SpanProcessor allows you to provide your own ExecutorService to do the background export work. - The
autoconfigure
module now supports providing the timeout setting for the Jaeger GRPC exporter via
a system property (otel.exporter.jaeger.timeout
) or environment variable (OTEL_EXPORTER_JAEGER_TIMEOUT
). - The
autoconfigure
module now supports providing the timeout setting for the Zipkin exporter via
a system property (otel.exporter.zipkin.timeout
) or environment variable (OTEL_EXPORTER_ZIPKIN_TIMEOUT
). - The
autoconfigure
module now exposes theEnvironmentResource
class to provide programmatic access to aResource
built from parsing theotel.resource.attributes
configuration property.
Metrics (alpha)
Breaking Changes
- The deprecated
SdkMeterProvider.registerView()
method has been removed. The ViewRegistry is now immutable and cannot
be changed once theSdkMeterProvider
has been built.
Bugfixes
- OTLP summaries now have the proper percentile value of
1.0
to represent the maximum; previously it was wrongly set to100.0
.
Enhancements
- There is now full support for delta-aggregations with the
LongSumAggregator
andDoubleSumAggregator
.
SeeAggregatorFactory.sum(AggregationTemporality)
. The previousAggregatorFactory.sum(boolean)
has been
deprecated and will be removed in the next release.
Many thanks to all the people who contributed to this release:
Version 1.1.0
API
Bugfixes
- We now use our own internal
@GuardedBy
annotation for errorprone so there won't be an accidental
transitive dependency on a 3rd-party jar. - The
TraceStateBuilder
now will not crash when an empty value is provided.
Enhancements
- The
Context
class now provides methods to wrapjava.util.concurrent.Executor
andjava.util.concurrent.ExecutorService
instances to do context propagation using the current context. Seeio.opentelemetry.context.Context.taskWrapping(...)
for
more details.
OpenTracing Shim (alpha)
- The shim now supports methods that take a timestamp as a parameter.
- You can now specify both the
TEXT_MAP
and theHTTP_HEADER
type propagators for the shim.
Seeio.opentelemetry.opentracingshim.OpenTracingPropagators
for details.
Extensions
- The AWS X-Ray propagator is now able to extract 64-bit trace ids.
SDK
Bugfixes
- The
CompletableResultCode.join(long timeout, TimeUnit unit)
method will no longerfail
the result
when the timeout happens. Nor willwhenComplete
actions be executed in that case. - The
SimpleSpanProcessor
now keeps track of pending export calls and will wait for them to complete
via a CompletableResultCode whenforceFlush()
is called. Similiarly, this is also done onshutdown()
. - The Jaeger Thrift exporter now correctly populates the parent span id into the exporter span.
Enhancements
- The SpanBuilder provided by the SDK will now ignore
Link
entries that are reference an invalid SpanContext.
This is an update from the OpenTelemetry Specification v1.1.0 release. - The OTLP Exporters will now log more helpful messages when the collector is unavailable or misconfigured.
- The internals of the
BatchSpanProcessor
have had some optimization done on them, to reduce CPU
usage under load. - The
Resource
class now hasbuilder()
andtoBuilder()
methods and a correspondingResourceBuilder
class
has been introduced for more fluent creation and modification ofResource
instances. - The standard exporters will now throttle error logging when export errors are too frequent. If more than 5
error messages are logged in a single minute by an exporter, logging will be throttled down to only a single
log message per minute.
SDK Extensions
Bugfixes
- Removed a stacktrace on startup when using the
autoconfigure
module without a metrics SDK on the classpath.
Enhancements
- The
autoconfigure
module now supportsOTEL_EXPORTER_OTLP_METRICS_ENDPOINT
andOTEL_EXPORTER_OTLP_TRACES_ENDPOINT
settings, in addition to the combinedOTEL_EXPORTER_OTLP_ENDPOINT
environment variable. Corresponding
system properties are also supported (-Dotel.exporter.otlp.metrics.endpoint
and-Dotel.exporter.otlp.traces.endpoint
). - An
SdkMeterProviderConfigurer
SPI is now available in theautoconfigure
module.
Semantic Conventions (alpha)
- The SemanticAttributes and ResourceAttributes have both been updated to match the OpenTelemetry Specification v1.1.0 release.
This includes a breaking changes to the constants defined in theResourceAttributes
class:
ResourceAttributes.CLOUD_ZONE
has been replaced withResourceAttributes.CLOUD_AVAILABILITY_ZONE
.
Metrics (alpha)
Breaking Changes
- The
ViewRegistry
now lets you registerView
objects, rather thanAggregatorFactory
instances. GlobalMetricsProvider
has been renamed toGlobalMeterProvider
.View
registration has been moved to theSdkMeterProviderBuilder
and the methods on theSdkMeterProvider
to add views have been deprecated. They will be removed in the next release.
Enhancements
- A new option for aggregation as Histograms is now available.
Many thanks to all the people who contributed to this release:
@anuraaga @jkwatson @jack-berg @Oberon00 @beanliu @malafeev @sbandadd @breedx-splk @as-polyakov @kubawach @austinlparker @harshita19244 @mateuszrzeszutek @piotr-sumo @topher1120
Version 1.0.1
Version 1.0.1 - 2021-03-11
Bugfixes
- AWS resource extensions have been fixed to not throw
NullPointerException
in actual AWS environment
Version 1.0.0
Version 1.0.0 - 2021-02-26
General
This releases marks the first stable release for the tracing, baggage and context APIs and the SDK.
Please see the Versioning document for stability guarantees.
The best source of a list of the now stable packages can be found in the opentelemetry-bom artifact in maven central.
Javadoc is available at javadoc.io. For example, javadoc.io for the API module.
Changes
- The
opentelemetry-proto
module is now versioned as analpha
module, as it contains non-stable
metrics and logs signals. It has hence been removed from the main BOM. - The
opentelemetry-sdk-extension-otproto
module has been removed. The classes in it have been moved
to a newopentelemetry-exporter-otlp-common
module but have been repackaged into an unsupported,
internal package.
Metrics (alpha)
Breaking Changes
PrometheusCollector.Builder
inner class has been moved to the top level asPrometheusCollectorBuilder
.
Many thanks to all the people who have contributed over the past few years! We couldn't have done without everyone's help.
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 theBaggage
instance from theContext
and calltoBuilder()
on it in order to get the entries pre-populated in your builder.TextMapPropagator.Setter
andTextMapPropagator.Getter
have been moved to the top level and renamed to
TextMapSetter
andTextMapGetter
respectively.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-autoconfigure
module.
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-autoconfigure
module 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
SpanLimits
to truncate String-valued Span attributes has been removed (this is still pending in the specification). - The
InMemoryMetricsExporter
has been removed from theopentelemetry-sdk-testing
module.
🌟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-autoconfigure
module, we have changed the system property used to exclude some Resource auto-populators to be
otel.java.disabled.resource-providers
instead ofotel.java.disabled.resource_providers
. - In the
opentelemetry-sdk-extension-autoconfigure
module, you now specify theOtTracePropagator
with the"ottrace"
option, rather than"ottracer"
. - In the
opentelemetry-sdk-extension-autoconfigure
module, the default exporters are now set to be"otlp"
, as required by the 1.0.0 specification. - In the
opentelemetry-sdk-extension-autoconfigure
module, the default propagators are now set to be"tracecontext,baggage"
, as required by the 1.0.0 specification. - The
CommonProperties
class has been removed from theopentelemetry-sdk-extension-otproto
module.
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.Kind
enum has been moved to the top level, and namedSpanKind
. DefaultOpenTelemetry
is no longer a public class. If you need the functionality previously provided by this
implementation, it can be accessed via new static methods on theOpenTelemetry
interface itself.- The
TraceFlags
interface has been re-introduced. This is now used, rather than a barebyte
wherever
trace flags is used. In particular,SpanContext.create()
,SpanContext.createFromRemoteParent()
now require
aTraceFlags
instance, andSpanContext.getTraceFlags()
returns aTraceFlags
instance. - The names of static methods on
TraceFlags
have been normalized to match other similar classes, and now
returnTraceFlags
instead ofbyte
where appropriate. - The
Labels
interface 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()
BaggageConsumer
has been removed in favor of a standardjava.util.function.BiConsumer<String, BaggageEntry>
TraceFlags.isSampledFromHex(CharSequence src, int srcOffset)
has been removed.SpanId
andTraceId
methods that had aString
parameter 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()
StrictContextStorage
has been made private. Use -Dio.opentelemetry.context.enableStrictContext=true` to enable it
📈Enhancements
- The
W3CTraceContextPropagator
class now directly implements theTextMapPropagator
interface. - The
OpenTelemetry
interface now has agetDefault()
method which will return a completely no-op implementation. - The
OpenTelmmetry
interface now has agetPropagating(ContextPropagators propagators)
method which will
return an implementation that contains propagators, but is otherwise no-op.
🌟Misc Notes
- The internal
StringUtils
class has had metrics-related methods removed from it. But, you weren't using
internal classes, were you? - The internal
AbstractWeakConcurrentMap
class has been made non-public. See the line above about internal classes.
Extensions
☢️ Breaking Changes
- The
OtTracerPropagator
has been renamed toOtTracePropagator
in the trace-propagators extension module. AwsXrayPropagator
has been moved to theopentelemetry-extension-aws
artifact
SDK
☢️ Breaking Changes
TraceConfig
has been renamed toSpanLimits
and relocated to theio.opentelemetry.sdk.tracing
package.
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
SpanData
now directly exposes the underlyingSpanContext
instance.
SDK Extensions
☢️Breaking Changes
- In the
opentelemetry-autoconfigure
module, three environment variables/system properties
have been renamed to match the spec:OTEL_TRACE_EXPORTER
/otel.trace.exporter
has been replaced withOTEL_TRACES_EXPORTER
/otel.traces.exporter
OTEL_TRACE_SAMPLER
/otel.trace.sampler
has been replaced withOTEL_TRACES_SAMPLER
/otel_traces_sampler
OTEL_TRACE_SAMPLER_ARG
/otel.trace.sampler.arg
has been replaced withOTEL_TRACES_SAMPLER_ARG
/otel.traces.sampler.arg
📈Enhancements
- The
opentelemetry-autoconfigure
module 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-autoconfigure
module now provides automatic SPI-based parsing of theOTEL_RESOURCE_ATTRIBUTES
env var
(and the correspondingotel.resource.attributes
system property). If you include this module on your
classpath, it will automatically update theResource.getDefault()
instance with that configuration.
Metrics (alpha)
API
- The
Labels
interface has been moved into the metrics API module and repackaged into the
io.opentelemetry.api.metrics.common
package.
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-semconv
module has been marked as-alpha
and 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.SemanticAttributes
which were previously
generated form the Resource semantic conventions have been deprecated. Please use the ones in the new
io.opentelemetry.semconv.resource.attributes.ResourceAttributes
class.
📈 Enhancements
- A new
io.opentelemetry.semconv.resource.attributes.ResourceAttributes
has been introduced to hold the
generated semantic attributes to be used in creatingResource
s.
🌟 Miscellaneous
- The SemanticAttributes class has been moved to a new module:
opentelemetry-semconv
and repackaged into a new package:
io.opentelemetry.semconv.trace.attributes
. The oldSemanticAttributes
class 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.Decision
has been removed in favor of theio.opentelemetry.sdk.trace.samplers.SamplingDecision
top-level class.Resource.merge(Resource)
now will resolve conflicts by preferring theResource
passed in, rather than the original.- The default Resource (accessible via
Resource.getDefault()
) now includes a fallbackservice.name
attribute. 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
Sampler
is now specified when building theSdkTracerProvider
directly, rather than being a part of the TraceConfig.
📈 Enhancements
Resource.getDefault()
now includes a fallbackservice.name
attribute. 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
exportOnlySampled
configuration of theBatchSpanProcessor
has been deprecated and will be removed in the next
release. - The
io.opentelemetry.sdk.resources.ResourceAttributes
has been deprecated and will be removed in the next release.
Please use the newio.opentelemetry.semconv.resource.attributes.ResourceAttributes
class 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.name
will always be pulled from the default Resource.
Extensions
☢️ Breaking Changes
- The
otel.bsp.schedule.delay.millis
env var/system property configuration option for the batch span processor has been renamed to
otel.bsp.schedule.delay
to match the specification. - The
otel.bsp.export.timeout.millis
env var/system property configuration option for the batch span processor has been renamed to
otel.bsp.export.timeout
to match the specification.
📈 Enhancements
- The
opentelemetry-sdk-extension-autoconfigure
module will now additionally register the auto-configured
SDK as the instance ofGlobalOpenTelemetry
when used. - The
opentelemetry-sdk-extension-autoconfigure
module now supports theotel.exporter.otlp.certificate
configuration
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.