Skip to content

Latest commit

 

History

History
624 lines (513 loc) · 29.7 KB

File metadata and controls

624 lines (513 loc) · 29.7 KB

opentelemetry-kotlin changelog

Unreleased

Version 0.7.0 (2026-08-26)

Migration notes

  • SdkErrorHandler now has a single onError(SdkError) method in place of onApiMisuse, onSdkCodeError, and onUserCodeError. (#710)
  • Sampler.shouldSample now receives the trace ID as a ByteArray rather than a hex String. (#817)
  • The ContextFactory.with(Context, Map) extension has been removed. Create a key with ContextFactory.createKey(name) and use Context.set(key, value) instead. (#837)
  • ReadableLogRecord now extends the new LogRecordData interface and exposes toLogRecordData(), mirroring the existing ReadableSpan/SpanData split. (#822)
  • The default resource now carries a schema URL matching the semantic conventions these artifacts were generated from. (#754)
  • Semantic conventions have been updated to v1.44.0. (#779)
  • The opentelemetry-java BOM used by compat has been updated to 1.65.0. (#767)

📈 Enhancements

  • Add the composite sampler (composite { }) and the built-in composable samplers, in both implementation and compat. (#708) (#709) (#772) (#775) (#986)
  • Add a span event bridge, published as the new span-event-bridge module, which converts log records into span events via spanEventBridgeLogRecordProcessor(). (#761)
  • IdGenerator now declares whether it produces random trace IDs via generatesRandomTraceIds. (#755)
  • Errors raised by exporters, processors, providers, propagators, samplers, and export coroutines are now reported to SdkErrorHandler. (#763) (#771) (#830) (#840) (#841) (#842) (#849) (#910)
  • OTLP exporters reuse a single Ktor HttpClient per engine and timeout combination rather than creating one per export. (#843)

🛠️ Bug fixes

  • Populate the event name in compat. (#717)
  • Link a child span to its parent correctly when the parent Span is decorated. (#716)
  • Fix several protobuf conversion errors in the OTLP payload, including AnyValue conversion and mapping StatusCode with a when rather than by ordinal. (#757) (#758) (#828) (#835) (#903)
  • OTLP payloads now carry one Resource and InstrumentationScope per group of spans rather than repeating them per span, and set schema_url on ResourceSpans and ResourceLogs. (#883) (#984)
  • Deduplicate instrumentation scopes by name, version, schema URL, and attributes. (#812) (#988)
  • Use spec-length zero IDs in NoopSpanContext, derive SpanContextImpl.isValid from the ID bytes, and construct a SpanContext from bytes without a hex round trip. (#881) (#896) (#981)
  • Accept only ASCII digits in the hex validators. (#888)
  • Do not inherit isRemote on locally created spans. (#889)
  • Do not throw on an out-of-range OtelTraceState threshold. (#897)
  • Sanitize span context trace flags rather than propagating invalid values. (#819)
  • Enforce the W3C baggage size limits when extracting baggage. (#941)
  • Do not include untrusted header values in B3Propagator error messages. (#975)
  • Validate instrument name syntax and sanitize instrument units to the specification. (#960) (#961)
  • Ignore Unset when setting a span status, per the specification. (#944)
  • Return defensive snapshots and copies rather than live collections in toSpanData, the log record export path, and the in-memory exporters. (#822) (#899) (#900) (#920) (#983)
  • Harden SpanModel and LogRecordModel against concurrent access, and make DefaultImplicitContextStorage.current volatile. (#803) (#815) (#816) (#834) (#849) (#943) (#949) (#980)
  • Stop swallowing CancellationException in coroutines, and rethrow from wrapOperation. (#813) (#950)
  • Improve the batch processor's handling of full queues and flush requests. (#827)
  • Fix an NPE in the compat context adapter. (#829)
  • Sanitize nonsensical BatchTelemetryConfig values instead of honouring them. (#902)
  • Default the stdout exporters to platformLog. (#942)
  • Match span event bridge IDs by bytes rather than hex. (#982)

Version 0.6.0 (2026-07-28)

Migration notes

  • Pin the minimum supported Kotlin version for iOS and JS (klib) consumers at 2.4.0 in the version catalog, instead of implicitly tracking the Kotlin version this library is built with. A Kotlin update that would raise this floor now fails the min-versions integration test, so raising it becomes a deliberate, documented decision. (#647)
  • Clarify the minimum supported Kotlin version per target family: 2.0.0 applies to JVM and Android consumers only, while iOS and JS consumers need at least the Kotlin version this library is built with (currently 2.4.0) — a klib toolchain constraint shared by all KMP libraries. Both floors are now enforced by integration tests. (#633)
  • Raise the minimum supported AGP version to 8.0.2. Through no fault of opentelemetry-kotlin, AGP 8.0.0 bundles an R8 that fails to dex Kotlin 2.0 @Metadata, so projects on that version can't build against these artifacts without an unusual manual R8 override. Later 8.0.x patches ship a working R8, making 8.0.2 — the final 8.0.x patch — a more sensible floor. (#614)
  • Raise the minimum supported Gradle version from 8.0 to 8.0.2, matching the AGP floor on the final 8.0.x patch. (#614)
  • Use the new name for the app id / client id (#623)

🌟 New instrumentation

📈 Enhancements

  • Implement enabled() on Tracer interface (#625)
  • Record dropped link/attribute/event counts (#630) (#631) (#629)
  • Implement LoggerConfig (#704)
  • Implementation of implicit context for coroutines (#684)

🛠️ Bug fixes

  • SpanProcessor.onEnding should be forwarded by OtelJavaSpanProcessorAdapter (#637)
  • OtelJavaSpanBuilderAdapter.setStartTimestamp should convert the startTimestamp into nanos from the specified TimeUnit (#638)

🧰 Tooling

  • Add helper action to regenerate yarn lockfile (#616)
  • Enable gradle tooling parallelism (#697)

Version 0.5.0 (2026-07-06)

  • Attributes are now considered a stable API. 🚀

Migration notes

  • The default resource no longer includes service.version. (#561)
  • The default scheduled batch export delay is now 5000ms. (#580)

📈 Enhancements

  • Metrics now include a minimal MeterProvider implementation wired through the OpenTelemetry entry points. (#527)
  • Add initial declarative config provider interfaces. (#598)
  • Add the AlwaysRecordSampler implementation. (#587)
  • Add generated event semantic convention classes. (#585)
  • Attributes are now stable and no longer marked with @ExperimentalApi. (#609)
  • TextMapGetter and TextMapSetter carrier arguments are now nullable to align with the OpenTelemetry propagator API specification. (#595)

🛠️ Bug fixes

  • Remove println output from OTLP exporters. (#560)
  • Log a warning when an instrumentation scope name is invalid. (#563)
  • Skip OTLP HTTP export requests when there is no telemetry to export. (#562)
  • Use the trace service response model for OTLP trace responses. (#573)
  • Retry OTLP HTTP requests on retryable status codes. (#574)
  • Make ReadWriteLogRecord.spanContext mutable. (#590)
  • Do not export spans when isSampled is false. (#589)
  • Pass span links to samplers. (#608)

📖 Docs

  • API stability levels are now documented in a matrix in api/README.md. (#579)
  • Improve CONTRIBUTING.md for new contributors. (#588)

🧰 Tooling

  • test: add test that enforces min supported versions (#521)
  • build: attempt to fix build (#524)
  • test: add a test that cross checks propagation between impl/compat (#525)

Version 0.4.0 (2026-05-20)

⚠️ Breaking changes

  • Drop platform support for x64 on iOS. This is due to the Kotlin language project also dropping support for iosX64. See the upstream release notes for additional detail. (#514)

📈 Enhancements

✉️ Attributes

  • Attributes now support equality (#425)
  • Attributes now support ByteArray value types. ( #430, #452 )
  • Attributes now support AnyValue value type. (#516)

🧳 Baggage

  • The Baggage API has an initial implementation. (#436)
  • Baggage API also includes a compat layer. (#433)
  • Baggage can be created through the OpenTelemetry API. (#480)
  • Baggage can now be stored in the OpenTelemetry Context. (#456)
  • BaggageFactory now has an implementation. (#457)

✈️ Propagators

  • implement compat layer for PropagatorFactory (#461)
  • add traceparent implementation (#462)
  • create compat adapter for propagators (#460)
  • Implement W3C TraceContext Propagator (#467)
  • create entrypoint for propagators (#469)
  • Initial implementation of the TextMapPropagator API. (#455)
  • New spec-compliant support for W3CBaggagePropagator has been added. (#458)
  • TextMapGetter now has getAll() method, per specification. (#466)

Miscellaneous Enhancements

  • feat(sampling): implement probability sampler (#398)
  • Initial API scaffolding has been created for Meter. (#414)
  • Initial API scaffolding for MeterProvider api. (#437)
  • OTLP exporters now allow users to provide a custom HttpClient. (#431)
  • support AnyValue in Logger.emit() (#490)
  • Scaffold MeterProvider config and compat layer (#498)
  • allow supplying a custom implicit context storage mechanism (#470)
  • thread local context storage (#479)
  • TraceState now has an initial implementation. (#464)
  • Provide implementation of AnyValue (#453)
  • LogLimit can now be configured from environment variables. (#407)

🛠️ Bug fixes

  • fix: specify span kind correctly in protobuf (#417)
  • fix: prevent empty key for attributes (#424)
  • fix: hook up attributes in compat resource implementation (#423)
  • fix: ensure that resource attributes don't have limits (#429)
  • fix: handle unexpected values in attributes (#432)
  • Enforce attribute size limit for byte array attribute values. (#468)
  • Invalid configs should not throw exceptions. (#504)
  • Don't throw when using the DSL to configure exporters and processors. (#503)
  • Remove throws on init in trace and span context usage scenarios (#506)

📖 Docs

  • docs: Add SIG meeting info and welcoming language (#493)
  • docs: add link for getting started instructions (#484)

🧰 Tooling

  • Add fuzz tests for trace context (#492)

Version 0.3.0 (2026-04-21)

  • Alter Tracing API so that Span does not include readable values (#267)
  • Move packages of several APIs (#321) (#295) (#293)
  • Alter resource API (#288)
  • Add SDK instance level support of ShutdownState (#300)
  • Provide return value for Scope#detach() (#287)
  • Disallow creating span events during creation (#290)
  • Add isRemote flag to SpanContext (#289)
  • Add DSL for configuring samplers (#297) (#314) (#325) (#346)
  • Capture default attributes in resource object (#308) (#317)
  • Add ResourceFactory API (#299)
  • Bump JavaScript dependencies (#309)
  • Support exception parameter in Logger interface (#296)
  • Move createKey() function to ContextFactory (#291)
  • Implement the AlwaysOn/AlwaysOff built-in samplers (#306)
  • Move additional interfaces to sdk-api (#311)
  • Add API for span conversion (#316)
  • Support logging structured messages (#313)
  • Configure attribute limits on traces/logs (#324)
  • Allow resources to be specified at a global level (#323)
  • Alter DSL for configuring built-in samplers (#327)
  • Ensure span id is generated before sampling decisions (#335)
  • Add global attribute limits (#328)
  • Add attributes from sampling result to span (#338)
  • Remove recordException() from API (#320)
  • Ensure that TraceState complies with W3C TraceContext spec (#345)
  • Disallow overriding span status once set to Ok (#357)
  • Add bounding for OTLP response body (#361)
  • Create parent based sampler (#349)
  • Update semantic conventions to v1.40.0 (#363)
  • Bump JavaScript dependency versions (#360)
  • Add ability to override span context (#358)
  • Add makeCurrent() API to ContextFactory (#351)
  • Allow specifying timeout for OTLP export (#386)

Version 0.2.0 (2026-03-11)

  • Set explicit minCompileSdk at 34 (#214)
  • Set minimum supported AGP version of 7.1.3 explicitly (#219)
  • Move various interfaces to sdk-api module to denote they should not be used when writing instrumentation (#223) (#224) (#240)
  • Various API changes to better align with the OpenTelemetry specification (#225) (#222) (#228) (#233) (#235) (#242) (#239) (#241) (#238) (#248) (#245) (#247) (#246)
  • Include semantic conventions by default as dependency of core module (#249)
  • Update opentelemetry-java to 1.60.1 (#260)

Version 0.1.0 (2026-02-20)

  • Initial donation of code to opentelemetry-kotlin. The project now uses io.opentelemetry coordinates (#3)
  • Removed 'opentelemetry-kotlin' prefix from all modules (#17)
  • A User-Agent header is now added to OTLP exporters (#53)
  • SpanProcessor now exposes onEnding() (#50)
  • Added stdout exporters (#58)
  • Exporters and processors now use suspend (#64) (#68)
  • Added in-memory exporters for testing (#54)
  • LoggerProvider and TracerProvider now implement shutdown() and forceFlush() (#86)
  • The project now builds using AGP 9 (#87)
  • Provided syntactic sugar for wrapping an operation in an implicit Context (#89)
  • Expose enabled() API on Logger (#91)
  • Provided syntactic sugar for tracing an operation with a Span (#55)
  • The api module has been split into api and sdk-api. api is intended for instrumentation authors; sdk-api is intended for application developers who instantiate OpenTelemetry. Several APIs have been moved to the sdk-api module in this release. (#120)
  • createNoopTelemetry() is deprecated in favor of NoopOpenTelemetry (#130)

Legacy release notes made under io.embrace coordinates

0.7.0

Oct 15, 2025

  • Initial OTLP export implementation
  • Various API changes and improvements

0.6.0

Sep 25, 2025

  • Performance improvements and optimizations

0.5.1

Sep 15, 2025

  • Fixes dependency resolution error in opentelemetry-kotlin-implementation module that was introduced in 0.5.0

0.5.0

Sep 15, 2025

  • Various API changes and improvements

0.4.2

Sep 4, 2025

  • Various API changes and improvements

0.4.1

Aug 30, 2025

  • Various API changes and improvements

0.4.0

Aug 18, 2025

  • Initial implementation of Logging + Tracing APIs

0.3.1

Aug 09, 2025

  • Various API changes and fixes to the adapter implementations

0.3.0

Aug 15, 2025

  • Various alterations across API surface

0.2.5

July 29, 2025

  • Improve API and implementation of Context

0.2.4

July 29, 2025

  • Miscellaneous alterations to public API surface

0.2.3

July 21, 2025

  • Added more experimental interfaces to the API surface

0.2.2

July 17, 2025

  • Added more experimental interfaces to the API surface

0.2.1

July 10, 2025

  • Added more experimental interfaces to the API surface

0.2.0

July 4, 2025

  • Added more experimental interfaces to the API surface

0.1.4

June 30, 2025

  • Added more experimental interfaces to the API surface

0.1.3

June 23, 2025

  • Fixes how context is set on spans

0.1.2

June 20, 2025

  • Bump dependency versions used to build project
  • Miscellaneous tweaks to API surface

0.1.1

May 2, 2025

  • Specified explicit Kotlin toolchain of 1.8
  • Miscellaneous tweaks to API surface in response to external feedback

0.1.0

April 14, 2025

  • Initial release