- The
"Implementation-Version"
attribute has been added to the jar manifests for all published jar artifacts.
- 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. See
Span.setAllAttributes(Attributes)
andSpanBuilder.setAllAttributes(Attributes)
- Previously, an AttributeKey with a null underlying key would preserve the null. Now, this will be converted to an empty String.
- 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.
- 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.
- The B3 Propagator injectors now only include the relevant fields for the specific injection format.
- 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.
- 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.
- 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.
- Error logging support in the shim is now implemented according to the v1.2.0 specification.
- 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.
- The deprecated
SdkMeterProvider.registerView()
method has been removed. The ViewRegistry is now immutable and cannot be changed once theSdkMeterProvider
has been built.
- OTLP summaries now have the proper percentile value of
1.0
to represent the maximum; previously it was wrongly set to100.0
.
- 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.
- 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.
- 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.
- 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.
- The AWS X-Ray propagator is now able to extract 64-bit trace ids.
- 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.
- 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.
- Removed a stacktrace on startup when using the
autoconfigure
module without a metrics SDK on the classpath.
- 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.
- 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 the
ResourceAttributes
class:ResourceAttributes.CLOUD_ZONE
has been replaced withResourceAttributes.CLOUD_AVAILABILITY_ZONE
.
- 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.
- A new option for aggregation as Histograms is now available.
- AWS resource extensions have been fixed to not throw NullPointerException in actual AWS environment
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 lsit 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.
- 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.
PrometheusCollector.Builder
inner class has been moved to the top level asPrometheusCollectorBuilder
.
- Removed the unused
ResourceProvider
interface from the SDK. This interface is still available in theopentelemetry-sdk-extension-autoconfigure
module, where it is actually used.
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.
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.
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 toTextMapSetter
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.
- 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
the
http://
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.
- The default values for SpanLimits have been changed to 128, from 1000, to match the spec.
- In the
opentelemetry-sdk-extension-autoconfigure
module, we have changed the system property used to exclude some Resource auto-populators to beotel.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.
Meter.getDefault()
has been removed.MeterProvider.getDefault()
has been renamed toMeterProvider.noop()
.
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.
- Methods and classes deprecated in 0.15.0 have been removed.
- 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 itAwsXrayPropagator
has been moved to theopentelemetry-extension-aws
artifact
- 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.
- 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.
- The
OtTracerPropagator
has been renamed toOtTracePropagator
in the trace-propagators extension module.
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.
SpanData
now directly exposes the underlyingSpanContext
instance.
- 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
- 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.
- The
Labels
interface has been moved into the metrics API module and repackaged into theio.opentelemetry.api.metrics.common
package.
- Methods and classes deprecated in 0.14.x have been removed.
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 newio.opentelemetry.semconv.resource.attributes.ResourceAttributes
class.
- A new
io.opentelemetry.semconv.resource.attributes.ResourceAttributes
has been introduced to hold the generated semantic attributes to be used in creatingResource
s.
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 the SdkTracerProvider directly, rather than being a part of the TraceConfig.
- The Jaeger exporters will now properly populate the process service name from the Resource service.name attribute.
- 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 fallback
service.name
will always be pulled from the default Resource.
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.
- The
otel.bsp.schedule.delay.millis
env var/system property configuration option for the batch span processor has been renamed tootel.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 tootel.bsp.export.timeout
to match the specification.
- 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.
- Several more modules have been updated to have
-alpha
appended on their versions:opentelemetry-sdk-extension-jfr-events
opentelemetry-sdk-extension-async-processor
opentelemetry-sdk-extension-logging
opentelemetry-sdk-extension-zpages
opentelemetry-sdk-exporter-prometheus
opentelemetry-sdk-exporter-tracing-incubator
opentelemetry-opentracing-shim
opentelemetry-opencensus-shim
- Code that was deprecated in
0.13.0
has been removed from the project.- Metrics interfaces are no longer available as a part of the
opentelemetry-pom
or from theopentelemetry-api
modules. 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 yourOpenTelemetry
implementations with the Propagators preset, via the various builder options. For example, useDefaultOpenTelemetry.builder().setPropagators(propagators).build()
to configure your no-sdk implementation.- The
OpenTelemetry.builder()
and theOpenTelemetryBuilder
interface have been removed. The builder functionality is now only present on individual implementations of OpenTelemetry. For instance, theDefaultOpenTelemetry
class has a builder available.
- Metrics interfaces are no longer available as a part of the
- 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.
- The SemanticAttributes have been updated to the latest version of the specification, as of January 7th, 2021.
- 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 includes
otel.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.
- The deprecated
SpanData.Link.getContext()
method has been removed in favor ofSpanData.Link.getSpanContext()
. - The
TracerProviderFactorySdk
SPI 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 theGlobalOpenTelemetry
when invoked. - The
SdkTracerManagement.shutdown()
method now returnsCompletableResultCode
which can be used to wait asynchronously for shutdown to complete. - The
sampling.probability
sampling attribute previously generated by theTraceIdRatioBasedSampler
is no longer generated, as it was not conformant with the specifications. - The
SpanData
inner classes have been moved to the top level, soSpanData.Link
->LinkData
,SpanData.Event
->EventData
andSpanData.Status
->StatusData
.
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
StringUtils
class in theopentelemetry-extension-trace-propagators
extension module has been deprecated and will be made non-public in the next release. - The
StatusData.isUnset()
andStatusData.isOk()
methods have been deprecated. They will be removed in the next release.
- The
OtlpGrpcSpanExporter
now 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.autoconfigure
will be the new path for auto-configuration of the SDK, including via SPI, environment variables and system properties. - The
TraceConfig
class 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 theSpan
and (alpha)Metric
exporters were updated to match. - Timeouts in the exporters can now be specified with
java.util.concurrent.TimeUnit
andjava.time.Duration
based configurations, rather than requiring milliseconds.
- 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.
- The
AwsXrayIdGenerator
constructor has been deprecated in favor of using a simplegetInstance()
singleton, since it has no state. - The
TraceProtoUtils
class in theopentelemetry-sdk-extension-otproto
module has been deprecated and will be removed in the next release.
- The JaegerRemoteSampler now uses the ParentBased sampler as the basis for any sampling that is done.
- The
InstrumentSelector.newBuilder()
method has been renamed toInstrumentSelector.builder()
and the methods on the Builder have changed to use the same naming patterns as the rest of the project. - The
MeterProviderFactorySdk
class has been renamed toSdkMeterProviderFactory
. - The
SdkMeterProvicer.Builder
has been moved to the top levelSdkMeterProviderBuilder
. - The
InstrumentSelector
now requires an instrument type to be provided, and defaults the name regex to.*
.
- Starting with 0.13.0, all unstable modules (the 2 metrics modules for now) will have a
-alpha
appended 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.
- The
Labels.ArrayBackedLabelsBuilder
class has been made non-public. You can still access theLabelsBuilder
functionality via theLabels.builder()
method. - Methods deprecated in the 0.12.0 release have been removed or made non-public:
- The
HttpTraceContext
class 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
DefaultContextPropagators
class has made non-public. - The
TraceMultiPropagator
builder has been removed in favor of a simple factory method. - The
value()
method on theStatusCode
enum has been removed. - The Baggage
EntryMetadata
class has been removed in favor of theBaggageEntryMetadata
interface. - The
setCallback()
method on the asynchronous metric instruments has been removed.
- The
- Several public classes have been made
final
.
- An
asMap
method has been added to theLabels
interface, 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 allScope
s 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 theio.opentelemetry.context.Context
interface for details. - Several of the methods on the
Span
interface have been given default implementations. - The Semantic Attributes constants have been updated to the version in the yaml spec as of Dec 14, 2020.
- The Metrics API has been deprecated in the
opentelemetry-api
module, 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 the
opentelemetry-api
module, you should get the rest of the API modules as transitive dependencies. - The
OpenTelemetry.builder()
and theOpenTelemetryBuilder
interface 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, theDefaultOpenTelemetry
class has a builder available. - The
OpenTelemetry.setPropagators()
has been deprecated and will be removed in the next release. You should instead create yourOpenTelemetry
implementations with the Propagators preset, via the various builder options. For example, useDefaultOpenTelemetry.builder().setPropagators(propagators).build()
to configure your no-sdk implementation.
- 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-otproto
module 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.
- Many SDK classes have been renamed to be prefixed with
Sdk
rather than havingSdk
being embedded in the middle of the name. For example,TracerSdk
has been renamed toSdkTracer
andTracerSdkManagement
has been renamed toSdkTracerManagement
. - The
ResourcesConfig.builder()
method has been made non-public. - The
TraceConfig.Builder
class has been moved to the top-levelTraceConfigBuilder
class. - The built-in exporter
Builder
classes 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
Builder
classes 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
Builder
class 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
DaemonThreadFactory
class has been moved to an internal module and should not be used outside of this repository. - The builder class for the
OpenTelemetrySdk
class 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 returnsCompletableResultCode
rather than void. - The
OpenTelemetrySdk
's builder class has been moved to the top level, rather than being an inner class. It has been renamed toOpenTelemetrySdkBuilder
as a part of that change. - The OTLP exporters have been split into two separate modules, and the metrics exporter has been tagged with the
-alpha
version. If you continue to depend on theopentelemetry-exporters-otlp
module, you will only get the trace exporter as a transitive dependency.
- The
opentelemetry-extension-annotations
module now includes the api module as anapi
dependency, rather than justimplementation
.
- The deprecated
opentelemetry-extension-runtime-metrics
module has been removed. The functionality is available in the opentelemetry-java-instrumentation project under a different module name. - The deprecated
trace-utils
module has been removed. - Several public classes have been made
final
.
- Some common OTLP adapter utilities have been moved into the
opentelemetry-sdk-extension-otproto
module so they can be shared across OTLP exporters.
- Usages of tracers and meters on all
OpenTelemetry
instances were being delegated to the global Meter and Tracer. This has been corrected, and all instances should have independent Tracer and Meter instances.
- The
AttributesBuilder
no long accepts null values for array-valued attributes with numeric or boolean types. - The
TextMapPropagator.fields()
method now returns aCollection
rather than aList
. Labels
has been converted to an interface, from an abstract class. Its API has otherwise remained the same.TraceState
has been converted to an interface, from an abstract class. Its API has otherwise remained the same.Attributes
has been converted to an interface, from an abstract class. Its API has otherwise remained the same.- The
ReadableAttributes
interface has been removed, as it was redundant with theAttributes
interface. All APIs that used or returnedReadableAttributes
should accept or return standardAttributes
implementations. SpanContext
has been converted to an interface, from an abstract class. Its API has otherwise remained the same.- The functional
AttributeConsumer
interface 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)
- A
builder()
method has been added to the OpenTelemetry interface to facilitate constructing implementations. - An
asMap()
method has been added to theAttributes
interface to enable conversion to a standardjava.util.Map
. - An
asMap()
method has been added to theBaggage
interface to enable conversion to a standardjava.util.Map
. - An
asMap()
method has been added to theTraceState
interface 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.
- The
HttpTraceContext
class has been deprecated in favor ofW3CTraceContextPropagator
.HttpTraceContext
will 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
DefaultContextPropagators
class has been deprecated. Access to it will be removed in 0.13.0. - The
TraceMultiPropagator
builder 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 theContextPropagators
interface. - 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 theStatusCode
enum has been deprecated and will be removed in 0.13.0. - The Baggage
EntryMetadata
class has been deprecated in favor of theBaggageEntryMetadata
interface. The class will be made non-public in 0.13.0.
- The
opentelemetry-extension-runtime-metrics
module 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-utils
module has been deprecated. If you need this module, please let us know! The module will be removed in 0.13.0.
- The
opentelemetry-sdk-tracing
module 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.
- The OpenTelemetrySdk builder now supports the addition of
SpanProcessor
s to the resulting SDK. - The OpenTelemetrySdk builder now supports the assignment of an
IdGenerator
to the resulting SDK. - The
ReadableSpan
interface now exposes theSpan.Kind
of the span. - The SDK no longer depends on the guava library.
- The parent SpanContext is now exposed on the
SpanData
interface.
- 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
the
SpanProcessor.composite
andSpanExporter.composite
methods. 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.
- The
opentelemetry-sdk-extension-aws-v1-support
module has been renamed toopentelemetry-sdk-extension-aws
and the classes in it have been repackaged into theio.opentelemetry.sdk.extension.aws.*
packages.
- The OpenTracing
TracerShim
now properly handles keys for context extraction in a case-insensitive manner.
- The
opentelemetry-sdk-extension-resources
now includes resource attributes for the process runtime via theProcessRuntimeResource
class. This is included in the Resource SPI implementation that the module provides. - The
opentelemetry-sdk-extension-aws
extension now will auto-detect AWS Lambda resource attributes.
- 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 than
io.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.
- Versions of SpanBuilder.setStartTimestamp, Span.end, and Span.addEvent added which accept Instant timestamps
- Setting the value of the
io.opentelemetry.context.contextStorageProvider
System property todefault
will enforce that the default (thread local) ContextStorage will be used for the Context implementation, regardless of what SPI implementations are available.
- Invalid W3C
TraceState
entries will now be silently dropped, rather than causing the invalidation of the entireTraceState
.
- The builder class for the
OpenTelemetrySdk
now strictly requires its components to be SDK implementations. You can only build anOpenTelemetrySdk
withTracerSdkProvider
andMeterSdkProvider
instances.
- 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.
- The
SpanProcessor
interface 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.
- The
@WithSpan
annotation has been moved to theio.opentelemetry.extension.annotations
package in theopentelemetry-extension-annotations
module
- The memory pool metrics provided by the MemoryPools class in the
opentelemetry-extension-runtime-metrics
module have been fixed to properly report the committed memory values.
- A new module has been added to assist with propagating the OTel context in kotlin co-routines.
See the
opentelemetry-extension-kotlin
module for details.
- The W3C Baggage Propagator is now available.
- The B3 Propagator now handles both single and multi-header formats.
- The B3 Propagator defaults to injecting the single B3 header, rather than the multi-header format.
- Mutating a method on
Span
now returns theSpan
to enable call-chaining.
- The
package-info
file was removed from theio.otel.context
package because it made the project incompatible with JPMS.
- There have been many updates to the semantic conventions constants. The constants are now auto-generated from the YAML specification files, so the names will now be consistent across languages. For more information, see the YAML Model for Semantic Conventions.
- All API classes have been moved into the
io.opentelemetry.api.
prefix to support JPMS users. - The API no longer uses the
grpc-context
as the context implementation. It now usesio.opentelemetry.context.Context
. This is published in theopentelemetry-context
artifact. Interactions with the context were mostly moved to static methods in theSpan
andBaggage
interfaces. - The Baggage API has been reworked to more closely match the specification. This includes the removal of the
BaggageManager
. Baggage is fully functional within the API, without needing to install an SDK. TracingContextUtils
andBaggageUtils
were removed from the public API. Instead, use the appropriate static methods on theSpan
andBaggage
classes, or use methods on theContext
itself.- The context propagation APIs have moved into the new
opentelemetry-context
context module. DefaultSpan
was removed from the public API. Instead, useSpan.wrap(spanContext)
if you need a non-functional span that propagates the trace context.DefaultMeter
,DefaultMeterProvider
,DefaultTracer
andDefaultTracerProvider
were removed from the public API. You can access the same functionality withgetDefault()
methods on theMeter
,MeterProvider,
Tracer, and
TracerProvider` classes, respectively.- Some functionality from the
Tracer
interface is now available either on theSpan
interface orContext
interface. - The
OpenTelemetry
class is now an interface, with implementations. Methods on this interface have changed their names to reflect this change. For more information, see OpenTelemetry.java. - All builder-creation methods have been renamed to
.builder()
. StatusCanonicalCode
has been renamed toStatusCode
.Span.getContext()
has been renamed toSpan.getSpanContext()
.AttributesBuilder
now usesput
instead ofadd
as the method name for adding attributes.- All parameters are now marked as non-nullable by default.
TextMapPropagators
could receive a null carrier passed to the extract method.- The
TextMapPropagator.Getter
interface has added a method to return the keys that the propagator uses.
- A new
MetricData
gauge metric type is now available. - A new
opentelemetry-sdk-testing
module with a JUnit 5 extension to assist with testing is now available. - The Prometheus metric exporter now consumes
gauge
metrics. - The Jaeger gRPC exporter now maps
Resource
entries to process tags. - The OTLP protobuf definitions were updated to the latest released version: 0.6.0. Both the
Span
andMetric
exporters were updated to match. - The
Sampler
interface now allows aSampler
implementation to update theTraceState
that is applied to theSpanContext
for the resulting span.
TraceConfig
configuration option names (environment variables and system properties) were renamed to match the OpenTelemetery Specification. For more information, see TraceConfig.- The Jaeger gRPC exporter was updated to match the OpenTelemetry Specification. The
message
log entry attribute has been renamed toevent
and a newdropped attributes count
attribute was added. For more information, see the Overview. - The
SpanData.getHasRemoteParent()
andSpanData.getHasEnded()
methods were renamed tohasRemoteParent()
andhasEnded()
, respectively. - The
IdsGenerator
interface has been renamed toIdGenerator
, and all implementations and relevant factory methods were similarly renamed. - The
RandomIdGenerator
is now accessible via a factory method on theIdGenerator
class, rather than being exposed itself. UseIdGenerator.random()
to acquire an instance. - The OTLP metric exporter now emits
gauge
metrics where appropriate. ValueObserver
instruments now generate gauge metrics, rather than non-monotonic counter-style metrics.ValueObserver
instruments now use theLastValue
aggregation instead ofMinMaxSumCount
.- The
SpanData.*
implementation classes were removed from the public SDK, but the interfaces are still available. SpanProcessor.onStart
now takes aContext
as its first parameter.- The
Sampler
interface now takes a parentContext
rather than aSpanContext
. - Each
Sampler
has been reorganized into their own classes and moved into theio.opentelemetry.sdk.trace.samplers
package. Factory methods that used to be on theSamplers
class were moved to theSampler
interface.
- A new JUnit5 extension was added for writing tests. For more information, see OpenTelemetryExtension.java.
- A Jaeger
SpanExporter
which exports via thethrift-over-http protocol
is now available. - A Jaeger Propagator is now available.
- The in-memory exporter(s) have been moved to the
opentelemetry-sdk-testing
artifact. - The OpenTracing shim factory class has been renamed from
TraceShim
toOpenTracingShim
. The factory methods have changed becauseBaggageManager
was removed and non-globalOpenTelemetry
instances are now available. - The 's' was removed from the word "exporters" for every exporter artifact. For example,
opentelemetry-exporters-logging
was renamed toopentelemetry-exporter-logging
. - The 's' was removed from the word "extensions" for the package for every SDK extension. For example,
io.opentelemetry.sdk.extensions.otproto.TraceProtoUtils
was renamed toio.opentelemetry.sdk.extension.otproto.TraceProtoUtils
.
Many thanks to everyone who made this release possible!
@anuraaga @bogdandrutu @Oberon00 @thisthat @HaloFour @jkwatson @kenfinnigan @MariusVolkhart @malafeev @trask @tylerbenson @XiXiaPdx @dengliming @hengyunabc @jarebudev @brianashby-sfx
-
API
- BREAKING CHANGE: SpanId, TraceId and TraceFlags are no longer used as instances, but only contain helper methods for managing conversion between Strings, bytes and other formats. SpanId and TraceId are now natively String-typed, and the TraceFlags is a single byte.
- BREAKING CHANGE: Propagators now only expose a singleton instance.
- BREAKING CHANGE: The LabelConsumer and AttributeConsumer are now first-class interfaces, and the underlying consumer interface has had the key made additionally generic. Please prefer using the specific interfaces, rather than the underlying
ReadableKeyValuePairs.KeyValueConsumer
. - BREAKING CHANGE: Minimum JDK version has been updated to 8, with Android API level 24.
- BREAKING CHANGE: Metric Instrument names are now case-insensitive.
- BREAKING CHANGE: The type-safety on Attributes has been moved to a new AttributeKey, and the AttributeValue wrappers have been removed. This impacts all the semantic attribute definitions, and the various APIs that use Attributes.
- BREAKING CHANGE: The obsolete HTTP_STATUS_TEXT semantic attribute has been removed.
- BREAKING CHANGE: The type of the REDIS_DATABASE_INDEX semantic attribute has been changed to be numeric.
- BREAKING CHANGE: Constant Labels have been removed from metric Instrument definitions.
- BREAKING CHANGE: The number of available Span Status options has been greatly reduced (from 16 to 3).
- BREAKING CHANGE: Constant labels have been removed from metric Instrument definitions.
- BREAKING CHANGE: The only way to specify span parenting is via a parent Context
- BREAKING CHANGE: The default TextMapPropagator is now a no-op in the API
- BREAKING CHANGE: CorrelationContext has been renamed to Baggage
- BREAKING CHANGE: Null-valued span attribute behavior has been changed to being "unspecified".
- BREAKING CHANGE: Link and Event interfaces have been removed from the API
- BREAKING CHANGE: The Status object has been removed from the API, in favor of StatusCanonicalCode
- BUGFIX: the
noParent
option on a Span was being ignored if it was set after setting an explicit parent. - BUGFIX: Attributes and Labels now preserve the latest added entry when an existing key has been used.
- BUGFIX: Updated some of the W3C traceparent validation logic to better match the spec.
- FaaS semantic attributes have been added
- Semantic attribute for "exception.escaped" added
-
SDK
- BREAKING CHANGE: The names of the Sampler.Decision enum values, returned by the Sampler interface, have changed.
OpenTelemetrySdk.forceFlush()
now returns a CompletableResultCode- BREAKING CHANGE: The
ProbabilitySampler
has been renamed toTraceIdRatioBased
- BREAKING CHANGE: The environment variables/system properties for specifying exporter and span processor configuration have been updated to match the specification.
- BREAKING CHANGE: Exported zipkin attributes have been changed to match the specification.
- BREAKING CHANGE: Metric Descriptor attributes have been flattened into the MetricData for export.
- BREAKING CHANGE: The OpenTelemetrySdk class now returns a TraceSdkManagement interface, rather than the concrete TracerSdkProvider.
- BUGFIX: Zipkin span durations are now rounded up to 1 microsecond, if less than 1.
- BUGFIX: The insecure option for OTLP export now does the correct thing.
- Added a configuration option for disabling SPI-provided ResourceProviders
- New incubator module with helper classes for working with SpanData
- AWS resources now include the
cloud.provider
attribute.
-
Extensions
- BREAKING CHANGE: Propagators now only expose a singleton instance.
- The auto-config extension has been moved to the instrumentation project.
- New incubator module with some utilities for mutating SpanData instances.
- The AWS Resource extension will now pull in EKS Resource attributes.
- New pre-release extension for handling logging natively.
Many thanks to all who made this release possible:
@bogdandrutu @Oberon00 @jkwatson @thisthat @anuraaga @jarebudev @malafeev @quijote @JasonXZLiu @zoercai @eunice98k @dengliming @breedx-nr @iNikem @wangzlei @imavroukakis
-
Extensions:
- Updated metrics generated by the runtime_metrics module to match the proposed semantic conventions.
-
API:
- BREAKING CHANGE: Renamed HttpTextFormat to TextMapPropagator
- Added a toBuilder method to the Attributes class
- Added method to create an Attributes Builder from ReadableAttributes
- Updates to the Attributes' null-handling to conform to the specification
- TraceState validations were updated to match the W3C specification
- recordException Span API now has an additional overload to support additional attributes
-
SDK:
- BUGFIX: Bound instruments with no recordings no longer generate data points.
- BREAKING CHANGE: The Exporter interfaces have changed to be async-friendly.
- BREAKING CHANGE: The parent context passed to the Sampler will no longer be nullable, but instead an invalid context will be passed.
- BREAKING CHANGE: The SpanProcessor now takes a ReadWriteSpan for the onStart method
- BREAKING CHANGE: ResourceConstants changed to ResourceAttributes
- BREAKING CHANGE: ParentOrElse Sampler changed to be called ParentBased
- Default Resource include the SDK attributes
- ResourceProvider SPI to enable custom Resource providers
- The individual pieces of the SDK are not published as individual components, in addition to the whole SDK artifact.
- Zipkin and Jaeger exporters now include the InstrumentationLibraryInfo attributes.
- The OTLP protobufs were updated to version 0.5.0 and the OTLP exporters were updated accordingly.
-
Many thanks for contributions from @anuraaga, @dengliming, @iNikem, @huntc, @jarebudev, @MitchellDumovic, @wtyanan, @williamhu99, @Oberon00, @thisthat, @malafeev, @mateuszrzeszutek, @kenfinnigan
- BUGFIX: OTLP Span Exporter: fix splitting metadata key-value substring with more than one '=' sign
NOTE: This release contains non-backward-compatible breaking SDK changes
- Added an InMemoryMetricExporter
- Added a toBuilder method to Labels
- Added some semantic attribute constants
- New ZPages extension module with TraceZ and TraceConfigZ pages implemented
- Some overloads added for setting the parent Context
- Some performance improvements in HttpTraceContext implementation
- Removed null checks from the Trace APIs
- The bare API will no longer generate Trace and Span IDs when there is no parent trace context.
- Null Strings are no longer valid keys for Attributes
- BREAKING CHANGE: The Sampler API was changed
- Default endpoint is now set for the OTLP exporters
- BREAKING CHANGE: Jaeger exporter env vars/system properties were updated
- Resource attributes may now be set with a System Property as well as the environment variable.
- Added a propagator for Lightstep OpenTracing propagator
- The ZipkinSpanExporter now defaults to using the OkHttpSender
- The default Sampler in the SDK is now the ParentOrElse sampler
- BUGFIX: SpanWrapper SpanData implementation is now truly Immutable
- Added some simple logging for failed export calls
- Quieted the noisy B3 propagator
- Public constants were added for exporter configuration options
- Added a new configuration option to limit the size of Span attributes
- Many thanks for contributions from @anuraaga, @dengliming, @iNikem, @wtyanan, @williamhu99, @trask, @Oberon00, @MitchellDumovic, @FrankSpitulski, @heyams, @ptravers, @thisthat, @albertteoh, @evantorrie, @neeraj97,
NOTE: This release contains non-backward-compatible breaking API and SDK changes
- Introduction of immutable Attributes for SpansEvents, Links and Resources
- Introduction of immutable Labels for Metric Instruments and Recordings
- BUGFIX: make sure null Points are not propagated to metric exporters
- Added a propagator for AWS X-Ray
- BUGFIX: IntervalMetricReader now handles exceptions thrown by metric exporters
- Renamed contrib modules to "extensions" (Note: this changes the published artifact names, as well)
- Converted CorrelationContext entry keys and values to simple Strings
- Enhanced OTLP exporter configuration options
- Added new SDK Telemetry Resource populator
- Introduced an new MultiTracePropagator to handle multiple propagation formats
- Added new AWS Resource populators
- Added an extension to populate span data into log4j2 log formats.
- Changed the MinMaxSumCount aggregations for ValueRecorders to always aggregate deltas, rather than cumulative
- Updated the OTLP protobuf and exporter to version 0.4.0 of the OTLP protobufs.
TODO: fill this out
- Add helper API to get Tracer/Meter
- Initial implementation of the Zipkin exporter.
- Breaking change: Move B3 propagator to a contrib package
- Add support for Jaeger propagator
- Start implementing support for configuring exporters using Config pattern with support to load from environment variables and system properties.
- Add support to flush the entire SDK processors and exporter pipelines.
- Mark all threads/pools as daemon.
- Add support for Jaeger remote sampler.
- Initial Java API and SDK for context, trace, metrics, resource.
- Initial implementation of the Jaeger exporter.
- Initial implementation of the OTLP exporters for trace and metrics.