Skip to content

Releases: open-telemetry/opentelemetry-java

Version 1.5.0

13 Aug 06:15
154915f
Compare
Choose a tag to compare

API

  • The io.opentelemetry.context.ContextStorage interface now allows providing a root Context.

SDK

  • The io.opentelemetry.sdk.trace.samplers.SamplingResult class has been enhanced with new factory methods for the static result values.
  • The io.opentelemetry.exporter.otlp.trace.OtlpGrpcSpanExporter now supports setting custom TLS certificates.
  • The io.opentelemetry.sdk.trace.ReadableSpan interface now exposes the parent SpanContext directly.
  • The io.opentelemetry.sdk.resources.Resource now exposes a getAttribute(AttributeKey) method to directly retrieve attributes.
  • A new opentelemetry-exporter-otlp-http-trace module is now available to support OTLP over HTTP exports.

SDK Extensions

  • The opentelemetry-sdk-extension-resources module now provides a new ContainerResource that auto-detects docker container Resource attributes.
  • The Jaeger Remote Sampler in the opentelemetry-sdk-extension-jaeger-remote-sampler module is now java.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.ConfigProperties in the opentelemetry-sdk-extension-autoconfigure is now an interface
    and io.opentelemetry.sdk.autoconfigure.OpenTelemetrySdkAutoConfiguration.initiatize() now accepts an optional ConfigProperties
    instance to add properties to the standard auto-detected ones.
  • BREAKING CHANGE: OpenTelemetrySdkAutoConfiguration.getResource() has been removed in favor of using the new OpenTelemetryResourceAutoConfiguration class.
  • The opentelemetry-sdk-extension-autoconfigure module now exposes a new OpenTelemetryResourceAutoConfiguration
    class specifically for acquiring autoconfigured Resource instances.
  • The opentelemetry-sdk-extension-autoconfigure module now provides an option to not set the GlobalOpenTelemetry instance when auto-configuring.
  • The opentelemetry-sdk-extension-autoconfigure module 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.ConfigurableMetricExporterProvider for details.
  • A new OTEL_TRACES_SAMPLER/otel.traces.sampler option 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

Semantic Conventions (alpha)

  • The SemanticAttributes and ResourceAttributes classes have been updated to match the semantic conventions
    as of specification release 1.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-metrics module is now available to support OTLP over HTTP exports.

Version 1.4.1

15 Jul 02:52
Compare
Choose a tag to compare
  • 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

09 Jul 15:03
f13fe79
Compare
Choose a tag to compare

API

Enhancements

  • You can now assign an OpenTelemetry schema URL to a Tracer via the new TracerBuilder class that is
    accessed via the TracerProvider or any of the global instances that delegate to one.

Extensions

  • A new @SpanAttribute annotation 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 of CompletableResultCode for the calls beyond the first.

SDK

Bugfixes

  • If the jdk.unsupported package is not available, the BatchSpanProcessor will now fall back to a supported, standard Queue implementation.

Enhancements

  • A Resource can now be assigned an OpenTelemetry schema URL via the ResourceBuilder or the create(Attributes, String)
    method on the Resource itself.
  • You can now obtain a default Clock based on system time via Clock.getDefault. The sdk-testing artifact also provides
    a TestClock for unit testing.

Semantic Conventions (alpha)

  • The SemanticAttributes and ResourceAttributes classes have been updated to match the semantic conventions
    as of specification release 1.4.0. These classes also now expose a SCHEMA_URL field 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 Meter via the new MeterBuilder class that is
    accessed via the MeterProvider or any global instances that delegate to one.
  • The metrics SDK now utilizes Attributes rather than Labels internally.
  • You can now register an IntervalMetricReader as global and forceFlush the global reader.

Version 1.3.0

09 Jun 15:40
7237404
Compare
Choose a tag to compare

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 the io.opentelemetry.extension.noopapi name.
  • The io.opentelemetry.sdk.autoconfigure module now supports the OTEL_SERVICE_NAME/otel.service.name
    environment variable/system property for configuring the SDK's Resource 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

07 May 20:56
0b8131c
Compare
Choose a tag to compare

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. See Span.setAllAttributes(Attributes) and SpanBuilder.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-friendly IdGenerator instance in that case. This will affect any usage of the SDK that does not
    explicitly specify a custom IdGenerator 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 empty Baggage 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 invalid Span 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 the jaeger-client library updated to version 1.6.0.
  • The zipkin exporter now has an option to specific a custom timeout.
  • The zipkin, jaeger and jaeger-thrift exporters will now report the otel.dropped_attributes_count and otel.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 static public 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 corresponding ResourceProvider has been added.
    It will populate the host.name and host.arch Resource Attributes.
  • A new ExecutorServiceSpanProcessor has been added to the opentelemetry-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 the EnvironmentResource class to provide programmatic access to a Resource
    built from parsing the otel.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 the SdkMeterProvider has been built.

Bugfixes

  • OTLP summaries now have the proper percentile value of 1.0 to represent the maximum; previously it was wrongly set to 100.0.

Enhancements

  • There is now full support for delta-aggregations with the LongSumAggregator and DoubleSumAggregator.
    See AggregatorFactory.sum(AggregationTemporality). The previous AggregatorFactory.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

07 Apr 04:49
768bde8
Compare
Choose a tag to compare

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 wrap java.util.concurrent.Executor and java.util.concurrent.ExecutorService
    instances to do context propagation using the current context. See io.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 the HTTP_HEADER type propagators for the shim.
    See io.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 longer fail the result
    when the timeout happens. Nor will whenComplete 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 when forceFlush() is called. Similiarly, this is also done on shutdown().
  • 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 has builder() and toBuilder() methods and a corresponding ResourceBuilder class
    has been introduced for more fluent creation and modification of Resource 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 supports OTEL_EXPORTER_OTLP_METRICS_ENDPOINT and OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
    settings, in addition to the combined OTEL_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 the autoconfigure 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 the ResourceAttributes class:
    ResourceAttributes.CLOUD_ZONE has been replaced with ResourceAttributes.CLOUD_AVAILABILITY_ZONE.

Metrics (alpha)

Breaking Changes

  • The ViewRegistry now lets you register View objects, rather than AggregatorFactory instances.
  • GlobalMetricsProvider has been renamed to GlobalMeterProvider.
  • View registration has been moved to the SdkMeterProviderBuilder and the methods on the SdkMeterProvider
    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

11 Mar 07:41
Compare
Choose a tag to compare

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

26 Feb 20:25
6dd3eac
Compare
Choose a tag to compare

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 an alpha 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 new opentelemetry-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 as PrometheusCollectorBuilder.

Many thanks to all the people who have contributed over the past few years! We couldn't have done without everyone's help.

contributors

Version 0.17.1 (RC)

19 Feb 06:47
Compare
Choose a tag to compare

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)

18 Feb 05:10
0eb4fb2
Compare
Choose a tag to compare

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 to TraceStateBuilder.put(String, String).
  • BaggageBuilder.setParent() and BaggageBuilder.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 the Baggage instance from the Context and call toBuilder() on it in order to get the entries pre-populated in your builder.
  • TextMapPropagator.Setter and TextMapPropagator.Getter have been moved to the top level and renamed to
    TextMapSetter and TextMapGetter respectively.
  • OpenTelemetry.getDefault() has been renamed to OpenTelemetry.noop().
  • OpenTelemetry.getPropagating() has been renamed to OpenTelemetry.propagating().
  • TracerProvider.getDefault() has been renamed to TracerProvider.noop()
  • Tracer.getDefault() has been removed.
  • TraceId.getTraceIdRandomPart(CharSequence) has been removed.
  • The B3Propagator.getInstance() has been renamed to B3Propagator.injectingSingleHeader().
  • The B3Propagator.builder() method has been removed. As a replacement, you can use B3Propagator.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 that Resource.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 the opentelemetry-sdk-extension-autoconfigure module directly.
  • InstrumentationLibraryInfo.getEmpty() has been renamed to InstrumentationLibraryInfo.empty().
  • Resource.getEmpty() has been renamed to Resource.empty().
  • When specifying the endpoints for grpc-based exporters, you now are required to specify the protocol. Hence, you must include
    the http:// or https:// 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 the opentelemetry-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 of otel.java.disabled.resource_providers.
  • In the opentelemetry-sdk-extension-autoconfigure module, you now specify the OtTracePropagator 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 the opentelemetry-sdk-extension-otproto module.

Metrics (alpha)

☢️API

  • Meter.getDefault() has been removed.
  • MeterProvider.getDefault() has been renamed to MeterProvider.noop().