OpenTelemetry - java
Notes
no notes yet
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.ExecutorServiceinstances 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_ENDPOINTsettings, 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 the
ResourceAttributesclass: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 theSdkMeterProviderto 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