OpenTelemetry - java
Notes
no notes yet
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 optionalConfigPropertiesinstance 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 newOpenTelemetryResourceAutoConfigurationclass 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.