Repository navigation
v1.1.0-beta.2
Pre-release
Pre-release
·
118 commits
to main
since this release
Added
- Pluggable
TimeProviderfor span timestamps. Web targets (Dart-on-JS, Wasm) automatically getWebTimeProvider(sub-millisecond viawindow.performance.now()+timeOrigin); native targets keepSystemTimeProvider(DateTime.now, unchanged behaviour). No code change required to pick up the web precision — auto-selected via the API package's platform-awaredefaultTimeProvider. Override viaOTel.initialize(timeProvider: customProvider)for cases like a fake clock in tests.
The abstraction lives indartastic_opentelemetry_api(see API beta.5 changelog). The SDK'sTracerProvider.timeProvideris now a delegate getter/setter that reads through to the underlyingAPITracerProvider, so SDK and API share a single source of truth. OTel.attributesFromSemanticMap(Map<OTelSemantic, Object>)— convenience passthrough toOTelAPI.attributesFromSemanticMap. Lets call sites that build attribute maps from typed semconv enums skip the.keyaccessor on every entry:OTel.attributesFromSemanticMap({HttpResource.requestMethod: 'GET'})instead ofOTel.attributesFromMap({HttpResource.requestMethod.key: 'GET'}). Mixing different semconv enum types in one map is fine — the param type is theOTelSemanticinterface that every semconv enum implements.
Changed
- README and every example under
example/now useattributesFromSemanticMapfor typed-enum-keyed maps. The longerattributesFromMapform remains for raw-string-keyed maps ({'foo.bar': value}) and shows up in the README only as a counter-example for app-specific keys without a typed enum. - Bumped
dartastic_opentelemetry_apito^1.0.0-beta.4. Beta.4 addsOTelAPI.loggerProviders()parallel to the existingtracerProviders()/meterProviders().
Fixed
- Named
LoggerProviders now shut down withOTel.shutdown(). Closes the documented gap from beta.1's fix for issue #33. Beta.1 only shut down the defaultLoggerProvider; any provider created viaOTel.addLoggerProvider(name)still kept itsBatchLogRecordProcessor.Timer.periodicalive, parking the Dart isolate aftermain()returned for any consumer with multiple LoggerProviders. With API beta.4's newloggerProviders()enumerator,OTel.shutdown()now iterates all of them the same way it already does for tracer / meter providers.