Repository navigation
v1.1.0-beta.17
Pre-release
Pre-release
·
4 commits
to main
since this release
The spec-compliance issues this release closes (#106,
#111,
#115,
#142,
#143,
#144,
#145,
#193,
#194,
#224)
were written by @michaelbushe and @yuzurihaaa; each entry credits the pull requests that made the change.
Changed
- BREAKING: Built on
dartastic_opentelemetry_api1.0.0-rc.4. The API's breaking changes
(api CHANGELOG) apply
to SDK users through the re-exported API:Baggage.getAllValues()returnsMap<String, BaggageEntry>,
Context.copyWithValueis gone,TraceFlags.fromStringreturns null on invalid input, andAPISpanno longer
exposes its recorded data.OTel.traceIdFromandOTel.spanIdFromaccept only lowercase hex and return an invalid
(all-zero) id for malformed input instead of throwingFormatException.APIMeterProviderno longer has
endpoint,serviceName,serviceVersion,enabledorisShutdown; the SDKMeterProviderthat
OTel.meterProvider()returns keeps them
(api#112 by @robert-northmind,
api#113 by @harshitt13,
api#127 by @harshitt13,
api#130 by @harshitt13,
api#114 by @robert-northmind,
api#137 by @i-am-paradox,
api#140 by @michaelbushe,
#309 by @michaelbushe). - BREAKING:
Tracer.startSpanandTracer.createSpanno longer takeparentSpanorspanContext. The parent
comes from theContext(orContext.current) with the precedence the API documents:
root> remoteSpanContext> local span > valid non-remoteSpanContext> new root.
parentSpan: parentbecomescontext: Context.current.withSpan(parent); aSpanContextplaced on the context withwithSpanContextparents a
child of it (new span ID,parentSpanIdset), which replaces the old verbatimspanContext:behavior of
createSpan. Both methods acceptroot: trueto force a new trace, andstartSpanacceptsstartTime
(api#118 by @harshitt13, #309). Span.attributes,spanEvents,spanLinks,statusandstatusDescriptionare SDK accessors now, read through
the API'sReadableSpan, sinceAPISpanno longer exposes them
(api#140 by @michaelbushe). Exporters and processors
that hold the SDKSpanare unaffected;Span.attributesis no longer marked@visibleForTesting
(#309).MeterProvidernow owns itsendpoint,serviceName,serviceVersion,enabledandisShutdownstate instead
of forwarding to the API provider, which no longer holds any
(api#113 by @harshitt13). The SDK surface is
unchanged for callers (#309).Meter.createHistogramreads its bucket boundaries fromadvisory.explicitBucketBoundarieswhen the deprecated
boundariesparameter is absent; when both are given,boundarieswins, matching the API
(api#113 by @harshitt13, #309).- A sum
Metricwith noisMonotonicvalue is now exported as non-monotonic: OTLP sendsis_monotonic: falseand
the Prometheus exporter types it asgauge. Before, both assumed monotonic. SDK instruments always set the value, so
only aMetric(type: MetricType.sum)built by hand withoutisMonotonicis affected.Metric.sum()still defaults
toisMonotonic: true
(#307 by @yuzurihaaa). - BREAKING: The Prometheus exporter now types a non-monotonic sum, including every
UpDownCounter, asgauge,
notcounter, which compatibility/prometheus_and_openmetrics.md specifies. PromQL that appliesrate()or
increase()to these series needs updating
(#307 by @yuzurihaaa).
Added
Meter.registerBatchCallback(callback, instruments)runs one callback that observes several asynchronous instruments
at once, once per collection, before those instruments collect; the returned registration'sunregister()stops it.
An instrument from another meter is reported throughOTelErrorHandlingand the callback is not registered; an
observation for an instrument the callback was not registered with is dropped and reported
(api#113 by @harshitt13, #309).InstrumentAdvisoryis accepted by all sevenMeter.create*methods and exposed asadvisoryon every SDK and no-op
instrument. The threecreateObservable*methods accept acallbackslist
(api#113 by @harshitt13, #309).
Deprecated
- The
boundariesparameter onMeter.createHistogramand theboundariesgetter onHistogram; use
InstrumentAdvisory.explicitBucketBoundaries. Thecallbackparameter on the threecreateObservable*methods; use
callbacks, to which acallbackis prepended
(api#113 by @harshitt13, #309).
Fixed
W3CTraceContextPropagator.extractrejects atraceparentwhose trace-id, parent-id or trace-flags field is not
lowercase hex, as context/api-propagators.md requires. Before, uppercase or signed hex in the IDs was accepted and an
invalid trace-flags field defaulted the flags
(api#112 by @robert-northmind, api#114 by @robert-northmind,
api#137 by @i-am-paradox, #309).- The OTLP log exporters now send
event_name.LogRecord.eventNamewas never copied onto the wire, so every
event emitted withemit(eventName: ...)arrived at the collector as a plain log record with no name, and anything
filtering onevent_namesaw nothing. The bundled protobuf definitions were generated from opentelemetry-proto
v1.1.0, which predates the field; they are regenerated from v1.11.0, which addsLogRecord.event_nameand the
EntityRefand string-table fields onResource,AnyValueandKeyValue. No generated type was removed
(#303 by @michaelbushe). - The OTLP log exporters write an instrumentation scope's schema URL to
ScopeLogs.schema_url, where
logs/data-model.md and the OTLP proto place it, instead of toResourceLogs.schema_url, which describes the resource
and now carries theResource's own schema URL. Loggers whose scopes differ only by schema URL are no longer merged
into oneScopeLogs(#303 by @michaelbushe). - A synchronous
UpDownCounteris now exported as a non-monotonic sum, which metrics/sdk.md makes a MUST for Sum
aggregation. Before, OTLP exported it withis_monotonic: true.Counternow setsisMonotonic: trueexplicitly
(#307 by @yuzurihaaa). TraceIdRatioSampler.descriptionisTraceIdRatioBased{RATIO}, the name trace/sdk.md gives the sampler, instead of
TraceIdRatioSampler{RATIO}(#298 by @LaPyaeOo).- OTLP/HTTP exporters now retry transient errors for the retryable HTTP status codes 429, 502, 503 and 504, as
protocol/exporter.md requires (MUST). Before, 502 and 504 failed the export without a retry, and retryability was
decided by matching the exception message instead of the status code
(#305 by @LaPyaeOo).