Releases: open-telemetry/opentelemetry-java
Releases · open-telemetry/opentelemetry-java
Version 1.7.0
Version 1.7.0 (2021-10-08):
General
- IMPORTANT: The
io.opentelemetry:opentelemetry-protomodule should now be considered deprecated. It will be removed from publications in a future release. If you need Java bindings for the OTLP protobufs, they are now being published via the new opentelemetry-proto-java repository. They are at new maven coordinates:io.opentelemetry.proto:opentelemetry-protoand versioning is aligned with the released version of the protobuf definitions themselves.
SDK
Exporters
- BREAKING CHANGE: The Jaeger gRPC exporter does not directly use the
protobuf-javalibrary for
marshaling trace data. Along with this, theopentelemetry-exporter-jaegerartifact does not
contain generated protobuf classes for the Jaeger API. If you were using these in your
application, you must update your build configuration to also include the newjaeger-proto
artifact. This artifact will not be included in a future 2.0 release of the SDK so it is
recommended to instead generated the protobuf classes in your own build. - BREAKING CHANGE: The
opentelemetry-exporter-otlp-http-*exporter default endpoint ports have
changed from4317to4318, in line with recent changes to the spec. - The OTLP gRPC exporters will now function without the
grpc-javadependency, ifokhttpis
present on the classpath. - The (alpha) metrics that are generated by the gRPC exporters have changed slightly. They now have
a slightly different instrumentation library name,"io.opentelemetry.exporters.otlp-grpc"and
the names of the metrics have also changed. Now emitted are metrics with
namesotlp.exporter.seenandotlp.exported.exported. Note that it is likely this will change
in the future as the metrics semantic conventions are more defined.
Auto-configuration (alpha)
- BREAKING CHANGE: The behavior of
otel.exporter.otlp.endpointhas changed when the protocol
ishttp/protobuf. The new behavior is in line with recent changes to the specification, which states that the signal path (e.g.v1/tracesorv1/metrics) is appended to the configured endpoint. Values for signal specific endpoint configuration (e.g.otel.exporter.otlp.traces.endpointandotel.exporter.otlp.metrics.endpoint) override the generic endpoint configuration and are used as-is without modification. - The
compressionoption for exporters now explicitly supports thenonevalue, in addition to the existinggzipvalue.
Metrics (alpha)
- BREAKING CHANGE: The
IntervalMetricReaderhas been removed, and replaced with
aPeriodicMetricReaderthat provides an implementation of the newMetricReaderinterface. - This release includes initial support for multiple exporters to be configured for a single SDK
instance. See theSdkMeterProviderBuilder.registerMetricReadermethod for more details. - This release includes initial support for the SDK recording of Metric Exemplars for sampled Spans.
SeeSdkMeterProviderBuilder.setExemplarFilterand theExemplarFilterinterface for
more details.
Logging (alpha)
- This release includes SDK extension interfaces for
LogProcessors andLogExporters, and has
implementations for batch log processing and export via OTLP. These classes are intended for usage
in implementations of log appenders that emit OTLP log entries.
Version 1.6.0
API
- Various performance optimizations
- 1 and 2 element Attributes instances now bypass some logic to reduce object allocations.
- The result of
hashCode()ofAttributeKeyis now cached. - Checks for base-16 validity of TraceId and SpanId have been optimized.
- Internally created
SpanContextinstances now bypass unneeded validation.
Semantic Conventions (alpha)
- The
SemanticAttributesandResourceAttributesclasses have been updated to match the semantic
conventions as of specification release1.6.1.
SDK
- The
io.opentelemetry.sdk.trace.ReadableSpaninterface has been expanded to include
agetAttribute(AttributeKey)method. - The
io.opentelemetry.sdk.trace.SpanLimitsclass now supports enforcing a maximum Span attribute
length (measured in characters) on String and String-array values.
Exporters
- The OTLP exporters have been undergone a significant internal rework. Various performance
optimizations have been done on process of converting to the OTLP formats. Because of this, the exporter libraries
no longer have a runtime dependency on theopentelemetry-protoartifact, or transitivelyprotobuf. If you were
using code from these libraries through these transitive dependencies, you will need to add them directly to your
build. - The OTLP metric exporter no longer exports the deprecated metric
Labels, onlyAttributes. This
means that your collector MUST support at least OTLP version0.9.0to properly ingest metric
data. - BREAKING CHANGE: The
OtlpHttpMetricExporterclass has been moved into
theio.opentelemetry.exporter.otlp.http.metricspackage. - BUGFIX: The
OtlpGrpcSpanExporterandOtlpGrpcMetricExporterwill now wait for the underlying
grpc channel to be terminated when shutting down. - The OTLP exporters now optionally support
gzipcompression. It is not enabled by default.
SDK Extensions
- The
AwsXrayIdGeneratorin theopentelemetry-sdk-extension-awsmodule has been deprecated. This
implementation has been superseded by the one in
the opentelemetry-java-contrib
project and will not be maintained here going forward.
Auto-configuration (alpha)
- The
otel.traces.exporter/OTEL_TRACES_EXPORTERoption now supports a comma-separated list of
exporters. - The Metrics SDK will no longer be configured by default. You must explicitly request an exporter
configuration in order to have a Metrics SDK configured. - BREAKING CHANGE: All SPI interfaces are now in a separate module from the autoconfiguration
module:opentelemetry-sdk-extension-autoconfigure-spi. - BREAKING CHANGE:
ConfigPropertiesandConfigurationExceptionhave been moved to a new
package (io.opentelemetry.sdk.autoconfigure.spi) and
module (opentelemetry-sdk-extension-autoconfigure-spi). - BREAKING CHANGE: All SPI interfaces now take a
ConfigPropertiesinstance on their methods. - BUGFIX: Exceptions thrown during the loading of an SPI implementation class are now handled more
gracefully and will not bubble up unless you have explicitly requested the bad implementation as
the one to use. - You can now specify
gzipcompress for the OTLP exporters via theotel.exporter.otlp.compression
/OTEL_EXPORTER_OTLP_COMPRESSIONconfiguration option. - You can now specify maximum Span attribute length via the
otel.span.attribute.value.length.limit
/OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMITconfiguration option.
Metrics (alpha)
- BREAKING CHANGES: The metrics SDK has numerous breaking changes, both behavioral and in the SDK's
configuration APIs.- The default aggregation for a
Histograminstrument has been changed to be a Histogram, rather than a Summary. - Registration of Views has undergone significant rework to match the current state of the SDK specification. Please reach out on CNCF slack in the #otel-java channel, or in a github discussion if you need assistance with converting to the new Views API.
- The OTLP exporter no longer exports the deprecated metric
Labels, onlyAttributes. This means that your collector MUST support at least OTLP version0.9.0to properly ingest metric data. - It is no longer possible to provide custom aggregations via a View. This feature will return in the future.
- The default aggregation for a
Version 1.5.0
API
- The
io.opentelemetry.context.ContextStorageinterface now allows providing a rootContext.
SDK
- The
io.opentelemetry.sdk.trace.samplers.SamplingResultclass has been enhanced with new factory methods for the static result values. - The
io.opentelemetry.exporter.otlp.trace.OtlpGrpcSpanExporternow supports setting custom TLS certificates. - The
io.opentelemetry.sdk.trace.ReadableSpaninterface now exposes the parent SpanContext directly. - The
io.opentelemetry.sdk.resources.Resourcenow exposes agetAttribute(AttributeKey)method to directly retrieve attributes. - A new
opentelemetry-exporter-otlp-http-tracemodule is now available to support OTLP over HTTP exports.
SDK Extensions
- The
opentelemetry-sdk-extension-resourcesmodule now provides a newContainerResourcethat auto-detects docker container Resource attributes. - The Jaeger Remote Sampler in the
opentelemetry-sdk-extension-jaeger-remote-samplermodule is nowjava.io.Closeable.
Testing
- The SDK testing module (
opentelemetry-sdk-testing) has been enhanced with additional assertions for Spans and Attributes.
Auto-configuration (alpha)
- BREAKING CHANGE:
io.opentelemetry.sdk.autoconfigure.ConfigPropertiesin theopentelemetry-sdk-extension-autoconfigureis now an interface
andio.opentelemetry.sdk.autoconfigure.OpenTelemetrySdkAutoConfiguration.initiatize()now accepts an optionalConfigProperties
instance to add properties to the standard auto-detected ones. - BREAKING CHANGE:
OpenTelemetrySdkAutoConfiguration.getResource()has been removed in favor of using the newOpenTelemetryResourceAutoConfigurationclass. - The
opentelemetry-sdk-extension-autoconfiguremodule now exposes a newOpenTelemetryResourceAutoConfiguration
class specifically for acquiring autoconfiguredResourceinstances. - The
opentelemetry-sdk-extension-autoconfiguremodule now provides an option to not set the GlobalOpenTelemetry instance when auto-configuring. - The
opentelemetry-sdk-extension-autoconfiguremodule now has support for signal-specific timeout, header and TLS certificate configuration. - A new SPI option is available for configuring a metrics exporter. See
io.opentelemetry.sdk.autoconfigure.spi.ConfigurableMetricExporterProviderfor details. - A new
OTEL_TRACES_SAMPLER/otel.traces.sampleroption is available:jaeger_remote.- It can be configured using the
OTEL_TRACES_SAMPLER_ARG/otel.traces.sampler.arg, which is parsed as a comma-separated map.- For example
-Dotel.traces.sampler=jaeger_remote -Dotel.traces.sampler.arg=endpoint=192.168.1.5:14250,pollingInterval=5000,initialSamplingRate=0.01
- For example
- It can be configured using the
Semantic Conventions (alpha)
- The
SemanticAttributesandResourceAttributesclasses have been updated to match the semantic conventions
as of specification release1.5.0.
Metrics (alpha)
- BREAKING CHANGE: The Metrics API has been completely re-written to match the newly specified API.
Please reach out on CNCF slack in the #otel-java channel,
or in a github discussion if you need assistance with converting to the new API. - A new
opentelemetry-exporter-otlp-http-metricsmodule is now available to support OTLP over HTTP exports.
Version 1.4.1
- Fill labels in addition to attributes during OTLP metrics export to support versions of the
OpenTelemetry Collector which do not support the new protocol yet.
Version 1.4.0
API
Enhancements
- You can now assign an OpenTelemetry schema URL to a
Tracervia the newTracerBuilderclass that is
accessed via theTracerProvideror any of the global instances that delegate to one.
Extensions
- A new
@SpanAttributeannotation has been added for adding method parameters to spans automatically. This
has no implementation in this release, but should be supported by the auto-instrumentation agent soon.
Exporters
Bugfixes
- Calling
shutdown()multiple times on the OTLP and Jaeger GRPC-based exporters will now work correctly and return a proper
implementation ofCompletableResultCodefor the calls beyond the first.
SDK
Bugfixes
- If the
jdk.unsupportedpackage is not available, theBatchSpanProcessorwill now fall back to a supported, standardQueueimplementation.
Enhancements
- A
Resourcecan now be assigned an OpenTelemetry schema URL via theResourceBuilderor thecreate(Attributes, String)
method on theResourceitself. - You can now obtain a default
Clockbased on system time viaClock.getDefault. The sdk-testing artifact also provides
aTestClockfor unit testing.
Semantic Conventions (alpha)
- The
SemanticAttributesandResourceAttributesclasses have been updated to match the semantic conventions
as of specification release1.4.0. These classes also now expose aSCHEMA_URLfield which points at the
version of the OpenTelemetry schema the files were generated from. There are no breaking changes in this update, only additions.
Metrics (alpha)
- You can now assign an OpenTelemetry schema URL to a
Metervia the newMeterBuilderclass that is
accessed via theMeterProvideror any global instances that delegate to one. - The metrics SDK now utilizes
Attributesrather thanLabelsinternally. - You can now register an
IntervalMetricReaderas global andforceFlushthe global reader.
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.noopapiname. - The
io.opentelemetry.sdk.autoconfiguremodule now supports theOTEL_SERVICE_NAME/otel.service.name
environment variable/system property for configuring the SDK'sResourceimplementation.
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.timeoutOTEL_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-friendlyIdGeneratorinstance in that case. This will affect any usage of the SDK that does not
explicitly specify a customIdGeneratorinstance 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
W3CBaggagePropagatorwill no longer explicitly populate an emptyBaggageinstance into the context when
the header is unparsable. It will now return the provided Context instance unaltered, as is required by the specification. - The
AwsXrayPropagatorwill no longer explicitly populate an invalidSpaninstance 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-thriftexporter has had its dependency on thejaeger-clientlibrary updated to version1.6.0. - The
zipkinexporter now has an option to specific a custom timeout. - The
zipkin,jaegerandjaeger-thriftexporters will now report theotel.dropped_attributes_countandotel.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
enums are now defined as staticpublic static finalconstants 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
HostResourceResource and the correspondingResourceProviderhas been added.
It will populate thehost.nameandhost.archResource Attributes. - A new
ExecutorServiceSpanProcessorhas been added to theopentelemetry-sdk-extension-tracing-incubatormodule. This implementation
of a batch SpanProcessor allows you to provide your own ExecutorService to do the background export work. - The
autoconfiguremodule 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
autoconfiguremodule 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
autoconfiguremodule now exposes theEnvironmentResourceclass to provide programmatic access to aResource
built from parsing theotel.resource.attributesconfiguration property.
Metrics (alpha)
Breaking Changes
- The deprecated
SdkMeterProvider.registerView()method has been removed. The ViewRegistry is now immutable and cannot
be changed once theSdkMeterProviderhas been built.
Bugfixes
- OTLP summaries now have the proper percentile value of
1.0to represent the maximum; previously it was wrongly set to100.0.
Enhancements
- There is now full support for delta-aggregations with the
LongSumAggregatorandDoubleSumAggregator.
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
@GuardedByannotation for errorprone so there won't be an accidental
transitive dependency on a 3rd-party jar. - The
TraceStateBuildernow will not crash when an empty value is provided.
Enhancements
- The
Contextclass now provides methods to wrapjava.util.concurrent.Executorandjava.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_MAPand theHTTP_HEADERtype propagators for the shim.
Seeio.opentelemetry.opentracingshim.OpenTracingPropagatorsfor 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 longerfailthe result
when the timeout happens. Nor willwhenCompleteactions be executed in that case. - The
SimpleSpanProcessornow 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
Linkentries 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
BatchSpanProcessorhave had some optimization done on them, to reduce CPU
usage under load. - The
Resourceclass now hasbuilder()andtoBuilder()methods and a correspondingResourceBuilderclass
has been introduced for more fluent creation and modification ofResourceinstances. - 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
autoconfiguremodule without a metrics SDK on the classpath.
Enhancements
- The
autoconfiguremodule now supportsOTEL_EXPORTER_OTLP_METRICS_ENDPOINTandOTEL_EXPORTER_OTLP_TRACES_ENDPOINT
settings, in addition to the combinedOTEL_EXPORTER_OTLP_ENDPOINTenvironment variable. Corresponding
system properties are also supported (-Dotel.exporter.otlp.metrics.endpointand-Dotel.exporter.otlp.traces.endpoint). - An
SdkMeterProviderConfigurerSPI is now available in theautoconfiguremodule.
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 theResourceAttributesclass:
ResourceAttributes.CLOUD_ZONEhas been replaced withResourceAttributes.CLOUD_AVAILABILITY_ZONE.
Metrics (alpha)
Breaking Changes
- The
ViewRegistrynow lets you registerViewobjects, rather thanAggregatorFactoryinstances. GlobalMetricsProviderhas been renamed toGlobalMeterProvider.Viewregistration has been moved to theSdkMeterProviderBuilderand 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
NullPointerExceptionin 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-protomodule is now versioned as analphamodule, as it contains non-stable
metrics and logs signals. It has hence been removed from the main BOM. - The
opentelemetry-sdk-extension-otprotomodule has been removed. The classes in it have been moved
to a newopentelemetry-exporter-otlp-commonmodule but have been repackaged into an unsupported,
internal package.
Metrics (alpha)
Breaking Changes
PrometheusCollector.Builderinner class has been moved to the top level asPrometheusCollectorBuilder.