Version 0.17.0 (RC)
0.17.0 is planned to be the final release before 1.0.0. Due to some confusion, we have consistently wavered on the goal of API stability and apologize for it. All maintainers are committed to making sure there are no further breaking changes unless a critical user facing bug or security issue is found. This is it. If you have trouble updating any code, let us know - if it's open source we can even make the change.
General
Note: In an effort to accelerate our work toward a 1.0.0 release, we have skipped the deprecation phase
on a number of breaking changes. We apologize for the inconvenience this may have caused. We are very
aware that these changes will impact users. If you need assistance in migrating from previous releases,
please open a discussion topic at
https://github.com/open-telemetry/opentelemetry-java/discussions.
Many classes have been made final that previously were not. Please reach out if you have a need to
provide extended functionality, and we can figure out how best to solve your use-case.
API
☢️Breaking Changes
TraceStateBuilder.set(String, String)has been renamed toTraceStateBuilder.put(String, String).BaggageBuilder.setParent()andBaggageBuilder.setNoParent()have been removed from the Baggage APIs.
In addition, Baggage will no longer be implicitly generated from Baggage that is in the current context. You now must explicitly
get theBaggageinstance from theContextand calltoBuilder()on it in order to get the entries pre-populated in your builder.TextMapPropagator.SetterandTextMapPropagator.Getterhave been moved to the top level and renamed to
TextMapSetterandTextMapGetterrespectively.OpenTelemetry.getDefault()has been renamed toOpenTelemetry.noop().OpenTelemetry.getPropagating()has been renamed toOpenTelemetry.propagating().TracerProvider.getDefault()has been renamed toTracerProvider.noop()Tracer.getDefault()has been removed.TraceId.getTraceIdRandomPart(CharSequence)has been removed.- The
B3Propagator.getInstance()has been renamed toB3Propagator.injectingSingleHeader(). - The
B3Propagator.builder()method has been removed. As a replacement, you can useB3Propagator.injectingMultiHeaders()directly.
SDK
☢️Breaking Changes
- The SPI for configuring Resource auto-populators has been removed from the SDK and moved to the
opentelemetry-sdk-extension-autoconfiguremodule.
This means thatResource.getDefault()will no longer be populated via SPI, but only include the bare minimum values from the SDK itself.
In order to get the auto-configured Resource attributes, you will need to use theopentelemetry-sdk-extension-autoconfiguremodule directly. InstrumentationLibraryInfo.getEmpty()has been renamed toInstrumentationLibraryInfo.empty().Resource.getEmpty()has been renamed toResource.empty().- When specifying the endpoints for grpc-based exporters, you now are required to specify the protocol. Hence, you must include
thehttp://orhttps://in front of your endpoint. - The option on
SpanLimitsto truncate String-valued Span attributes has been removed (this is still pending in the specification). - The
InMemoryMetricsExporterhas been removed from theopentelemetry-sdk-testingmodule.
🌟Miscellaneous
- The default values for SpanLimits have been changed to 128, from 1000, to match the spec.
Extensions
☢️Breaking Changes
- In the
opentelemetry-sdk-extension-autoconfiguremodule, we have changed the system property used to exclude some Resource auto-populators to be
otel.java.disabled.resource-providersinstead ofotel.java.disabled.resource_providers. - In the
opentelemetry-sdk-extension-autoconfiguremodule, you now specify theOtTracePropagatorwith the"ottrace"option, rather than"ottracer". - In the
opentelemetry-sdk-extension-autoconfiguremodule, the default exporters are now set to be"otlp", as required by the 1.0.0 specification. - In the
opentelemetry-sdk-extension-autoconfiguremodule, the default propagators are now set to be"tracecontext,baggage", as required by the 1.0.0 specification. - The
CommonPropertiesclass has been removed from theopentelemetry-sdk-extension-otprotomodule.
Metrics (alpha)
☢️API
Meter.getDefault()has been removed.MeterProvider.getDefault()has been renamed toMeterProvider.noop().