Repository navigation
Breaking changes
Configuration::getEnum()now returns lowercase values. Callers outside the SDK that compare its result with
uppercase or mixed-case strings must update their comparisons to use lowercase (#2142).Registrynow gets its built-in and package components fromRegistrarInterfaceproviders (SPI) when it is first
asked for one, no longer from_register.phpfiles that Composer includes. A component registered with
Registry::register*()before that first lookup wins over a provider's, one registered with$clobberalways wins,
and a non-clobbering registration made after it is ignored for names a provider already filled. A package that
registers a built-in name from its own autoload file now wins over the SDK's built-in one, it used to lose. Allow the
tbachert/spiComposer plugin inconfig.allow-pluginsfor this to take effect, without it the components are
registered when their autoload files load, as before (#2120).
Added
RegistrarInterface, for packages to register exporter factories, transport factories and propagators with the
Registrythrough SPI. Declare it withextra.spi-config.autoload-filesorextra.spi. It is a bridge for SDK 1.x
and will be removed in SDK 2.0, together with theRegistry(#2120).InMemoryExporteraccepts anAggregationTemporalitySelectorInterface, such asTemporalityPreference, as its
temporality, like the console and OTLP metric exporters (#2129).- An asynchronous instrument callback that returns a value logs a warning, once per callback. The value is ignored,
as it always was. Report measurements through the observer instead (#2129).
Changed
InstrumentType::GAUGEis no longer experimental. The synchronous Gauge is stable in the specification (#2129).
Deprecated
- Passing a
Temporalityor a string as the temporality ofConsoleMetricExporterorInMemoryExporter. Pass a
selector such asTemporalityPreference::cumulative()orTemporalityPreference::delta(). The delta preference
keeps UpDownCounters cumulative, as the specification requires, whereTemporality::DELTAmade them delta. An
exporter built without a temporality is not deprecated. It uses each stream's temporality until 2.0, which is
delta for synchronous instruments and cumulative for asynchronous ones. From 2.0 it will use cumulative. Pass
TemporalityPreference::cumulative()to get that now (#2129). MetricMetadataInterface::temporality()andMetricStreamInterface::temporality(). Choose temporality by
instrument type instead. They will be removed in 2.0 (#2129).
Fixed
- Enum configuration values, including sampler names, and trace, metric and log exporter names are now interpreted
case-insensitively. Exporter and transport factory names, text map propagator names, resource detector and response
propagator names are also case-insensitive when registering and looking up components (#2142). - With the root span enabled and the
tbachert/spiplugin running, the SDK finds the OTLP factories while
sdk/_autoload.phpbuilds its providers. It used to build them beforeexporter-otlp/_register.phpcould register
them, and the providers then stayed noop for the whole process, withSpan exporter factory not defined for: otlp
in the log. This also hitOTEL_CONFIG_FILE(Transport factory not defined for protocol: http) (#2120). AutoRootSpan::start($notifySpanEnded)registers the callback also when the root span was already started, for
example bySdkAutoloader::autoload(). The callback used to be dropped. A callback that throws no longer keeps the
root span from ending (#2120).- Consistent probability samplers compute the
threjection threshold exactly, with the precision recommended by the
specification. Sampling thresholds computed from ratios that aren't a sum of 56-bit fractions used to differ from the
spec test vectors:1/3wasth:aaaaaaaaaaaaacinstead ofth:aaab,0.1wasth:e6666666666666instead of
th:e666(#2140).
Full Changelog: 1.16.1...1.17.0