Repository navigation
0.8.0
This release is based on the following OpenTelemetry PHP packages:
Breaking changes
- PHP 8.1 is no longer supported. Supported PHP versions are now 8.2 to 8.5.
open-telemetry/sdk1.17,api1.12,context1.6,exporter-otlp1.6 andsdk-configuration0.10 require PHP 8.2. Users on PHP 8.1 should stay on the 0.7.x release. - Declarative configuration (
OTEL_CONFIG_FILE) followssdk-configuration0.10:- the file must declare
file_format: "1.0"; the1.0-rc.*and0.xformats are rejected (update files that use1.0-rc.2), OTEL_CONFIG_FILEnames exactly one file,- the schema changes of configuration 1.0 apply, for example
disabledbecameenabledin the tracer, meter and logger configurators, OTLP TLS settings moved undertls,lowmemorybecamelow_memory, thezipkinexporter was removed, and an omittedtracer_provider,meter_providerorlogger_provideris now a noop provider. - See the
sdk-configuration0.10.0 release notes for the full list.
- the file must declare
- HTTP export retries in the SDK transport now only cover 429, 502, 503 and 504 (it used to retry 408, 429 and every 5xx). The distro's native OTLP transport keeps its own retry policy.
open-telemetry/exporter-otlp1.5.0 requiresgen-otlp-protobuf1.11.1 (OTLP proto v1.11.1, up from v1.8.0) andgoogle/protobuf4.31. Ifext-protobufis installed it must be 4.31 or newer.- Code that extends or replaces the OTLP exporters must follow
exporter-otlp1.5.0:ProtobufSerializerno longer defines theSUPPORTED_CONTENT_TYPEStype alias (useContentTypes::*), andMetricExporteraccepts anAggregationTemporalitySelectorInterfaceas its temporality argument. - Component registration in
open-telemetry/sdk1.17: exporter and transport factories and propagators are registered through SPI (RegistrarInterface) the first time theRegistryis asked for one, no longer by_register.phpfiles that Composer includes. A component registered withRegistry::register*()before that first lookup wins over the built-in one, one registered with$clobberalways wins, and a package that registers a built-in name from its own autoload file now wins over the SDK's. Allow thetbachert/spiComposer plugin inconfig.allow-pluginsof your application for this to take effect; without it the components are registered when their autoload files load, as before. The distro's own bundled dependencies are built with the plugin. Configuration::getEnum()returns lowercase values sinceopen-telemetry/sdk1.17. Code that compares its result with uppercase or mixed-case strings must use lowercase. Enum configuration values and component names are interpreted case-insensitively.
What's changed
- chore: update open-telemetry packages (SDK 1.17.0, API 1.12.0, exporter-otlp 1.6.0, sdk-configuration 0.10.0, sem-conv 1.45.0 and the auto-instrumentation packages) (PR #172)
- feat: the root span (transaction span) is created by the SDK's
AutoRootSpan(URL grouping, request and response header capture and request body capture come from the SDK, see the upstream highlights). The distro still enables it by default for web and CLI, and the defaults are supplied to the distro's own SDK only, so an application's own copy of the SDK is not affected (PR #172) - fix: the distro's OTLP exporters (
Contrib/Otlp) are compatible withexporter-otlp1.5.0; without this the OTLP metric exporter could not be created (PR #172) - feat: native OTLP exporters aligned with
exporter-otlp1.6.0 (histogrammin/maxare not exported when they were not recorded), native semantic conventions 1.45.0 and OTLP proto v1.11.1 (PR #172) - fix(inferred-spans): keep instrumentation spans and their parents exported (PR #167)
- fix(inferred-spans): end inferred spans natively before the post hooks of instrumentations run (PR #170)
- feat: build the distro as a container image, for
COPY --from(PR #165) - feat: publish the distro container image to ghcr.io on release (PR #171)
Upstream package highlights
- opentelemetry-sdk 1.17.0 (sdk 1.15.0→1.17.0):
- feat (1.17): components (exporter and transport factories, propagators) are registered through SPI (
RegistrarInterface, needs thetbachert/spiComposer plugin), so the root span finds the OTLP exporter regardless of the order Composer loads the packages;AutoRootSpan::start($notifySpanEnded)keeps the callback when the root span was already started - breaking (1.17):
Configuration::getEnum()returns lowercase values; enum configuration values and component names are interpreted case-insensitively - fix (1.17): consistent probability samplers compute the rejection threshold exactly; synchronous Gauge is stable
- fix (1.16.1): the host resource detector no longer runs
ioreg,kenvandpowershell.exethrough a shell (they are called by absolute path, without a shell) - feat:
AutoRootSpan::start(), a root span that names spansMETHOD path(grouped byOTEL_PHP_TRANSACTION_URL_GROUPS), captures the headers named inOTEL_INSTRUMENTATION_HTTP_SERVER_CAPTURE_REQUEST_HEADERSand..._RESPONSE_HEADERS, setshttp.response.status_codeand supports CLI scripts (OTEL_PHP_TRANSACTION_SPAN_ENABLED,OTEL_PHP_TRANSACTION_SPAN_ENABLED_CLI) - feat: opt-in request body capturing as
http.request.body.content(OTEL_PHP_INSTRUMENTATION_HTTP_SERVER_CAPTURE_REQUEST_BODY,..._MAX_SIZE, 1024 bytes by default); only textual bodies are recorded and they are not redacted - feat:
OTEL_PHP_EXCLUDED_REQUEST_HEADERSdisables the SDK for web requests with a matching header - feat: composable samplers (experimental),
OTEL_METRICS_EXEMPLAR_FILTERacceptsalways_on,always_offandtrace_based(default), per-instrument-kind temporality selection, new view options (DropAggregation, attribute key filters) - fix:
OTEL_ATTRIBUTE_COUNT_LIMITandOTEL_ATTRIBUTE_VALUE_LENGTH_LIMITwere ignored; the wildcard matcher behindOTEL_PHP_TRANSACTION_URL_GROUPSmatched texts it should not; every export failed when the HTTP client decoded a gzip response itself - an unparseable
OTEL_CONFIG_FILEnow logs a warning and leaves the SDK as noop instead of throwing
- feat (1.17): components (exporter and transport factories, propagators) are registered through SPI (
- opentelemetry-api 1.12.0 (api 1.10.0→1.12.0), opentelemetry-context 1.6.0 (context 1.5.0→1.6.0):
- fix (1.12):
WithSpanHandleruses the span name of#[WithSpan(span_name: ...)]; an unrecognisedOTEL_LOG_LEVELlogs a warning and falls back toinfo - feat:
Logging::setLogLevel(),Severity::fromName(),Context::withLogger(), tracecontext and baggage propagator providers for declarative configuration - fix: baggage propagator no longer drops entries with percent-encoded values (1.10.1);
exception.escapedis no longer set bytrace()andWithSpanHandler - change: the
Contextdefault logger writes to the internal logger (filtered byOTEL_LOG_LEVEL) instead of being aNullLogger - context:
EnvironmentGetterSetternormalizes keys to environment variable names
- fix (1.12):
- opentelemetry-exporter-otlp 1.6.0 (exporter-otlp 1.4.0→1.6.0):
- change (1.6): requires
open-telemetry/sdk1.17 andtbachert/spi; the exporter and transport factories are registered through SPI; passing aTemporalityor a string as the temporality ofMetricExporteris deprecated - fix (1.6): the
otlp/stdoutmetrics exporter readsOTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - feat:
OTEL_EXPORTER_OTLP_[SIGNAL_]CERTIFICATE,..._CLIENT_CERTIFICATE,..._CLIENT_KEYand..._INSECURE - change: the
User-Agentheader isOTel-OTLP-Exporter-PHP/<version>; histogram data points without min and max are exported without them - fix: gRPC default endpoint and per-signal gRPC endpoints,
OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCEis applied per instrument kind
- change (1.6): requires
- sdk-configuration 0.10.0 (config-sdk 0.9.0→0.10.0):
- feat: configuration file format 1.0, composable samplers,
log_level,compression: none, view aggregations and attribute key patterns - fix: view
selector.unit,stream.aggregationandattribute_keys.excludedwere ignored; the OTLP client key was read fromclient_certificate_file - see the breaking changes above
- feat: configuration file format 1.0, composable samplers,
- sem-conv 1.45.0 (sem-conv 1.38.0→1.45.0): generated from semantic conventions 1.45.0
- opentelemetry-auto-laravel 1.9.1 (laravel 1.9.0→1.9.1):
- fix:
db.query.textis not set on thegetModelsspan (it madetoSql()throw for MongoDB); the query string is no longer mixed intourl.path opentelemetry-auto-laravel1.10.0 is not included yet: it moves to the class-basedInstrumentationAPI (theLaravelInstrumentation::NAMEconstant is gone, the instrumentation is configured throughLaravelConfiguration), which needs a separate change in the distro
- fix:
- opentelemetry-auto-mysqli 0.5.0, opentelemetry-auto-pdo 0.6.0 (package changelogs: mysqli 0.4.0→0.5.0, pdo 0.5.0→0.6.0):
- feat: SQLcommenter 0.3 support, deprecated
TraceAttributesreplaced by the namespaced SemConv classes - fix: binary SQL literals are preserved when SQLcommenter is installed
- feat: SQLcommenter 0.3 support, deprecated
- opentelemetry-auto-postgresql 0.4.1, opentelemetry-auto-slim 1.5.1 (package changelogs: postgresql 0.4.0→0.4.1, slim 1.5.0→1.5.1):
- deprecated
TraceAttributesreplaced by the namespaced SemConv classes
- deprecated
- opentelemetry-metrics-runtime 0.3.0 (metrics-runtime 0.2.0→0.3.0):
- feat:
process.paging.faultsandprocess.uptimeruntime metrics
- feat:
Full changelog: v0.7.2...v0.8.0