Skip to content

Release 1.17.0

Latest

Choose a tag to compare

@brettmc brettmc released this 19 Nov 08:15

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).
  • Registry now gets its built-in and package components from RegistrarInterface providers (SPI) when it is first
    asked for one, no longer from _register.php files that Composer includes. A component registered with
    Registry::register*() before that first lookup wins over a provider's, one registered with $clobber always 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/spi Composer plugin in config.allow-plugins for 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
    Registry through SPI. Declare it with extra.spi-config.autoload-files or extra.spi. It is a bridge for SDK 1.x
    and will be removed in SDK 2.0, together with the Registry (#2120).
  • InMemoryExporter accepts an AggregationTemporalitySelectorInterface, such as TemporalityPreference, 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::GAUGE is no longer experimental. The synchronous Gauge is stable in the specification (#2129).

Deprecated

  • Passing a Temporality or a string as the temporality of ConsoleMetricExporter or InMemoryExporter. Pass a
    selector such as TemporalityPreference::cumulative() or TemporalityPreference::delta(). The delta preference
    keeps UpDownCounters cumulative, as the specification requires, where Temporality::DELTA made 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() and MetricStreamInterface::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/spi plugin running, the SDK finds the OTLP factories while
    sdk/_autoload.php builds its providers. It used to build them before exporter-otlp/_register.php could register
    them, and the providers then stayed noop for the whole process, with Span exporter factory not defined for: otlp
    in the log. This also hit OTEL_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 by SdkAutoloader::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 th rejection 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/3 was th:aaaaaaaaaaaaac instead of th:aaab, 0.1 was th:e6666666666666 instead of
    th:e666 (#2140).

Full Changelog: 1.16.1...1.17.0