140 KiB
Changelog
Unreleased
Version 1.27.0 (2023-06-09)
The log bridge API / SDK are now stable! Some important notes:
- The contents of
opentelemetry-api-logshave been merged intoopentelemetry-api. - The contents of
opentelemetry-exporter-otlp-logshave been merged intoopentelemetry-exporter-otlp. - The contents of
opentelemetry-sdk-logs-testinghave been merged intoopentelemetry-sdk-testing. - The
opentelemetry-sdk-logsartifact has been marked stable. opentelemetry-sdk-extension-autoconfigurehas changed the default value ofotel.logs.exporterfromnonetootlp.
NOTE: reminder that the Logs Bridge API is not meant for end users. Log appenders use the API to bridge logs from existing log frameworks (e.g. JUL, Log4j, SLf4J, Logback) into OpenTelemetry. Users configure the Log SDK to dictate how logs are processed and exported. See opentelemetry.io for documentation on usage.
API
SDK
- Ensure correct compiled output and sources are included in multi version jar (#5487)
Logs
- Fix broken link (#5451)
- Add meaningful
.toStringtoNoopLogRecordProcessorandDefaultOpenTelemetry(#5493) - Promote log SDK to stable (#5341)
Metrics
- Reset exponential aggregator scale after collection (#5496)
- Experimental metric reader and view cardinality limits (#5494)
Exporter
Testing
- Merge sdk logs testing (#5431)
- Add a
hasBucketBoundaries()variant that allows specifying precision (#5457)
SDK Extensions
- Enable otlp logs by default in autoconfigure (#5433)
Semantic Conventions
- Update to semconv 1.20.0 (#5497)
Version 1.26.0 (2023-05-05)
This release represents the release candidate ("RC") release for the Logs Bridge API / SDK. In the
next release (1.27.0), opentelemetry-api-logs will be merged into opentelemetry-api,
opentelemetry-sdk-logs will be marked as stable, opentelemetry-exporter-otlp-logs will be
merged into opentelemetry-exporter-otlp, opentelemetry-sdk-logs-testing will be merged
into opentelemetry-sdk-testing, opentelemetry-sdk-extension-autoconfigure will enable otlp
log exporter by default (i.e. otel.logs.exporter=otlp). For more details, see tracking
issue #5340. NOTE: reminder that
the Logs Bridge API
is not meant for end users. Log appenders use the API to bridge logs from existing log
frameworks (e.g. JUL, Log4j, SLf4J, Logback) into OpenTelemetry. Users configure the Log SDK to
dictate how logs are processed and exported.
opentelemetry-opentracing-shim is now stable!
SDK
- Create OtelVersion class at build time which is used to resolve artifact version in
Resource. (#5365)
Metrics
- Add prototype histogram advice API (i.e. Hints). (#5217)
Logs
- Add LogRecord observed timestamp field. (#5370)
- Remove log record timestamp default. (#5374)
- Align BatchLogRecordProcessor defaults with specification. (#5364)
- Rename setEpoch to setTimestamp. (#5368)
- Log SDK cleanup. Move
InMemoryLogRecordExportertoopentelemetry-sdk-logs-testing. RenameInMemoryLogRecordExporter#getFinishedLogItemstogetFinishedLogRecordItems. MoveSdkEventEmitterProvderto internal package. (#5368)
Exporters
- Add scaffolding for low level exporter TLS API. (#5362)
- Add new low level TLS APIs on OTLP and Jaeger gRPC exporter builders. (#5280, #5422)
- OTLP LogRecord exporters serialize observed timestamp. (#5382)
- Update prometheus test to reflect new collector behavior. (#5417)
- Prometheus exporter checks metrics name to prevent add duplicated _total suffix. (#5308)
- Add additional OTLP test for authenticator. (#5391)
OpenTracing Shim
- Mark opentracing-shim as stable. (#5371)
SDK Extensions
- Fixes jaeger remote sampler service strategies bug resolving service name. (#5418)
- Fix flaky JaegerRemoteSamplerGrpcNettyTest. (#5385)
- Add new log level TLS APIs on JaegerRemoteSamplerBuilder. (#5422)
- Fix a parameter name typo in autoconfigure-spi module. (#5409)
Semantic Conventinos
- Add missing links to deprecated constants in SemanticAttributes. (#5406)
Project Tooling
- Update stale workflow. (#5381)
- Skip OWASP dependencyCheck on test modules. (#5383)
- Skip OWASP dependencyCheck on jmh tasks. (#5384)
- Drop create website pull request release step (#5361)
Version 1.25.0 (2023-04-07)
API
- Cache ImmutableKeyValuePairs#hashCode (#5307)
Propagators
- Remove streams from B3Propagator (#5326)
SDK
Metrics
- Stop validating instrument unit (#5279)
- Make the Executor for PrometheusHttpServer configurable (#5296)
Exporter
Testing
- Fixing up javadoc to reflect how to create a junit4 OpenTelemetryRule (#5299)
SDK Extensions
- BREAKING: Autoconfigure drops support
for
otel.exporter.otlp.metrics.default.histogram.aggregation=EXPONENTIAL_BUCKET_HISTOGRAM. UseBASE2_EXPONENTIAL_BUCKET_HISTOGRAMinstead. (#5290) - JaegerRemoteSampler use upstream grpc implementation if ManagedChannel is set (#5287)
OpenTracing Shim
- Adds version to otel tracer instrumentation scope (#5336)
OpenCensus Shim
- Adds version to otel tracer instrumentation scope (#5336)
Semantic Conventions
- Update semconv to 1.19.0 and related build tool changes (#5311)
Version 1.24.0 (2023-03-10)
SDK
Metrics
- Optimize DefaultSynchronousMetricStorage iteration to reduce allocations (#5183)
- Avoid exemplar allocations if there are no measurements (#5182)
- Remove boxed primitives from aggregations to reduce allocations (#5184)
- Stop ignoring long measurements in HistogramExemplarReservoir (#5216)
- Remove validations for noop instrument names and units (#5146)
- Allow views to select on instrument unit (#5255)
Exporter
- Add (internal) TlsConfigHelper for additional TLS configurability (#5246)
SDK Extensions
- Introduce mTLS support for JaegerRemoteSamplerBuilder (#5209) (#5248)
OpenTracing Shim
-
OpenTracing Shim: Update Tracer.close() (#5151)
-
Update version to 1.24.0 (#5198)
-
Post release 1.23.0 (#5202)
OpenCensus Shim
- Addresses opencensus-shim trace issues under otel javaagent (#4900)
Project tooling
- Cleanup readmes (#5263)
- Upgrade to gradle 8.0.1 (#5256)
- Fixed example resource provider classname. (#5235)
- Fix case of bug label in open issue workflow (#5268)
Semantic Conventions
- Update semconv to 1.19.0 (#5311)
Version 1.23.1 (2023-02-15)
- Fix bug that broke
AutoConfiguredOpenTelemetrySdk's shutdown hook. (#5221)
Version 1.23.0 (2023-02-10)
This release is a notable release for metrics:
- The base2 exponential histogram aggregation has been marked as stable. To use, configure
your
MetricExporterwith a default aggregation ofAggregation.base2ExponentialBucketHistogram()for histogram instruments. If using OTLP exporter with autoconfigure, setOTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION=BASE2_EXPONENTIAL_BUCKET_HISTOGRAM. If using configuring OTLP programatically, useOtlp*MetricExporterBuilder#setDefaultAggregationSelector(DefaultAggregationSelector). - The metrics SDK undergone significant internal refactoring which results in reduced complexity and significantly reduced memory allocation during metric collection / export.
API
Logs
- WARNING: Split out Event API from Log API. Event API is now published in
opentelemetry-api-events. API / SDK usage has also changed - see PR for details. (#5049)
SDK
- Add shutdown / close to
OpenTelemetrySdk(#5100)
Metrics
- Base2 exponential histogram aggregations are now stable. Add
base2ExponentialBucketHistogram()toAggregation. (#5143) - Promote exponential histogram data interfaces to stable package (#5120)
- Add Base2 prefix to internal exponential histogram classes (#5179)
- Add MaxScale config parameter to
Base2ExponentialBucketHistogram(#5044) - Add close method to
MetricReader(#5109) - Reuse
AggregatorHandlewith cumulative temporality to reduce allocations (#5142) - Delete notion of accumulation to reduce allocations (#5154)
- Delete bound instruments (#5157)
- Reuse aggregation handles for delta temporality to reduce allocations (#5176)
Exporter
- Add proper shutdown implementations for all exporters (#5113)
SDK Extensions
- WARNING: Remove deprecated autoconfigure exemplar filter names. Previous names
none,all,with_sampled_tracehave been removed. Usealways_off,always_on,trace_basedinstead. (#5098) - Add autoconfigure support for "none" option for propagator value (#5121)
- Add autoconfigure support for
parentbased_jaeger_remotesampler (#5123) - Autoconfigure closes up autoconfigured resources in case of exception (#5117)
- View file based config has switched from snakeyaml to snakeyaml-engine for YAML parsing. (#5138)
- Fix autoconfigure resource providers property docs (#5135)
Testing
- WARNING: Merge
opentelemetry-sdk-metrics-testingintoopentelemetry-sdk-testing. Stop publishingopentelemetry-sdk-metrics-testing. (#5144) - Sort spans by start time (parents before children as tiebreaker) to avoid common causes for flaky tests (#5026)
- Add resource assertion methods to
SpanDataAssertandMetricAssert(#5160)
Semantic Conventions
OpenTracing Shim
- Refactor to remove internal objects
BaseShimObjectandTelemetryInfo(#5087) - WARNING: Minimize public surface area of OpenTracingShim. Remove
createTracerShim(),createTracerShim(Tracer),createTracerShim(Tracer, OpenTracingPropagators). AddcreateTracerShim(TracerProvder,TextMapPropagator,TextMapPropagator). (#5110)
Project tooling
- Add OWASP dependency check (#5177)
Version 1.22.0 (2023-01-06)
API
- WARNING: GlobalOpenTelemetry trigger of autoconfiguration is now opt-in.
Previously,
GlobalOpenTelemetry.gettriggered autoconfiguration ifopentelemetry-sdk-extension-autoconfigurewas detected on the classpath. That behavior is now opt-in by setting environment variableOTEL_JAVA_GLOBAL_AUTOCONFIGURE_ENABLED=true. (#5010) - Update LoggerBuilder, MeterBuilder, TracerBuilder javadoc (#5050)
Context
- Make closing scope idempotent and non-operational when corresponding context is not current. (#5061)
SDK
- Standardize internal usage of
ConfigUtilfor reading environment variables and system properties (#5048)
Metrics
- Lazily initialize exponential histogram buckets (#5023)
- Delete MapCounter alternative exponential histogram implementation (#5047)
- Add toString to SdkMeter, SdkObservableInstrument, AbstractInstrumentBuilder (#5072)
Exporter
OtlpGrpcSpanExporter,OtlpHttpSpanExporter,OtlpGrpcLogRecordExporter,OtlpHttpLogRecordExporter,ZipkinSpanExporter, andJaegerGrpcSpanExporterare now instrumented withGlobalOpenTelemetryby default. Instrumentation initializes lazily to prevent ordering issue of accessingGlobalOpenTelemetry.getbeforeGlobalOpenTelemetry.setis called. (#4993)- Add
ConfigurableSpanExporterProviderimplementation forJaegerGrpcSpanExporter(#5002) - Add
ConfigurableSpanExporterProvider,ConfigurableMetricExporterProvider,ConfigurableLogRecordExporterProviderforOtlpGrpc{Signal}Exporters andOtlpHttp{SignalExporters (#5003) - Replace OTLP User-Agent spaces with dashes (#5080)
- Add
AutoConfigurationCustomizerProviderimplementation forPrometheusHttpServer(#5053) - Add resource
target_infoand scopetarget_infometrics toPrometheusHttpServerin compliance with spec (#5039) - Drop delta metrics in
PrometheusHttpServer(#5062) - PrometheusHttpServer drops metrics with same name and different type (#5078)
SDK Extensions
- DEPRECATION: Align autoconfigure exemplar filter names with spec. Previous names
none,all,with_sampled_traceare deprecated. Usealways_off,always_on,trace_basedinstead. (#5063)
OpenTracing Shim
- Add createTracerShim function (#4988)
Version 1.21.0 (2022-12-09)
API
API Extensions
- WARNING:
opentelemetry-extension-awshas been removed following its relocation to opentelemetry-java-contrib/aws-xray-propagator, which is published under coordinatesio.opentelemetry.contrib:opentelemetry-aws-xray-propagator:{version}. We will push security patches to1.20.xas needed. The latestopentelemetry-bomwill point to the latest published version, currently1.20.1. (#4945) - Add toString implementation to various propagator components (#4996)
SDK
Logs
- Add toString implementation to various log SDK components (#4979)
Metrics
- Add histogram collection benchmark (#4912)
- Add ExponentialHistogramIndexerBenchmark (#4989)
- Stop extra copy of exponential histogram buckets (#5020)
Exporter
- Zipkin exporter serializes EventData attributes as JSON (#4934)
- Add support for EC mTLS keys (applies to
OtlpHttp{Signal}Exporter,OtlpGrpc{Signal}Exporter,JaegerGrpcSpanExporter,JaegerRemoteSampler) (#4920) - Add
Configurable{Signal}ExporterProviderimplementations forLogging{Signal}Exporters (#4950) - Add
ConfigurableSpanExporterProviderimplementation forZipkinSpanExporter(#4991) - Add
Configurable{Signal}ExporterProviderimplementations forOtlpJsonLogging{Signal}Exporters (#4992) ZipkinSpanExporterpopulates remoteEndpoint (#4933)
SDK Extensions
- BREAKING: Remove support for otel.experimental.sdk.enabled from autoconfigure (#4973)
- De-singleton ZPageServer implementation (#4935)
- Add auto-configure support for logging-otlp exporters (#4879)
- Move DefaultConfigProperties to internal package in
opentelemetry-sdk-extension-autoconfigure-spi(#5001)
Testing
- Make APIs for asserting attributes consistent (#4882)
- Attribute assertions error messages always contain the attr key (#5027)
Semantic Conventions
OpenTracing Shim
- Handle unsupported types when setting Attributes (#4939)
- Properly set the status based on the error tag (#4962)
- Handle
io.opentracing.noop.NoopSpancorrectly (#4968) - Log invalid arguments rather than throwing exceptions. (#5012)
- Stop mapping semconv values from OpenTracing to OTel. (#5016)
Version 1.20.1 (2022-11-15)
Bugfixes
- Fix bug in
ComponentRegistrythat producesConcurrentModificationExceptionwhen reading metrics at the same time as obtaining a meter. (#4951)
Version 1.20.0 (2022-11-11)
API
- Fix bug in
W3CBaggagePropagatorthat caused+characters to be decoded as whitespace. (#4898)
API Extensions
- DEPRECATION: the
opentelemetry-extension-awsmodule containing variousAwsXrayPropagatorimplementations has been deprecated for removal in next minor version. A copy of the code will instead be maintained in opentelemetry-java-contrib/aws-xray-propagator and published under coordinatesio.opentelemetry.contrib:opentelemetry-aws-xray-propagator:{version}. (#4862)
SDK
Traces
- Add graal hints for shaded dependencies, allowing
JcToolsqueue to be used in graal environment. (#4832) Sampler#getDescription()implementations are now locale independent. (#4877)- Allow SDK to run in environments prohibiting use of
sun.misc.Unsafe. (#4902)
Metrics
- Add
toStringtoAbstractInstrument. (#4833) - Add zero bucket boundary to default explicit bucket histogram aggregation. (#4819)
Logs
- Optimize log hot path, reducing allocations significantly. (#4913)
- BREAKING: Add
Contextargument toLogRecordProcessor#onEmit. (#4889)
Exporter
OtlpLogging{Signal}Exporters encode enums as numbers. (#4783)- Add
User-Agentheader ofOTel OTLP Exporter Java/{version}to OTLP export requests. (#4784)
SDK Extensions
- WARNING:
opentelemetry-sdk-extension-awshas been removed following its relocation to opentelemetry-java-contrib/instrumentation-aws-xray, which is published under coordinatesio.opentelemetry.contrib:opentelemetry-aws-resources:{version}. We will push security patches to1.19.xas needed. The latestopentelemetry-bomwill point to the latest published version, currently1.19.0. (#4830) - WARNING:
opentelemetry-sdk-extension-resourceshas been removed following its relocation to opentelemetry-java-instrumentation/instrumentation/resources/library, which is published under coordinatesio.opentelemetry.instrumentation:opentelemetry-resources:{version}. We will push security patches to1.19.xas needed. The latestopentelemetry-bomwill point to the latest published version, currently1.19.0. (#4828) - Add autoconfigure support for
BatchLogRecordProcessor. (#4811) - Autoconfigure performs percent decoding on
otel.resource.attributesvalues. (#4653) - Unify compression configuration for exporters including
(#4775):
- Fix handling of
nonein OTLP exporters. - Add
JaegerGrpcSpanExporterBuilder#setCompression(String). - Add
ZipkinSpanExporterBuilder#setCompression(String).
- Fix handling of
Semantic Conventions
- Add migration notes to deprecated attributes (#4840)
OpenTracing Shim
- Use
opentracing-shimas instrumentation scope name. (#4890) - Add full support for multiple parents. (#4916)
Version 1.19.0 (2022-10-07)
This release contains a large number of changes to the log signal following a series of significant
changes to
the log specification.
The changes include renaming key classes like LogExporter to LogRecordExporter,
and LogProcessor to LogRecordProcessor, and LogEmitter to Logger, and more. Additionally, a
log API component has been added for emitting events and for writing log appenders. Note, the log
API is not a substitute for traditional log frameworks like Log4j, JUL, SLF4J, or Logback. While the
event portion of the API is intended for instrumentation authors and end users, the API for emitting
LogRecords is not.
See LoggerProvider
and Logger javadoc for more
details.
General
- Add
opentelemetry-bomas a dependency toopentelemetry-bom-alpha, ensuring synchronization between alpha and stable artifact versions.
API
API Extensions
- WARNING:
opentelemetry-extension-annotationshas been removed following its relocation to opentelemetry-java-instrumentation/instrumentation-annotations, which is published under coordinatesio.opentelemetry.instrumentation:opentelemetry-instrumentation-annotations:{version}. We will push security patches to1.18.xas needed. The latestopentelemetry-bomwill point to the latest published version, currently1.18.0.
Logs
- Introduce log API for emitting events and writing log appenders. The artifact is available at
coordinates
io.opentelemetry:opentelemetry-api-logs:1.19.0-alpha.
SDK
Metrics
- Change exponential histogram bucket boundaries to be lower exclusive / upper inclusive, instead of lower inclusive / upper exclusive.
Logs
- BREAKING: Rename
SdkLogEmitterProvidertoSdkLoggerProvider.OpenTelemetrySdkBuilder#setLogEmitterProviderhas changed toOpenTelemetrySdkBuilder#setLoggerProvider.OpenTelemetrySdk#getSdkLogEmitterProviderhas changed toOpenTelemetrySdk#getSdkLoggerProvider.AutoConfigurationCustomizer#addLogEmitterProviderCustomizerhas changed toAutoConfigurationCustomizer#addLoggerProviderCustomizer. - BREAKING: Rename
LogEmittertoLogger. - BREAKING: Rename
LogExportertoLogRecordExporter.SystemOutLogExporterhas changed toSystemOutLogRecordExporter.OtlpJsonLoggingLogExporterhas changed toOtlpJsonLoggingLogRecordExporter.OtlpHttpLogExporterhas changed toOtlpHttpLogRecordExporter.OtlpGrpcLogExporterhas changed toOtlpGrpcLogRecordExporter.InMemoryLogExporterhas changed toInMemoryLogRecordExporter. ConfigurableLogExporterProviderhas changed toConfigurableLogRecordExporterProvider`. - BREAKING: Rename
LogDatatoLogRecordData.TestLogDatahas changed toTestLogRecordData. - BREAKING: Rename
LogProcessortoLogRecordProcessor.BatchLogProcessorhas changed toBatchLogRecordProcessor.SimpleLogProcessorhas changed toSimpleLogRecordProcessor.
Exporter
- OTLP log record exporters now include dropped_attributes_count.
SDK Extensions
- Autoconfigure now supports an option to disable the SDK. If
otel.sdk.disabled=true,AutoConfiguredOpenTelemetrySdk#getOpenTelemetrySdk()returns a minimal (but not noop)OpenTelemetrySdkwith noop tracing, metric and logging providers. The same minimal instance is set toGlobalOpenTelemetry. The now deprecated propertyotel.experimental.sdk.enabledwill continue to work in the same way during a transition period. - Fix
ProcessResourcedirectory separator to use/or\instead of:or;. - DEPRECATION: the
opentelemetry-sdk-extension-resourcemodule containing variousResourceProviderimplementations has been deprecated for removal in next major version. A copy of the code will instead be maintained in opentelemetry-java-instrumentation/instrumentation/resources/library and published under coordinatesio.opentelemetry.instrumentation:opentelemetry-resources:{version}. - DEPRECATION: the
opentelemetry-sdk-extension-awsmodule containing AWSResourceProviderimplementations has been deprecated for removal in next major version. A copy of the code will instead be maintained in opentelemetry-java-contrib/aws-resources and published under coordinatesio.opentelemetry.contrib:opentelemetry-aws-resources:{version}.
OpenTracing Shim
- Fully support Baggage-only propagation.
Semantic conventions
- The semantic conventions have been updated to 1.13.0.
Version 1.18.0 (2022-09-09)
SDK
- Added scope attributes to
InstrumentationScopeInfoaccessible viaInstrumentationScopeInfo#getAttributes(). Will add the ability to specify scope attributes in Meter, Tracer, and Logger in a future version. - DEPRECATION: The
InstrumentationScopeInfo#create(String, String, String)method has been deprecated in favor ofInstrumentationScopeInfo#builer(String).setVersion(String).setSchemaUrl(String).build(). - Optimize
Resource#merge(Resource)by returning early if the other resource is empty.
Logs
- Fix module name of
opentelemetry-sdk-logsby changing fromio.opentelemetry.sdk.extension.loggingtoio.opentelemetry.sdk.logs.
Testing
- Add methods to assert attributes do not contain keys via
AttributeAssert#doesNotContainKey().
Exporter
- Added ability to specify local IP address in
ZipkinSpanExporterviaZipkinSpanExporterBuilder#setLocalIpAddressSupplier(Supplier<InetAddress>). - Upgrade to OTLP protobuf version 0.19.0.
- OTLP exporters now serialize
InstrumentationScopeInfo#getAttributes(). - Stop publishing
opentelemetry-exporter-jaeger-proto. Theopentelemetry-bomwill include a constraint on the last published version1.17.0. If security issues are discovered, patches will be published to1.17.x.
SDK Extensions
- BREAKING:
opentelemetry-sdk-extension-metric-incubator,opentelemetry-sdk-extension-tracing-incubator, andopentelemetry-sdk-extension-zpagesmerged intoopentelemetry-sdk-extension-incubator. - BREAKING: Move
opentelemetry-sdk-extension-jfr-eventsto opentelemetry-java-contrib/jfr-events. It will now be published under the coordinatesio.opentelemetry.contrib:opentelemetry-jfr-events:{version}. - BREAKING: Move
opentelemetry-extension-noop-apito opentelemetry-java-contrib/noop-api. It will now be published under the coordinatesio.opentelemetry.contrib:opentelemetry-noop-api:{version}. - Improve ECS resource detection to include
aws.ecs.container.arn,container.image.name,container.image.tag,aws.ecs.container.image.id,aws.log.group.arns,aws.log.group.names,aws.log.steam.names,aws.ecs.task.arn,aws.ecs.task.family, andaws.ecs.task.revision. - Fix resource
container.iddetection when using k8s with containerd v1.5.0+. - Add experimental
ConditionalResourceProviderSPI, for conditionally applying resource providers based on current config and resource.
Micrometer shim
- BREAKING: Move
opentelemetry-micrometer1-shimto opentelemetry-java-instrumentation/instrumentation/micrometer/micrometer-1.5/library. It will now be published under the coordinatesio.opentelemetry.instrumentation:opentelemetry-micrometer-1.5:{version}.
Version 1.17.0 (2022-08-12)
API
API Extensions
- DEPRECATION: the
opentelemetry-extension-annotationsmodule containing@WithSpanand@SpanAttributeannotations has been deprecated for removal in next major version. A copy of the code will instead be maintained in opentelemetry-java-instrumentation/instrumentation-annotations and published under coordinatesio.opentelemetry.instrumentation:opentelemetry-instrumentation-annotations:{version}.
SDK
Traces
- Add default implementation for
SpanData#getInstrumentationScopeInfo()andReadableSpan#getInstrumentationScopeInfo(). This fixes a previous mistake where those interfaces were extended without default implementation, a breaking change for source compatibility. Stricter checks have been added to ensure this mistake is not repeated.
Logs
- BREAKING: delete
LogDataBuilder. A similar implementation ofLogDatacalledTestLogDatahas been added toopentelemetry-sdk-logs-testing. - BREAKING: rename
LogProcessor#emit(LogData)toLogProcessor#onEmit(ReadWriteLogRecord). The argument change fromLogDatatoReadWriteLogRecordallows implementations to mutate logs. To obtainLogData, callReadWriteLogRecord#toLogData(). - Optimize
SdkLogEmitterProviderto return noopLogEmitterwhen noLogProcessors are registered.
Exporter
- Split out shared and internal exporter classes from
opentelemetry-exporter-otlp-commontoopentelemetry-exporter-common. - Add experimental support for OTLP header based authentication. To use, add a dependency
on
opentelemetry-exporter-commonand callio.opentelemetry.exporter.internal.auth.Authenticator#setAuthenticatorOnDelegate(OtlpHttp{Signal}Builder, Authenticator). - Add ability to collect export metrics on
ZipkinSpanExporterviaZipkinSpanExporter#setMeterProvider(MeterProvider). - Minor optimization to OkHttp based exporters to cache endpoint URLs. Applies
to
OtlpHttp{Signal}Exporter,OtlpGrpc{Signal}Exporter, and more. - Fix diagnostic log message in
OtlpGrpc{Signal}Exporterto include correct environment variables.
SDK Extensions
- Extend View file based configuration with support for specifying explicit bucket histogram bucket boundaries and exponential bucket counts.
- Extend autoconfigure SPI
AutoConfigurationCustomizerProviderandResourceProviderwith option to specify ordering. - Add autoconfigure SPI with
ConfigurableLogExporterProvider, allowing custom named log exporters to be provided and selected via autoconfigure. - Extend autoconfigure SPI with
AutoConfigurationCustomizer#addPropertiesCustomizer, providing the ability examine current configuration properties and add / overwrite properties.
Version 1.16.0 (2022-07-13)
API
- Fix bug
ImmutableKeyValuePairsimplementation that causesArrayIndexOutOfBoundsExceptionto be thrown under certain conditions.
SDK
Traces
- Optimize
BatchSpanProcessorusing JcTools.
Metrics
- Tighten up exponential histogram implementation for alignment with specification: Default to 160 positive and negative buckets. Remove ability to configure starting scale. Minimum number of buckets is one instead of zero.
- Allow
MetricExporterandMetricReaderto influence default aggregation. The default aggregation is used when no registered views match an instrument.
Exporter
- Fix handling of client keys in PEM format.
- For OTLP exporters, change behavior to use
OkHttpGrpcExporter(OkHttp implementation that doesn't use any gRPC dependencies) unlessOtlpGrpc{Signal}Builder#setChannel(ManagedChannel)is called by user. Previously,OkHttpGrpcExporterwas used if no gRPC implementation was found on classpath. - Add support to configure default aggregation on OTLP metric exporters
via
Otlp{Protocol}MetricExporterBuilder#setDefaultAggregationSelector(DefaultAggregationSelector).
Testing
- Add span status assertions.
SDK Extensions
- Autoconfigure properly handles non-string system properties.
- Autoconfigure normalizes hyphens
-to periods.when accessingConfigProperties.
OpenTracing Shim
- Add support for span wrappers.
- Store OpenTracing
SpanContextin OpenTracingSpanwrapper. - Use
Baggageof active span.
Version 1.15.0 (2022-06-10)
API
- Add batch callback API, allowing a single callback to record measurements to multiple metric instruments.
SDK
Metrics
SdkMeterProvider#toString()now returns a useful string describing configuration.- Fix bug preventing proper function of Metrics SDK when multiple readers are present (#4436).
- Fix reporting intervals for metrics for delta readers (#4400).
Exporter
- BREAKING: merge all stable OTLP exporters into
opentelemetry-exporter-otlp.opentelemetry-exporter-otlp-trace,opentelemetry-exporter-otlp-metrics,opentelemetry-exporter-otlp-http-trace, andopentelemetry-exporter-otlp-http-metricsare no longer published and their contents have been merged into a single artifact. - BREAKING: merge log OTLP exporters into
opentelemetry-exporter-otlp-logs.opentelemetry-exporter-otlp-http-logsis no longer published and its contents have been merged into a single artifact. - Upgrade to OTLP protobuf version 0.18.0.
- RetryInterceptor retries on
SocketTimeoutExceptionwith no message. - Added
JaegerGrpcSpanExporterBuilder#setMeterProvider(), enabling support of experimental jaeger span export metrics. - DEPRECATION: the
opentelemetry-exporter-jaeger-protomodule containing jaeger proto definitions and corresponding generated classes is deprecated for removal in next major version. - OTLP gRPC exporters support overriding
:authorityviaOtlpGrpc*ExporterBuilder#addHeader("host", "my-authority-override").
SDK Extensions
- BREAKING: Move
ConfigureableMetricExporterProviderfromopentelemetry-sdk-extension-autoconfigureto stableopentelemetry-sdk-extension-autoconfigure-spi. - Autoconfigure now supports multiple values for
otel.metrics.exporter. - Autoconfigure now supports general attribute limits, applicable to span attributes, span event attributes, span link attributes, and log attributes.
- Autoconfigure now supports an experimental option to disable the SDK.
If
otel.experimental.sdk.enabled=true,AutoConfiguredOpenTelemetrySdk#getOpenTelemetrySdk()returns a minimal (but not noop)OpenTelemetrySdk. The same minimal instance is set toGlobalOpenTelemetry. - New "get or default" methods have been added to
ConfigProperties. E.g.ConfigProperties#getString("otel.metrics.exporter", "otlp")fetches the value for the propertyotel.metrics.exporterand returnsotlpif it is not set. - Fix bug in
ContainerResourceprovider that caused it to throw an exception in some instances when containerd is used.
Micrometer shim
- Cache descriptions such that metrics with the same name use the first seen description.
Version 1.14.0 (2022-05-09)
The metrics SDK is stable! New stable artifacts include:
io.opentelemetry:opentelemetry-sdk-metrics(also now included inio.opentelemetry:opentelemetry-sdk)io.opentelemetry:opentelemetry-exporter-otlp-metrics(also now included inio.opentelemetry:opentelemetry-exporter-otlp)io.opentelemetry:opentelemetry-exporter-otlp-http-metrics- Metrics testing components have been moved
from
io.opentelemetry:opentelemetry-sdk-metrics-testingto the stableio.opentelemetry:opentelemetry-sdk-testing.
While the API of the metrics SDK is now stable, there are a couple of known issues that will be addressed in the next release:
- The start time is incorrect for delta metrics when the first recording for a set of attributes occurs after the first collections (#4400).
- Registering multiple readers results in incorrect metrics (#4436).
SDK
Traces
- Fix bug where non-runtime exception breaks
BatchSpanProcessor. - Fix bug preventing attribute limits from applying to exception events.
Logs
- BREAKING: Drop deprecated methods referencing
InstrumentationLibraryInfofrom Log SDK.
Metrics
- Instrument name is validated. If invalid, a warning is logged and a noop instrument is returned.
- Default unit is empty instead of
1. If an invalid unit is set, a warning is logged and empty is used. - Ensure symmetry between type of
PointDataand their type of exemplars (double or long). - BREAKING: Rename
MetricReader#flush()toMetricReader#forceFlush(). - Introduce
AggregationTemporalitySelectorinterface for selecting aggregation temporality based on instrument.MetricReaderandMetricExporterextendAggregationTemporalitySelector.
SDK Extensions
- BREAKING: Remove deprecated option to specify temporality
with
otel.exporter.otlp.metrics.temporality. Useotel.exporter.otlp.metrics.temporality.preferenceinstead. - Log warning when
AwsXrayPropagatorcan't identify parent span id. - Fix jaeger remote sampling bug preventing correct parsing of 0-probability sampling strategies.
Exporter
- Fix prometheus exporter formatting bug when there are no attributes.
- Ensure prometheus metrics with the same name are serialized as a group.
- BREAKING:
OtlpHttpMetricExporterBuilderandOtlpGrpcMetricExporterBuilderconfigure aggregation temporality via#setAggregationTemporalitySelector(AggregationTemporalitySelector).
Testing
- BREAKING: Metrics testing components added to stable
io.opentelemetry:opentelemetry-sdk-testingmodule, includingInMemoryMetricReader,InMemoryMetricExporter, andMetricAssertions.assertThat(MetricData)has been moved toOpenTelemetryAssertions.assertThat(MetricData). - BREAKING: The patterns for metrics assertions have been adjusted to better align with assertj conventions. See #4444 for examples demonstrating the change in assertion patterns.
- BREAKING: Metric assertion class names have been simplified.
- Add
TraceAssert.hasSpansSatisfyingExactlyInAnyOrder(..)methods.
Micrometer shim
- Instrumentation scope name changed to
io.opentelemetry.micrometer1shim.
Project tooling
- Many improvements to the build and release workflows. Big thanks to @trask for driving
standardization across
opentelemetry-java,opentelemetry-java-instrumentation, andopentelemetry-java-contrib!
Version 1.13.0 (2022-04-08)
Although we originally intended 1.13.0 to be the first stable release of the metrics SDK, we've
postponed it out of caution due to a large number of changes in both the metrics SDK specification
and the java implementation. This release should be considered a release candidate for the metrics
SDK. There are several notable changes mentioned in the Metrics section. Additionally, please note
that the Auto-configuration module now enables metric export by default via OTLP, i.e. by
default otel.metrics.exporter is set to otlp instead of none.
API
- Fix
TraceStateBuilderreuse bug.
SDK
InstrumentationScopeInforeplacesInstrumentationLibraryInfo. Methods returningInstrumentationLibraryInfoare deprecated.- Add
ResourceBuilder#removeIf(Predicate)method for symmetry withAttributesBuilder.
Traces
- Span events that record exceptions are instances of
ExceptionEventData.
Metrics
- BREAKING: Remove
MetricReaderfactory pattern:MetricReaderinstances, rather thanMetricReaderFacotry, are registered withSdkMeterProviderBuilder. For example:SdkMeterProvider.builder().registerMetricReader(PeriodicMetricReader.builder(exporter).build()).MetricReaderdoes not support custom implementations. Built-in readers include:PeriodicMetricReader,PrometheusHttpServer, and for testing,InMemoryMetricReader.
- BREAKING: Several breaking changes metrics to the
Dataclasses:MetriaDatareturnsInstrumentationScopeInfoinstead ofInstrumentationLibraryInfo.MetricDatafactories classes have been moved internal.- Exemplar data classes have been migrated to interfaces, and deprecated methods have been removed.
- PointData classes have been migrated to interfaces.
ValueAtPercentilehas been converted toValueAtQuantileto reflect specification.- Drop
HistogramPointDatautility methods for finding bucket bounds.
- BREAKING: Move
InstrumentTypeandInstrumentValueTypetoio.opentelemetry.sdk.metricspackage. - BREAKING: Several breaking changes to the
InstrumentSelector/ViewAPIs:InstrumentSelector/Viewand corresponding builders have been moved toio.opentelemetry.sdk.metricspackage.InstrumentSelectormeter selection criteria has been inlined andMeterSelectorhas been removed.InstrumentSelectorcriteria has been reduced to reflect specification. All fields are exact match, except instrument name which accepts wildcard*and?matches.- If
InstrumentSelectorBuilder#build()is called without any selection criteria, an exception will be thrown. Viewbaggage appending attribute processor has been removed. Available for experimental use viaSdkMeterProviderUtil#appendFilteredBaggageAttributes.- Concept of
AttributeProcessorhas been moved internal. - If a View configures an aggregation that is not compatible with the instrument type of a selected instrument, a warning is logged and the View is ignored.
- BREAKING: Remove deprecated
Aggregation#histogram(). UseAggregation#explicitBucketHistogram()instead. - Relax behavior around conflicting instruments. If you register two instruments with the same name but conflicting description, unit, type, or value type, both will be exported and a warning will be logged indicating the metric identity conflict. Previously, the second registered would have produced a noop instrument. Likewise, if two views are registered that produce instruments with conflicting names, or if an instrument conflicts with a registered view's name, both will be exported and a warning will be logged indicating the view conflict.
- BREAKING: Exemplars have been moved to internal. By default, exemplars are enabled
with
with_sampled_tracefilter. This can be adjusted via experimental APIs viaSdkMeterProviderUtil#setExemplarFilter. - BREAKING:
MetricExporter#getPreferredTemporality()has been removed and replaced withgetAggregationTemporality(InstrumentType), which allows exporters to dictate the aggregation temporality on a per-instrument basis.MetricExporter#alwaysCumulative(InstrumentType)andMetricExporter#deltaPreferred(Instrument)are provided as utilities representing common configurations. - Callbacks associated with asynchronous instruments with multiple matching views will only be called once per collection, instead of once per view per collection.
PeriodicMetricReaderwill no longer callMetricExporter#exportif no metrics are available.- BREAKING:
SdkMeterProviderBuilder#setMinimumCollectionIntervalhas been removed. Available for experimental use viaSdkMeterProviderUtil#setMinimumCollectionInterval. - Introduce lock ensuring that metric collections occur sequentially.
- Add min and max to
HistogramDataPoint.
Logs
- BREAKING: Deprecated name field has been removed.
Exporter
- Upgrade to OTLP protobuf version 0.16.0.
- Jaeger and Zipkin exporters export
otel.scope.nameandotel.scope.version, in addition tootel.library.nameandotel.library.versionwhich are retained for backwards compatibility. - BREAKING: Remove deprecated
PrometheusCollector. UsePrometheusHttpServerinstead. - Add support for mTLS authentication to OTLP and jaeger exporters.
- Only log once if OTLP gRPC export receives
UNIMPLEMENTED. - Jaeger remote sampler sets appropriate sampling strategy type if not provided in response.
- BREAKING: The
setPreferredTemporalitymethod has been removed fromOtlpGrpcMetricExporterBuilderandOtlpHttpMetricExporterBuilder. UsesetAggregationTemporality(Function<InstrumentType, AggregationTemporality>)instead.
SDK Extensions
- IMPORTANT: Auto-configuration sets
otel.metrics.exportertootlpinstead ofnone, enabling metric export by default. - Auto-configuration added
otel.java.enabled.resource-providersproperty for opting into specific resource providers.
Micrometer shim
- Bring micrometer shim over from
opentelemetry-java-instrumentation. Artifact is available at maven coordinatesio.opentelemetry:opentelemetry-micrometer1-shim:1.13.0-alpha. - Add support for "prometheus mode", enabling better naming when exporting micrometer metrics via prometheus.
Testing
- Add int overload for equalTo attribute assertion.
- Add
SpanDataAssert.hasAttributemethods.
Version 1.12.0 (2022-03-03)
This release includes many breaking changes to the metrics SDK as we move towards marking its first stable release.
Notably, if you configure metric Views or have written a custom metric exporter, many of the classes and methods will
have been moved or renamed. There are still a few remaining cleanups targeted for the next release after which there
should not be many. Thanks for bearing with us on this.
API
- New methods have been added to
Contextto propagate context for common Java 8 callback types AttributesBuilder.putnow supports vararg versions for lists withAttributeKey- Multiple metric async callbacks can be registered for the same instrument, and callbacks can be removed
SDK
- An issue with Android desugaring of the SDK has been worked around
- EXPERIMENTAL: Support for disabling resource keys with
OTEL_EXPERIMENTAL_RESOURCE_DISABLED_KEYS - Fixed handling of
schemaUrlinResource.toBuilder() - BREAKING: Many changes to
Dataclasses used during export - BREAKING: Many view configuration methods have been removed
Metrics
- APIs deprecated in the previous release have been removed
- DEPRECATION:
PrometheusCollectorfor exporting OpenTelemetry metrics with the prometheus client library has been deprecated - EXPERIMENTAL: File-based configuration of views
- Prometheus exporter now supports JPMS modules
Logs
- DEPRECATION:
LogData.getNamehas been deprecated for removal
Version 1.11.0 (2022-02-04)
General
- Examples moved to opentelemetry-java-docs
SDK
Exporter
- Switch Jaeger remote sampler to use grpc lite
- Deprecate
.setChannel(ManagedChannel)methods on OTLP gRPC exporters - Deprecate
.setChannel(ManagedChannel)methods on Jaeger gRPC exporter - Experimental OTLP retry support now retries on connection timeouts
Metrics
- BREAKING Change: Deprecated
InMemoryMetricExporterandInMemoryMetricReaderhave been removed. Use versions inopentelemetry-sdk-metrics-testinginstead - Deprecate
InstrumentTypevaluesOBSERVABLE_SUMandOBSERVABLE_UP_DOWN_SUMin favor ofOBSERVABLE_COUNTERandOBSERVABLE_UP_DOWN_COUNTER
Logs
- Add ability to configure log attribute limits via
SdkLogEmitterProviderBuilder#setLogLimits(..)
SDK Extensions
- Auto-configuration added options to
AutoConfigurationCustomizerfor customizingSdkTracerProviderBuilder,SdkMeterProviderBuilder,MetricExporter,SdkLogEmitterProviderBuilder, andLogExporter - Auto-configuration added option to skip shutdown hooks
- Auto-configuration adjusted the execution order of tracer and meter provider customization to happen after autoconfiguration
- Auto-configuration adjusted SPI factories to evaluate lazily
- Auto-configuration now uses sets configured
SdkMeterProvideronBatchLogProcessorandBatchSpanProcessor - Auto-configuration deprecated
SdkTracerProviderConfigurerin favor ofAutoConfigurationCustomizer#addTracerProviderCustomizer(..)
Version 1.10.1 (2022-01-21)
Bugfixes
- Fix issue preventing registration of PrometheusCollector with SDK
- Allow retry policy to be set for OkHttpGrpcExporter
Version 1.10.0 (2022-01-07)
API
- Performance of
GlobalOpenTelemetry.getimproved buildWithCallbackfor asynchronous metrics now return interfaces instead of void. The interfaces are empty but will allow adding functionality in the future- BREAKING CHANGE:
Double/LongMeasurement.observehave been removed - BREAKING CHANGE:
GlobalMeterProviderhas been removed - BREAKING CHANGE:
ObservableMeasurement, an empty interface, has been removed. This type was not previously deprecated but is expected to have no use in apps due to the lack of functionality - The Metrics API has been merged into the
opentelemetry-apiartifact.OpenTelemetry.getMeterProvider()is the new entrypoint - BREAKING CHANGE: Bound metrics instruments have been removed for now to allow more time to bake while still providing a stable metrics API
Double/LongMeasurement.observehas been renamed torecord.observeis deprecated in this releaseGlobalMeterProviderhas been deprecated.GlobalOpenTelemetry.getMeterProvidershould be used instead- A warning is logged now when registering async instruments with the same name. Previously subsequent invocations were just ignored.
GlobalOpenTelemetryextended with helpers for meter creation
SDK
- The semantic conventions have been updated to 1.8.0
- Deprecated methods have been removed from the
opentelemetry-sdk-autoconfigureartifact.
Exporter
- The OkHttp gRPC exporters now support experimental retry
- OkHttp dispatcher threads are now spawned as daemon threads
- The JPMS module name for the logs exporter has been fixed
- Metrics exporters can have temporality configured
- HTTP exporters now support experimental retry
- Jaeger exporter allows setting trusted certificates
- gRPC exporter metric typos corected
Metrics
InMemoryMetricExporterhas been moved to theopentelemetry-sdk-metrics-testingartifact. The current class has been deprecated in this release- Metric instrument usage violations consistently report issues as debug logs
- Some user callbacks have been wrapped to catch exceptions instead of throwing
- MinMaxSumCount/Count aggregation has been removed
- Empty aggregator is renamed to
drop - Cumulative aggregations will not be aggressively dropped every collection cycle
Logs
- A
opentelemetry-sdk-logs-testingmodule has been added SdkLogEmitterProvideris now available throughOpenTelemetrySdk- LogDataBuilder can now take a SpanContext directly
- SdkLogEmitterProvider.get convenience method added
AWS
- HTTP requests now use OkHttp instead of the JDK
OpenCensus Shim
- Shim span attributes are set before the span is created instead of after
- Exceptions are not thrown when activating a null span
SDK Extensions
- BREAKING CHANGE: Deprecated trace incubator types (DelegatingSpanData, SpanDataBuidler) have been removed
- BREAKING CHANGE: Deprecated
ExecutorServiceSpanProcessorhas been removed cloud.platformis now populated in AWSResource- Auto-configuration correctly uses configured class loader for configuring Resource
- Auto-configuration prints a debug log with the resolved tracer configuration
- Auto-configuration supports the logs signal
Version 1.9.1 (2021-11-23)
Bugfixes
- In Prometheus exporter, only populate exemplars for Prometheus types that support them
- Fix proto encoding of oneof values in metrics
- Correctly cleanup OkHttp client resources when shutting down exporters
Version 1.9.0 (2021-11-11)
General
- IMPORTANT: The deprecated
io.opentelemetry:opentelemetry-protomodule was removed. Java bindings for OTLP protobufs are now published via opentelemetry-proto-java, and available at maven coordinatesio.opentelemetry.proto:opentelemetry-proto.
API
- New
AttributesBuilder#remove(String)andAttributeBuilder#removeIf(Predicate<AttributeKey<?>>)methods improve ergonomics of modifying attributes. W3CBaggagePropagatornow encodes baggage values in URL encoded UTF-8 format, per the W3C Baggage Specification.
SDK
DelegatingSpanDatahas been promoted from incubation and is now available in the Trace SDK. TheDelegatingSpanDataclass in theio.opentelemetry:opentelemetry-sdk-extension-tracing-incubatormodule is now deprecated.
Exporters
- The prometheus metric exporter now includes the
time_unix_nanorepresenting the epoch timestamp when collection occurred. - The OTLP
grpcexporters (OtlpGrpcSpanExporter,OtlpGrpcLogExporter, andOtlpGrpcMetricExporter) now include a default client implementation (okhttp). If agrpcimplementation is detected on the classpath it will be used, but the exporters now work "out of the box" with no additional dependencies.
SDK Extensions
- IMPORTANT: The deprecated
io.opentelemetry:opentelemetry-sdk-extension-async-processormodule was removed. This module is now published via opentelemetry-java-contrib, and available at maven coordinatesio.opentelemetry.contrib:opentelemetry-disruptor-processor. - The
ExecutorServiceSpanProcessorfrom theio.opentelemetry:opentelemetry-sdk-extension-tracing-incubatormodule is now deprecated.
Logging (alpha)
- This release includes a rework of the Log SDK to
implement OTEP-0150
and to have more symmetry to the Trace SDK.
LogSinkis nowLogEmitter.LogEmitterinstances are obtained fromSdkLogEmitterProvider. Other additions includeMultiLogProcessor(accessed viaLogProcessor#composite(...)),SimpleLogProcessor,InMemoryLogExporter,OtlpJsonLoggingLogExporter, andSystemOutLogExporter. - The Log SDK maven coordinates have changed
from
io.opentelemetry:opentelemetry-sdk-extension-loggingtoio.opentelemetry:opentelemetry-sdk-logs.
Metrics (alpha)
- The
new InMemoryMetricReader()constructor has been deprecated. UseInMemoryMetricReader.create()instead. - A typo in
Aggregation.explictBucketHistogram()has been fixed, and is now accessible atAggregation.explicitBucketHistogram(). - The
PeriodicMetricReader#builder(MetricExporter)builder replacesPeriodicMetricReader#newMetricReaderFactory(MetricExporter, Duration). - Aggregation temporality is now influenced by metric exporters, and the ability to configure
aggregation temporality via the view API has been removed. For example, the OTLP metric exporters
support both
DELTAandCUMULATIVEtemporality.CUMULATIVEis the default preferred, but this can be changed either via programmatic configuration or viaOTEL_EXPORTER_OTLP_METRICS_TEMPORALITYif using autoconfigure. - The
MeterProvider#get(String instrumentationName, String instrumentationVersion, String schemaUrl)method is deprecated. UseMeterProvider#meterBuilder(String instrumentationName)with corresponding builder setters instead. - Metric cardinality defenses have been added. Each instrument view now can have at most 2000 distinct metric streams per collection cycle. Recordings for additional streams are dropped with a diagnostic log message. Additionally, cumulative metric streams (both for synchronous and asynchronous instruments) are aggressively forgotten each time a metric export occurs that does not include recordings for a particular stream. The net effect is that there is now a cap on metric memory consumption.
Auto-configuration (alpha)
- BREAKING CHANGE: Remove deprecated
otel.experimental.exporter.otlp.protocol,otel.experimental.exporter.otlp.{signal}.protocolproperties. Please useotel.exporter.otlp.protocol,otel.exporter.otlp.{signal}.protocolinstead. - The autoconfigure module has introduced a powerful new
AutoConfiguredOpenTelemetrySdkBuilder, and SPI for programmatically configuring the builder withAutoConfigurationCustomizerProvider. This provides improved ergonomics and control around autoconfigure customization. - Added experimental support for enabling OTLP retry support for the
grpcexporters. If enabled viaotel.experimental.exporter.otlp.retry.enabled, a default retry policy will be used. - The metric export interval of
PeriodicMetricReaderis now configured viaotel.metric.export.interval. The existingotel.imr.export.intervalproperty has been deprecated. - The SPI classloader can now be specified when using the autoconfigure module programmatically.
Version 1.7.1 (2021-11-03)
Exporters:
- BUGFIX: In 1.7.0, the
okhttp-based exporters (
OtlpHttpSpanExporter,OtlpHttpMetricExporter,OtlpHttpLogExporter) did not properly close the okhttp response and hence would leak connections. This has been fixed in 1.7.1.
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-protoartifact. 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 the
SdkMeterProviderBuilder.registerMetricReadermethod for more details. - This release includes initial support for the SDK recording of Metric Exemplars for sampled Spans.
See
SdkMeterProviderBuilder.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 (2021-09-13)
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.
- 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 (2021-08-13)
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.
Version 1.4.1 (2021-07-15)
- 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 (2021-07-10)
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 (2021-06-09)
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.noopapiname. - The
io.opentelemetry.sdk.autoconfiguremodule now supports theOTEL_SERVICE_NAME/otel.service.nameenvironment 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
Version 1.2.0 (2021-05-07)
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)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_counttags 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 aResourcebuilt 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.
Version 1.1.0 (2021-04-07)
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. Similarly, 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.
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 (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 lsit 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.
Version 0.17.1 (2021-02-19)
- Removed the unused
ResourceProviderinterface from the SDK. This interface is still available in theopentelemetry-sdk-extension-autoconfiguremodule, where it is actually used.
Version 0.17.0 (2021-02-17) - RC#3
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 toTextMapSetterandTextMapGetterrespectively.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
the
http://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 beotel.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().
Version 0.16.0 (2021-02-08) - RC#2
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.
Breaking Changes
- Methods and classes deprecated in 0.15.0 have been removed.
API
Breaking Changes
- The
Span.Kindenum has been moved to the top level, and namedSpanKind. DefaultOpenTelemetryis no longer a public class. If you need the functionality previously provided by this implementation, it can be accessed via new static methods on theOpenTelemetryinterface itself.- The
TraceFlagsinterface has been re-introduced. This is now used, rather than a barebytewherever trace flags is used. In particular,SpanContext.create(),SpanContext.createFromRemoteParent()now require aTraceFlagsinstance, andSpanContext.getTraceFlags()returns aTraceFlagsinstance. - The names of static methods on
TraceFlagshave been normalized to match other similar classes, and now returnTraceFlagsinstead ofbytewhere appropriate. - The
Labelsinterface and related classes have been moved into the alpha metrics modules and repackaged. TraceId.copyHexInto(byte[] traceId, char[] dest, int destOffset)has been removed.SpanContext.getTraceIdAsHexString()has been renamed toSpanContext.getTraceId()SpanContext.getSpanIdAsHexString()has been renamed toSpanContext.getSpanId()BaggageEntry.getEntryMetadata()has been renamed toBaggageEntry.getMetadata()BaggageConsumerhas been removed in favor of a standardjava.util.function.BiConsumer<String, BaggageEntry>TraceFlags.isSampledFromHex(CharSequence src, int srcOffset)has been removed.SpanIdandTraceIdmethods that had aStringparameter now acceptCharSequenceand assume the id starts at the beginning.SpanId.getSize()andTraceId.getSize()have been removed.SpanId.bytesFromHex()has been removed.SpanId.asLong(CharSequence)has been removed.SpanId.asBytes(CharSequence)has been removed.SpanId.getHexLength()has been renamed toSpanId.getLength()SpanId.bytesToHex()has been renamed toSpanId.fromBytes()TraceId.bytesFromHex()has been removed.TraceId.traceIdLowBytesAsLong(CharSequence)has been removed.TraceId.traceIdHighBytesAsLong(CharSequence)has been removed.TraceId.asBytes(CharSequence)has been removed.TraceId.getHexLength()has been renamed toTraceId.getLength()TraceId.bytesToHex()has been renamed toTraceId.fromBytes()StrictContextStoragehas been made private. Use -Dio.opentelemetry.context.enableStrictContext=true` to enable itAwsXrayPropagatorhas been moved to theopentelemetry-extension-awsartifact
Enhancements
- The
W3CTraceContextPropagatorclass now directly implements theTextMapPropagatorinterface. - The
OpenTelemetryinterface now has agetDefault()method which will return a completely no-op implementation. - The
OpenTelmmetryinterface now has agetPropagating(ContextPropagators propagators)method which will return an implementation that contains propagators, but is otherwise no-op.
Misc Notes
- The internal
StringUtilsclass has had metrics-related methods removed from it. But, you weren't using internal classes, were you? - The internal
AbstractWeakConcurrentMapclass has been made non-public. See the line above about internal classes.
Extensions
Breaking Changes
- The
OtTracerPropagatorhas been renamed toOtTracePropagatorin the trace-propagators extension module.
SDK
Breaking Changes
TraceConfighas been renamed toSpanLimitsand relocated to theio.opentelemetry.sdk.tracingpackage. All related method names have been renamed to match.SpanData.getTraceState()has been removed. The TraceState is still available via the SpanContext accessor.SpanData.isSampled()has been removed. The isSampled property is still available via the SpanContext accessor.
Enhancements
SpanDatanow directly exposes the underlyingSpanContextinstance.
SDK Extensions
Breaking Changes
- In the
opentelemetry-autoconfiguremodule, three environment variables/system properties have been renamed to match the spec:OTEL_TRACE_EXPORTER/otel.trace.exporterhas been replaced withOTEL_TRACES_EXPORTER/otel.traces.exporterOTEL_TRACE_SAMPLER/otel.trace.samplerhas been replaced withOTEL_TRACES_SAMPLER/otel_traces_samplerOTEL_TRACE_SAMPLER_ARG/otel.trace.sampler.arghas been replaced withOTEL_TRACES_SAMPLER_ARG/otel.traces.sampler.arg
Enhancements
- The
opentelemetry-autoconfiguremodule now supports using non-millisecond values for duration & interval configuration options. See the javadoc on theio.opentelemetry.sdk.autoconfigure.ConfigProperties.getDuration(String)method for details on supported formats. - The
opentelemetry-autoconfiguremodule now provides automatic SPI-based parsing of theOTEL_RESOURCE_ATTRIBUTESenv var (and the correspondingotel.resource.attributessystem property). If you include this module on your classpath, it will automatically update theResource.getDefault()instance with that configuration.
Metrics (alpha)
API
- The
Labelsinterface has been moved into the metrics API module and repackaged into theio.opentelemetry.api.metrics.commonpackage.
Version 0.15.0 (2021-01-29) - RC#1
General
Breaking Changes
- Methods and classes deprecated in 0.14.x have been removed.
Semantic Conventions
The opentelemetry-semconv module has been marked as -alpha and removed from the bom. This was done because the OpenTelemetry
project has not decided on a specification for stability of semantic conventions or the specific telemetry produced by
instrumentation.
Deprecations
- The items in the
io.opentelemetry.semconv.trace.attributes.SemanticAttributeswhich were previously generated form the Resource semantic conventions have been deprecated. Please use the ones in the newio.opentelemetry.semconv.resource.attributes.ResourceAttributesclass.
Enhancements
- A new
io.opentelemetry.semconv.resource.attributes.ResourceAttributeshas been introduced to hold the generated semantic attributes to be used in creatingResources.
SDK
Breaking Changes
SamplingResult.Decisionhas been removed in favor of theio.opentelemetry.sdk.trace.samplers.SamplingDecisiontop-level class.Resource.merge(Resource)now will resolve conflicts by preferring theResourcepassed in, rather than the original.- The default Resource (accessible via
Resource.getDefault()) now includes a fallbackservice.nameattribute. The implication of this is that exporters that have configured fallback service names will only use them if the SDK is intentionally configured with a Resource that does not utilize the default Resource for its underlying Resource data. - The
Sampleris now specified when building the SdkTracerProvider directly, rather than being a part of the TraceConfig.
Bugfixes
- The Jaeger exporters will now properly populate the process service name from the Resource service.name attribute.
Deprecations
- Going forward, OTLP exporter endpoint specifications must include a scheme, either
http://orhttps://. We will support endpoints without schemes until the next release, at which point not providing a scheme will generate an error when trying to use them. This applies to the use of system properties, environment variables, or programmatic specifications of the endpoints. - The
exportOnlySampledconfiguration of theBatchSpanProcessorhas been deprecated and will be removed in the next release. - The
io.opentelemetry.sdk.resources.ResourceAttributeshas been deprecated and will be removed in the next release. Please use the newio.opentelemetry.semconv.resource.attributes.ResourceAttributesclass in theopentelemetry-semconvmodule. - The serviceName configuration option for the Jaeger and Zipkin exporters has been deprecated. In the next release, those
configuration options will be removed, and the fallback
service.namewill always be pulled from the default Resource.
Enhancements
Resource.getDefault()now includes a fallbackservice.nameattribute. Exporters that require aservice.nameshould acquire the fallback from the default resource, rather than having it configured in.
SDK Extensions
Breaking Changes
- The
otel.bsp.schedule.delay.millisenv var/system property configuration option for the batch span processor has been renamed tootel.bsp.schedule.delayto match the specification. - The
otel.bsp.export.timeout.millisenv var/system property configuration option for the batch span processor has been renamed tootel.bsp.export.timeoutto match the specification.
Enhancements
- The
opentelemetry-sdk-extension-autoconfiguremodule will now additionally register the auto-configured SDK as the instance ofGlobalOpenTelemetrywhen used. - The
opentelemetry-sdk-extension-autoconfiguremodule now supports theotel.exporter.otlp.certificateconfiguration property for specifying a path to a trusted certificate for the OTLP exporters.
Version 0.14.1 (2021-01-14)
General
- Several more modules have been updated to have
-alphaappended on their versions:opentelemetry-sdk-extension-jfr-eventsopentelemetry-sdk-extension-async-processoropentelemetry-sdk-extension-loggingopentelemetry-sdk-extension-zpagesopentelemetry-sdk-exporter-prometheusopentelemetry-sdk-exporter-tracing-incubatoropentelemetry-opentracing-shimopentelemetry-opencensus-shim
API
Breaking Changes
- Code that was deprecated in
0.13.0has been removed from the project.- Metrics interfaces are no longer available as a part of the
opentelemetry-pomor from theopentelemetry-apimodules. To access the alpha metrics APIs, you will need to explicitly add them as a dependency. OpenTelemetry.setPropagators()has been removed. You should instead create yourOpenTelemetryimplementations with the Propagators preset, via the various builder options. For example, useDefaultOpenTelemetry.builder().setPropagators(propagators).build()to configure your no-sdk implementation.- The
OpenTelemetry.builder()and theOpenTelemetryBuilderinterface have been removed. The builder functionality is now only present on individual implementations of OpenTelemetry. For instance, theDefaultOpenTelemetryclass has a builder available.
- Metrics interfaces are no longer available as a part of the
Deprecations
- The SemanticAttributes class has been moved to a new module:
opentelemetry-semconvand repackaged into a new package:io.opentelemetry.semconv.trace.attributes. The oldSemanticAttributesclass will be removed in the next release. - The SPI interfaces for OpenTelemetry have been deprecated. We are moving to a new auto-configuration approach with the
new SDK auto-configuration module:
io.opentelemetry.sdk.autoconfigure. This module should be considered the officially supported auto-configuration library moving forward.
Enhancements
- The SemanticAttributes have been updated to the latest version of the specification, as of January 7th, 2021.
SDK
Bugfixes
- Environment variables/system properties that are used to set extra headers for the OTLP exporters have been fixed to now
split on commas, rather than semicolons. This has been brought in line with the specification for these environment
variables. This includes
otel.exporter.otlp.span.headers,otel.exporter.otlp.metric.headers, andotel.exporter.otlp.headers. - Passing a null span name when creating a span will no longer cause a NullPointerException. Instead, a default span name will be provided in place of the missing name.
Breaking Changes
- The deprecated
SpanData.Link.getContext()method has been removed in favor ofSpanData.Link.getSpanContext(). - The
TracerProviderFactorySdkSPI class has been renamed toSdkTracerProviderFactory. - The
OpenTelemetrySdkBuilder.build()method has been renamed toOpenTelemetrySdkBuilder.buildAndRegisterGlobal(). Thebuild()method still exists, but no longer sets the instance on theGlobalOpenTelemetrywhen invoked. - The
SdkTracerManagement.shutdown()method now returnsCompletableResultCodewhich can be used to wait asynchronously for shutdown to complete. - The
sampling.probabilitysampling attribute previously generated by theTraceIdRatioBasedSampleris no longer generated, as it was not conformant with the specifications. - The
SpanDatainner classes have been moved to the top level, soSpanData.Link->LinkData,SpanData.Event->EventDataandSpanData.Status->StatusData.
Deprecations
SdkTracerProvider.updateActiveTraceConfig()andSdkTracerProvider.addSpanProcessor()have been deprecated. The methods will be removed in the next release.- All existing auto-configuration mechanisms have been deprecated in favor of using the new
io.opentelemetry.sdk.autoconfiguremodule. The existing ones will be removed in the next release. - The methods with the term "deadline" has been deprecated in the configuration of the grpc-based exporters (OTLP and Jaeger) in favor of the word "timeout". The deadline-named methods will be removed in the next release.
- The
StringUtilsclass in theopentelemetry-extension-trace-propagatorsextension module has been deprecated and will be made non-public in the next release. - The
StatusData.isUnset()andStatusData.isOk()methods have been deprecated. They will be removed in the next release.
Enhancements
- The
OtlpGrpcSpanExporternow supports setting trusted TLS certificates for secure communication with the collector. - A new module for supporting auto-configuration of the SDK has been added. The new module,
io.opentelemetry.sdk.autoconfigurewill be the new path for auto-configuration of the SDK, including via SPI, environment variables and system properties. - The
TraceConfigclass now exposes abuilder()method directly, so you don't need to get the default then calltoBuilder()on it. - The OTLP protobuf definitions were updated to the latest released version:
0.7.0. Both theSpanand (alpha)Metricexporters were updated to match. - Timeouts in the exporters can now be specified with
java.util.concurrent.TimeUnitandjava.time.Durationbased configurations, rather than requiring milliseconds.
SDK Extensions
Breaking Changes
- The ZPages extension now exposes its SpanProcessor implementation. To use it, you will need to add it to your SDK implementation directly, rather than it adding itself to the global SDK instance.
- The JaegerRemoteSampler builder patterns have been changed and updated to more closely match the rest of the builders in the project.
Deprecations
- The
AwsXrayIdGeneratorconstructor has been deprecated in favor of using a simplegetInstance()singleton, since it has no state. - The
TraceProtoUtilsclass in theopentelemetry-sdk-extension-otprotomodule has been deprecated and will be removed in the next release.
Bugfixes
- The JaegerRemoteSampler now uses the ParentBased sampler as the basis for any sampling that is done.
Metrics (alpha)
SDK:
- The
InstrumentSelector.newBuilder()method has been renamed toInstrumentSelector.builder()and the methods on the Builder have changed to use the same naming patterns as the rest of the project. - The
MeterProviderFactorySdkclass has been renamed toSdkMeterProviderFactory. - The
SdkMeterProvicer.Builderhas been moved to the top levelSdkMeterProviderBuilder. - The
InstrumentSelectornow requires an instrument type to be provided, and defaults the name regex to.*.
Version 0.13.0 (2020-12-17)
General
- Starting with 0.13.0, all unstable modules (the 2 metrics modules for now) will have a
-alphaappended to their base version numbers to make it clear they are not production ready, and will not be when we get to releasing 1.0. See our Rationale document for details.
API
Breaking Changes
- The
Labels.ArrayBackedLabelsBuilderclass has been made non-public. You can still access theLabelsBuilderfunctionality via theLabels.builder()method. - Methods deprecated in the 0.12.0 release have been removed or made non-public:
- The
HttpTraceContextclass has been removed. - The
toBuilder()method on the OpenTelemetry interface has been removed. - The
Attributes.builder(Attributes)method has been removed in favor ofAttributes.toBuilder(Attributes). - The
DefaultContextPropagatorsclass has made non-public. - The
TraceMultiPropagatorbuilder has been removed in favor of a simple factory method. - The
value()method on theStatusCodeenum has been removed. - The Baggage
EntryMetadataclass has been removed in favor of theBaggageEntryMetadatainterface. - The
setCallback()method on the asynchronous metric instruments has been removed.
- The
- Several public classes have been made
final.
Enhancements
- An
asMapmethod has been added to theLabelsinterface, to expose them as ajava.util.Map. - You can now enable strict Context verification via a system property (
-Dio.opentelemetry.context.enableStrictContext=true) Enabling this mode will make sure that allScopes that are created are closed, and generate log messages if they are not closed before being garbage collected. This mode of operation is CPU intensive, so be careful before enabling it in high-throughput environments that do not need this strict verification. See the javadoc on theio.opentelemetry.context.Contextinterface for details. - Several of the methods on the
Spaninterface have been given default implementations. - The Semantic Attributes constants have been updated to the version in the yaml spec as of Dec 14, 2020.
Miscellaneous
- The Metrics API has been deprecated in the
opentelemetry-apimodule, in preparation for releasing a fully-stable 1.0 version of that module. The Metrics API will be removed from the module in the next release. - The API has been broken into separate modules, in preparation for the 1.0 release of the tracing API.
If you depend on the
opentelemetry-apimodule, you should get the rest of the API modules as transitive dependencies. - The
OpenTelemetry.builder()and theOpenTelemetryBuilderinterface have been deprecated and will be removed in the next release. The builder functionality is now only present on individual implementations of OpenTelemetry. For instance, theDefaultOpenTelemetryclass has a builder available. - The
OpenTelemetry.setPropagators()has been deprecated and will be removed in the next release. You should instead create yourOpenTelemetryimplementations with the Propagators preset, via the various builder options. For example, useDefaultOpenTelemetry.builder().setPropagators(propagators).build()to configure your no-sdk implementation.
SDK
Miscellaneous
- The
SpanData.Link.getContext()method has been deprecated in favor of a newSpanData.Link.getSpanContext(). The deprecated method will be removed in the next release of the SDK. - The internals of the (alpha) Metrics SDK have been significantly updated.
- OTLP adapter classes have been moved into the
opentelemetry-sdk-extension-otprotomodule so they can be shared across OTLP usages. - The zipkin exporter has been updated to have its error code handling match the spec.
- The logging exporter's format has changed to something slightly more human-readable.
Breaking Changes
- Many SDK classes have been renamed to be prefixed with
Sdkrather than havingSdkbeing embedded in the middle of the name. For example,TracerSdkhas been renamed toSdkTracerandTracerSdkManagementhas been renamed toSdkTracerManagement. - The
ResourcesConfig.builder()method has been made non-public. - The
TraceConfig.Builderclass has been moved to the top-levelTraceConfigBuilderclass. - The built-in exporter
Builderclasses have been moved to the top level, rather than inner classes. Access to the builders is still available viabuilder()methods on the exporter classes. - The built-in SpanProcessor
Builderclasses have been moved to the top level, rather than inner classes. Access to the builders is still available viabuilder()methods on the SpanProcessor implementation classes. - The built-in ParentBasedSampler
Builderclass has been moved to the top level, rather than inner classes. Access to the builder is still available via methods on the Sampler interface. - The
DaemonThreadFactoryclass has been moved to an internal module and should not be used outside of this repository. - The builder class for the
OpenTelemetrySdkclass has been slimmed down. The configurable details have been moved into the specific provider builders, where they apply more specifically and obviously. - Many public classes have been made
final. - The MetricExporter interface's
shutdown()method now returnsCompletableResultCoderather than void. - The
OpenTelemetrySdk's builder class has been moved to the top level, rather than being an inner class. It has been renamed toOpenTelemetrySdkBuilderas a part of that change. - The OTLP exporters have been split into two separate modules, and the metrics exporter has been tagged with the
-alphaversion. If you continue to depend on theopentelemetry-exporters-otlpmodule, you will only get the trace exporter as a transitive dependency.
Extensions
Bugfixes
- The
opentelemetry-extension-annotationsmodule now includes the api module as anapidependency, rather than justimplementation.
Breaking Changes
- The deprecated
opentelemetry-extension-runtime-metricsmodule has been removed. The functionality is available in the opentelemetry-java-instrumentation project under a different module name. - The deprecated
trace-utilsmodule has been removed. - Several public classes have been made
final.
Enhancements
- Some common OTLP adapter utilities have been moved into the
opentelemetry-sdk-extension-otprotomodule so they can be shared across OTLP exporters.
Version 0.12.0 (2020-12-04)
API
Bugfixes
- Usages of tracers and meters on all
OpenTelemetryinstances were being delegated to the global Meter and Tracer. This has been corrected, and all instances should have independent Tracer and Meter instances.
Breaking Changes
- The
AttributesBuilderno long accepts null values for array-valued attributes with numeric or boolean types. - The
TextMapPropagator.fields()method now returns aCollectionrather than aList. Labelshas been converted to an interface, from an abstract class. Its API has otherwise remained the same.TraceStatehas been converted to an interface, from an abstract class. Its API has otherwise remained the same.Attributeshas been converted to an interface, from an abstract class. Its API has otherwise remained the same.- The
ReadableAttributesinterface has been removed, as it was redundant with theAttributesinterface. All APIs that used or returnedReadableAttributesshould accept or return standardAttributesimplementations. SpanContexthas been converted to an interface, from an abstract class. Its API has otherwise remained the same.- The functional
AttributeConsumerinterface has been removed and replaced with a standardjava.util.function.BiConsumer. - The signature of the
BaggageBuilder.put(String, String, EntryMetadata entryMetadata)method has been changed toput(String, String, BaggageEntryMetadata)
Enhancements
- A
builder()method has been added to the OpenTelemetry interface to facilitate constructing implementations. - An
asMap()method has been added to theAttributesinterface to enable conversion to a standardjava.util.Map. - An
asMap()method has been added to theBaggageinterface to enable conversion to a standardjava.util.Map. - An
asMap()method has been added to theTraceStateinterface to enable conversion to a standardjava.util.Map. - The Semantic Attributes constants have been updated to the version in the yaml spec as of Dec 1, 2020.
Miscellaneous
- The
HttpTraceContextclass has been deprecated in favor ofW3CTraceContextPropagator.HttpTraceContextwill be removed in 0.13.0. - The
toBuilder()method on the OpenTelemetry interface has been deprecated and will be removed in 0.13.0. - The
DefaultContextPropagatorsclass has been deprecated. Access to it will be removed in 0.13.0. - The
TraceMultiPropagatorbuilder has been deprecated in favor of a simple factory method. The builder will be removed in 0.13.0. You can access the same functionality via static methods on theContextPropagatorsinterface. - The
setCallback()method on the asynchronous metric instruments has been deprecated and will be removed in 0.13.0. Instead, use thesetCallback()method on the builder for the instruments. - The
value()method on theStatusCodeenum has been deprecated and will be removed in 0.13.0. - The Baggage
EntryMetadataclass has been deprecated in favor of theBaggageEntryMetadatainterface. The class will be made non-public in 0.13.0.
Extensions
- The
opentelemetry-extension-runtime-metricsmodule has been deprecated. The functionality is available in the opentelemetry-java-instrumentation project under a different module name. The module here will be removed in 0.13.0. - The
trace-utilsmodule has been deprecated. If you need this module, please let us know! The module will be removed in 0.13.0.
SDK
Breaking Changes
- The
opentelemetry-sdk-tracingmodule has been renamed toopentelemetry-sdk-trace. - The default port the OTLP exporters use has been changed to
4317. - The deprecated
SpanData.getCanonicalCode()method has been removed, along with the implementations.
Enhancements
- The OpenTelemetrySdk builder now supports the addition of
SpanProcessors to the resulting SDK. - The OpenTelemetrySdk builder now supports the assignment of an
IdGeneratorto the resulting SDK. - The
ReadableSpaninterface now exposes theSpan.Kindof the span. - The SDK no longer depends on the guava library.
- The parent SpanContext is now exposed on the
SpanDatainterface.
Miscellaneous
- The
toBuilder()method on the OpenTelemetrySdk class has been deprecated and will be removed in 0.13.0. - The MultiSpanProcessor and MultiSpanExporter have been deprecated. You can access the same functionality via
the
SpanProcessor.compositeandSpanExporter.compositemethods. The classes will be made non-public in 0.13.0. - The
SpanData.hasRemoteParent()method has been deprecated and will be removed in 0.13.0. If you need this information, you can now callSpanData.getParentSpanContext().isRemote(). - The default timeouts for the 2 OTLP exporters and the Jaeger exporter have been changed to 10s from 1s.
Extensions
Breaking Changes
- The
opentelemetry-sdk-extension-aws-v1-supportmodule has been renamed toopentelemetry-sdk-extension-awsand the classes in it have been repackaged into theio.opentelemetry.sdk.extension.aws.*packages.
Bugfixes:
- The OpenTracing
TracerShimnow properly handles keys for context extraction in a case-insensitive manner.
Enhancements
- The
opentelemetry-sdk-extension-resourcesnow includes resource attributes for the process runtime via theProcessRuntimeResourceclass. This is included in the Resource SPI implementation that the module provides. - The
opentelemetry-sdk-extension-awsextension now will auto-detect AWS Lambda resource attributes.
Version 0.11.0 (2020-11-18)
API
Breaking changes:
- The SPI interfaces have moved to a package (not a module) separate from the API packages, and now live in
io.opentelemetry.spi.*package namespace. - Builder classes have been moved to the top level, rather than being inner classes.
For example, rather than
io.opentelemetry.api.trace.Span.Builder, the builder is now in its own top-level class:io.opentelemetry.api.trace.SpanBuilder. Methods to create the builders remain in the same place as they were before. - SpanBuilder.setStartTimestamp, Span.end, and Span.addEvent methods which accept a timestamp now accept a timestamp with a TimeUnit instead of requiring a nanos timestamp.
Enhancements:
- Versions of SpanBuilder.setStartTimestamp, Span.end, and Span.addEvent added which accept Instant timestamps
- Setting the value of the
io.opentelemetry.context.contextStorageProviderSystem property todefaultwill enforce that the default (thread local) ContextStorage will be used for the Context implementation, regardless of what SPI implementations are available.
Miscellaneous:
- Invalid W3C
TraceStateentries will now be silently dropped, rather than causing the invalidation of the entireTraceState.
SDK
Breaking Changes:
- The builder class for the
OpenTelemetrySdknow strictly requires its components to be SDK implementations. You can only build anOpenTelemetrySdkwithTracerSdkProviderandMeterSdkProviderinstances.
Enhancements:
- An API has been added to the SDK's MeterProvider implementation (
MeterSdkProvider) that allows the end-user to configure how various metrics will be aggregated. This API should be considered a precursor to a full "Views" API, and will most likely evolve over the coming months before the metrics implementation is complete. See the javadoc forMeterSdkProvider.registerView()for details.
Miscellaneous:
- The
SpanProcessorinterface now includes default method implementations for theshutdown()andforceFlush()methods. - The BatchRecorder implementation has been updated to actually batch the recordings, rather than simply passing them through.
Extensions
Breaking Changes:
- The
@WithSpanannotation has been moved to theio.opentelemetry.extension.annotationspackage in theopentelemetry-extension-annotationsmodule
Bugfixes:
- The memory pool metrics provided by the MemoryPools class in the
opentelemetry-extension-runtime-metricsmodule have been fixed to properly report the committed memory values.
Enhancements:
- A new module has been added to assist with propagating the OTel context in kotlin co-routines.
See the
opentelemetry-extension-kotlinmodule for details.
Version 0.10.0 (2020-11-06)
API
Enhancements
- The W3C Baggage Propagator is now available.
- The B3 Propagator now handles both single and multi-header formats.
- The B3 Propagator defaults to injecting the single B3 header, rather than the multi-header format.
- Mutating a method on
Spannow returns theSpanto enable call-chaining.
Bug fixes
- The
package-infofile was removed from theio.otel.contextpackage because it made the project incompatible with JPMS.
Breaking changes
- There have been many updates to the semantic conventions constants. The constants are now auto-generated from the YAML specification files, so the names will now be consistent across languages. For more information, see the YAML Model for Semantic Conventions.
- All API classes have been moved into the
io.opentelemetry.api.prefix to support JPMS users. - The API no longer uses the
grpc-contextas the context implementation. It now usesio.opentelemetry.context.Context. This is published in theopentelemetry-contextartifact. Interactions with the context were mostly moved to static methods in theSpanandBaggageinterfaces. - The Baggage API has been reworked to more closely match the specification. This includes the removal of the
BaggageManager. Baggage is fully functional within the API, without needing to install an SDK. TracingContextUtilsandBaggageUtilswere removed from the public API. Instead, use the appropriate static methods on theSpanandBaggageclasses, or use methods on theContextitself.- The context propagation APIs have moved into the new
opentelemetry-contextcontext module. DefaultSpanwas removed from the public API. Instead, useSpan.wrap(spanContext)if you need a non-functional span that propagates the trace context.DefaultMeter,DefaultMeterProvider,DefaultTracerandDefaultTracerProviderwere removed from the public API. You can access the same functionality withgetDefault()methods on theMeter,MeterProvider,Tracer, andTracerProvider` classes, respectively.- Some functionality from the
Tracerinterface is now available either on theSpaninterface orContextinterface. - The
OpenTelemetryclass is now an interface, with implementations. Methods on this interface have changed their names to reflect this change. For more information, see OpenTelemetry.java. - All builder-creation methods have been renamed to
.builder(). StatusCanonicalCodehas been renamed toStatusCode.Span.getContext()has been renamed toSpan.getSpanContext().AttributesBuildernow usesputinstead ofaddas the method name for adding attributes.- All parameters are now marked as non-nullable by default.
TextMapPropagatorscould receive a null carrier passed to the extract method.- The
TextMapPropagator.Getterinterface has added a method to return the keys that the propagator uses.
SDK
Enhancements
- A new
MetricDatagauge metric type is now available. - A new
opentelemetry-sdk-testingmodule with a JUnit 5 extension to assist with testing is now available. - The Prometheus metric exporter now consumes
gaugemetrics. - The Jaeger gRPC exporter now maps
Resourceentries to process tags. - The OTLP protobuf definitions were updated to the latest released version: 0.6.0. Both the
SpanandMetricexporters were updated to match. - The
Samplerinterface now allows aSamplerimplementation to update theTraceStatethat is applied to theSpanContextfor the resulting span.
Breaking changes
TraceConfigconfiguration option names (environment variables and system properties) were renamed to match the OpenTelemetery Specification. For more information, see TraceConfig.- The Jaeger gRPC exporter was updated to match the OpenTelemetry Specification. The
messagelog entry attribute has been renamed toeventand a newdropped attributes countattribute was added. For more information, see the Overview. - The
SpanData.getHasRemoteParent()andSpanData.getHasEnded()methods were renamed tohasRemoteParent()andhasEnded(), respectively. - The
IdsGeneratorinterface has been renamed toIdGenerator, and all implementations and relevant factory methods were similarly renamed. - The
RandomIdGeneratoris now accessible via a factory method on theIdGeneratorclass, rather than being exposed itself. UseIdGenerator.random()to acquire an instance. - The OTLP metric exporter now emits
gaugemetrics where appropriate. ValueObserverinstruments now generate gauge metrics, rather than non-monotonic counter-style metrics.ValueObserverinstruments now use theLastValueaggregation instead ofMinMaxSumCount.- The
SpanData.*implementation classes were removed from the public SDK, but the interfaces are still available. SpanProcessor.onStartnow takes aContextas its first parameter.- The
Samplerinterface now takes a parentContextrather than aSpanContext. - Each
Samplerhas been reorganized into their own classes and moved into theio.opentelemetry.sdk.trace.samplerspackage. Factory methods that used to be on theSamplersclass were moved to theSamplerinterface.
Extensions
Enhancements
- A new JUnit5 extension was added for writing tests. For more information, see OpenTelemetryExtension.java.
- A Jaeger
SpanExporterwhich exports via thethrift-over-http protocolis now available. - A Jaeger Propagator is now available.
Breaking changes
- The in-memory exporter(s) have been moved to the
opentelemetry-sdk-testingartifact. - The OpenTracing shim factory class has been renamed from
TraceShimtoOpenTracingShim. The factory methods have changed becauseBaggageManagerwas removed and non-globalOpenTelemetryinstances are now available. - The 's' was removed from the word "exporters" for every exporter artifact. For example,
opentelemetry-exporters-loggingwas renamed toopentelemetry-exporter-logging. - The 's' was removed from the word "extensions" for the package for every SDK extension. For example,
io.opentelemetry.sdk.extensions.otproto.TraceProtoUtilswas renamed toio.opentelemetry.sdk.extension.otproto.TraceProtoUtils.
Thanks
Many thanks to everyone who made this release possible!
@anuraaga @bogdandrutu @Oberon00 @thisthat @HaloFour @jkwatson @kenfinnigan @MariusVolkhart @malafeev @trask @tylerbenson @XiXiaPdx @dengliming @hengyunabc @jarebudev @brianashby-sfx
0.9.1 - 2020-10-07
-
API
- BREAKING CHANGE: SpanId, TraceId and TraceFlags are no longer used as instances, but only contain helper methods for managing conversion between Strings, bytes and other formats. SpanId and TraceId are now natively String-typed, and the TraceFlags is a single byte.
- BREAKING CHANGE: Propagators now only expose a singleton instance.
- BREAKING CHANGE: The LabelConsumer and AttributeConsumer are now first-class interfaces, and the underlying consumer interface has had the key made additionally generic. Please prefer using the specific interfaces, rather than the underlying
ReadableKeyValuePairs.KeyValueConsumer. - BREAKING CHANGE: Minimum JDK version has been updated to 8, with Android API level 24.
- BREAKING CHANGE: Metric Instrument names are now case-insensitive.
- BREAKING CHANGE: The type-safety on Attributes has been moved to a new AttributeKey, and the AttributeValue wrappers have been removed. This impacts all the semantic attribute definitions, and the various APIs that use Attributes.
- BREAKING CHANGE: The obsolete HTTP_STATUS_TEXT semantic attribute has been removed.
- BREAKING CHANGE: The type of the REDIS_DATABASE_INDEX semantic attribute has been changed to be numeric.
- BREAKING CHANGE: Constant Labels have been removed from metric Instrument definitions.
- BREAKING CHANGE: The number of available Span Status options has been greatly reduced (from 16 to 3).
- BREAKING CHANGE: Constant labels have been removed from metric Instrument definitions.
- BREAKING CHANGE: The only way to specify span parenting is via a parent Context
- BREAKING CHANGE: The default TextMapPropagator is now a no-op in the API
- BREAKING CHANGE: CorrelationContext has been renamed to Baggage
- BREAKING CHANGE: Null-valued span attribute behavior has been changed to being "unspecified".
- BREAKING CHANGE: Link and Event interfaces have been removed from the API
- BREAKING CHANGE: The Status object has been removed from the API, in favor of StatusCanonicalCode
- BUGFIX: the
noParentoption on a Span was being ignored if it was set after setting an explicit parent. - BUGFIX: Attributes and Labels now preserve the latest added entry when an existing key has been used.
- BUGFIX: Updated some of the W3C traceparent validation logic to better match the spec.
- FaaS semantic attributes have been added
- Semantic attribute for "exception.escaped" added
-
SDK
- BREAKING CHANGE: The names of the Sampler.Decision enum values, returned by the Sampler interface, have changed.
OpenTelemetrySdk.forceFlush()now returns a CompletableResultCode- BREAKING CHANGE: The
ProbabilitySamplerhas been renamed toTraceIdRatioBased - BREAKING CHANGE: The environment variables/system properties for specifying exporter and span processor configuration have been updated to match the specification.
- BREAKING CHANGE: Exported zipkin attributes have been changed to match the specification.
- BREAKING CHANGE: Metric Descriptor attributes have been flattened into the MetricData for export.
- BREAKING CHANGE: The OpenTelemetrySdk class now returns a TraceSdkManagement interface, rather than the concrete TracerSdkProvider.
- BUGFIX: Zipkin span durations are now rounded up to 1 microsecond, if less than 1.
- BUGFIX: The insecure option for OTLP export now does the correct thing.
- Added a configuration option for disabling SPI-provided ResourceProviders
- New incubator module with helper classes for working with SpanData
- AWS resources now include the
cloud.providerattribute.
-
Extensions
- BREAKING CHANGE: Propagators now only expose a singleton instance.
- The auto-config extension has been moved to the instrumentation project.
- New incubator module with some utilities for mutating SpanData instances.
- The AWS Resource extension will now pull in EKS Resource attributes.
- New pre-release extension for handling logging natively.
Thanks
Many thanks to all who made this release possible:
@bogdandrutu @Oberon00 @jkwatson @thisthat @anuraaga @jarebudev @malafeev @quijote @JasonXZLiu @zoercai @eunice98k @dengliming @breedx-nr @iNikem @wangzlei @imavroukakis
0.8.0 - 2020-09-01
-
Extensions:
- Updated metrics generated by the runtime_metrics module to match the proposed semantic conventions.
-
API:
- BREAKING CHANGE: Renamed HttpTextFormat to TextMapPropagator
- Added a toBuilder method to the Attributes class
- Added method to create an Attributes Builder from ReadableAttributes
- Updates to the Attributes' null-handling to conform to the specification
- TraceState validations were updated to match the W3C specification
- recordException Span API now has an additional overload to support additional attributes
-
SDK:
- BUGFIX: Bound instruments with no recordings no longer generate data points.
- BREAKING CHANGE: The Exporter interfaces have changed to be async-friendly.
- BREAKING CHANGE: The parent context passed to the Sampler will no longer be nullable, but instead an invalid context will be passed.
- BREAKING CHANGE: The SpanProcessor now takes a ReadWriteSpan for the onStart method
- BREAKING CHANGE: ResourceConstants changed to ResourceAttributes
- BREAKING CHANGE: ParentOrElse Sampler changed to be called ParentBased
- Default Resource include the SDK attributes
- ResourceProvider SPI to enable custom Resource providers
- The individual pieces of the SDK are not published as individual components, in addition to the whole SDK artifact.
- Zipkin and Jaeger exporters now include the InstrumentationLibraryInfo attributes.
- The OTLP protobufs were updated to version 0.5.0 and the OTLP exporters were updated accordingly.
-
Many thanks for contributions from @anuraaga, @dengliming, @iNikem, @huntc, @jarebudev, @MitchellDumovic, @wtyanan, @williamhu99, @Oberon00, @thisthat, @malafeev, @mateuszrzeszutek, @kenfinnigan
0.7.1 - 2020-08-14
- BUGFIX: OTLP Span Exporter: fix splitting metadata key-value substring with more than one '=' sign
0.7.0 - 2020-08-02
NOTE: This release contains non-backward-compatible breaking SDK changes
- Added an InMemoryMetricExporter
- Added a toBuilder method to Labels
- Added some semantic attribute constants
- New ZPages extension module with TraceZ and TraceConfigZ pages implemented
- Some overloads added for setting the parent Context
- Some performance improvements in HttpTraceContext implementation
- Removed null checks from the Trace APIs
- The bare API will no longer generate Trace and Span IDs when there is no parent trace context.
- Null Strings are no longer valid keys for Attributes
- BREAKING CHANGE: The Sampler API was changed
- Default endpoint is now set for the OTLP exporters
- BREAKING CHANGE: Jaeger exporter env vars/system properties were updated
- Resource attributes may now be set with a System Property as well as the environment variable.
- Added a propagator for Lightstep OpenTracing propagator
- The ZipkinSpanExporter now defaults to using the OkHttpSender
- The default Sampler in the SDK is now the ParentOrElse sampler
- BUGFIX: SpanWrapper SpanData implementation is now truly Immutable
- Added some simple logging for failed export calls
- Quieted the noisy B3 propagator
- Public constants were added for exporter configuration options
- Added a new configuration option to limit the size of Span attributes
- Many thanks for contributions from @anuraaga, @dengliming, @iNikem, @wtyanan, @williamhu99, @trask, @Oberon00, @MitchellDumovic, @FrankSpitulski, @heyams, @ptravers, @thisthat, @albertteoh, @evantorrie, @neeraj97,
0.6.0 - 2020-07-01
NOTE: This release contains non-backward-compatible breaking API and SDK changes
- Introduction of immutable Attributes for SpansEvents, Links and Resources
- Introduction of immutable Labels for Metric Instruments and Recordings
- BUGFIX: make sure null Points are not propagated to metric exporters
- Added a propagator for AWS X-Ray
- BUGFIX: IntervalMetricReader now handles exceptions thrown by metric exporters
- Renamed contrib modules to "extensions" (Note: this changes the published artifact names, as well)
- Converted CorrelationContext entry keys and values to simple Strings
- Enhanced OTLP exporter configuration options
- Added new SDK Telemetry Resource populator
- Introduced an new MultiTracePropagator to handle multiple propagation formats
- Added new AWS Resource populators
- Added an extension to populate span data into log4j2 log formats.
- Changed the MinMaxSumCount aggregations for ValueRecorders to always aggregate deltas, rather than cumulative
- Updated the OTLP protobuf and exporter to version 0.4.0 of the OTLP protobufs.
0.5.0 - 2020-06-04
TODO: fill this out
- Add helper API to get Tracer/Meter
0.4.0 - 2020-05-04
- Initial implementation of the Zipkin exporter.
- Breaking change: Move B3 propagator to a contrib package
- Add support for Jaeger propagator
- Start implementing support for configuring exporters using Config pattern with support to load from environment variables and system properties.
- Add support to flush the entire SDK processors and exporter pipelines.
- Mark all threads/pools as daemon.
- Add support for Jaeger remote sampler.
0.3.0 - 2020-03-27
- Initial Java API and SDK for context, trace, metrics, resource.
- Initial implementation of the Jaeger exporter.
- Initial implementation of the OTLP exporters for trace and metrics.