dartastic_opentelemetry_api 1.0.0-beta.4-wip
dartastic_opentelemetry_api: ^1.0.0-beta.4-wip copied to clipboard
Dartastic.io's OpenTelemetry API for Dart following the OpenTelemetry specification. Supports all platforms including web.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.0.0-beta.4-wip #
1.0.0-beta.3 - 2026-05-10 #
Fixed #
- Breaking:
ServiceResource.serviceResourcepace(keyservice.Resourcepace) was a mangled find/replace artifact (Name→Resourceaccidentally hitserviceNamespace). Restored the correct OTel semconv entry:ServiceResource.serviceNamespacewith keyservice.namespace. Migration: replaceServiceResource.serviceResourcepacewithServiceResource.serviceNamespace.
1.0.0-beta.2 - 2026-05-08 #
Added #
DatabaseResource.dbCollectionName(db.collection.name) — current OTel semconv key, replaces the deprecateddb.sql.table.DatabaseResource.dbResponseReturnedRows(db.response.returned_rows) — current OTel semconv key for the row count returned by a database operation.UserSemantics.userRoles(user.roles) — current OTel semconv key, an array of roles assigned to a user.
Changed #
- README and example renamed the placeholder
AppAttributeenum toExampleAttribute(so readers can't blindly copy the name) and dropped the redundantapp.prefix from invented demo keys. Where current OTel semconv keys exist, the example now uses the API's typed enums (e.g.DatabaseResource.dbCollectionName,UserSemantics.userRoles) instead of an app-defined fallback.
Removed #
- Breaking:
UserSemantics.userRole(singularuser.role). The singular form is an anti-pattern — users typically have multiple roles. UseUserSemantics.userRoles(user.roles) and pass aList<String>instead.
1.0.0-beta.1 - 2026-05-07 #
Fixed #
Context.runIsolate()now marks the deserializedSpanContextasisRemote = trueon the receiving side. Previously the parent isolate's local SpanContext (withisRemote = false) was restored verbatim, sotracer.startSpanin the new isolate fell into the "no parent" branch and produced a fresh root span instead of a child of the parent. This now matches the W3C trace-context-from-HTTP semantic — a SpanContext that crossed a process or isolate boundary is treated as remote and parented correctly.
1.0.0-beta - 2026-05-07 #
Added #
- (Thank you to Kevin Moore @kevmoo)
Context.run()andContext.runSync()— Zone-based implicit context propagation. These are the spec-aligned way to attach a context for a scope of execution and ensure it propagates correctly acrossawaits and async callbacks. - (Thank you to Kevin Moore @kevmoo)
isTransferableflag onContextKey(defaultfalse) to opt custom keys into cross-isolate transfer viaContext.runIsolate(). ServerResourceandUrlResourcesemantic resource enums.
Changed #
- Breaking:
tracer.startSpan()no longer automatically activates the span in the current context, aligning with the OpenTelemetry specification. Usetracer.withSpan/withSpanAsync(orContext.runSync/Context.run) to make a span active for a scope. - Breaking:
Context.currentWithBaggage()is now pure — it returns a Context with Baggage but no longer mutatesContext.current. Pair the returned Context withrunSync/runif you need it active. - Breaking: Custom values stored via
ContextKeyare no longer transferred across isolate boundaries by default. PassisTransferable: truewhen creating the key to opt in. Built-inBaggageandSpanContextcontinue to transfer unconditionally. APITracer.withSpan()andwithSpanAsync()now use Zone-based context propagation (Context.runSync/Context.run) for correct behavior across async boundaries (no-op implementation only).- README and example updated to demonstrate Zone-based context management.
Deprecated #
- The static
Context.currentsetter. Setting it does not propagate acrossZones, which produces incorrect context inside async callbacks. UseContext.run()orContext.runSync()instead.
Fixed #
APITracer.createSpan()now correctly inherits parent spans from the providedcontextparameter orContext.current. Previously these were ignored.Context.runIsolate()now serializes the specific Context instance it was called on, not the globalContext.current.Context.runIsolate()no longer mutates the parent isolate's_currentContexton return — eliminates a case where Zone-bound context could leak into the parent's static field.nowAsNanos()no longer loses precision on JS. The 64-bit wrap now happens before the multiplication by 1000.
1.0.0-alpha - 2025-12-22 #
Changed #
Documentation, updated to 1.0.0-alpha release candidate, matching dartastic_opentelemetry
0.9.0 - 2025-12-14 #
Added #
Logs signal, kudos to https://github.com/yuzurihaaa
0.8.3 - 2025-06-06 #
0.8.2 - 2025-06-05 #
Changed #
- Added instrumentationScope() to API
- Removed _getAndCacheOtelFactory() check from getTracerProviders/getMeterProviders
0.8.0 - 2025-05-01 #
Added #
- Initial public release of the OpenTelemetry API for Dart
- Core abstractions for traces, metrics and common (baggage, context)
- Context propagation mechanisms
- Implementation of the OpenTelemetry specification
- No-op implementations of all interfaces
- Comprehensive test suite
- Basic examples
Compliance #
- Implements OpenTelemetry API specification v1.42