Repository navigation
Releases
Releases · opentelemetry-php/sdk
Release 1.16.1
Security
- The host detector ran
ioreg,kenvandpowershell.exethrough a shell, so they were
looked up onPATH, and on Windows in the current directory. A program placed there ran
instead. It runs/usr/sbin/ioreg,/bin/kenvandreg.exeby absolute path, without a
shell (GHSA-fc6f-cp96-6g5w). - When the host id lookup failed,
host.idwas""on macOS and Windows, or/bin/kenvon
BSD. It is left out instead (GHSA-fc6f-cp96-6g5w).
Full Changelog: 1.16.0...1.16.1
Release 1.16.0
Breaking changes
OTEL_CONFIG_FILEnames one file. It used to be split on commas for instrumentation config
(#2105).- Requires PHP 8.2, and no longer requires
symfony/polyfill-php82(#2091). - Requires
open-telemetry/api1.11, forLogging::setLogLevel()(#2068). - Requires
open-telemetry/sem-conv1.45, forHttpIncubatingAttributes::HTTP_REQUEST_BODY_CONTENT
(#2101). - If you set an
Accept-Encodingheader in the exporter headers, onlygzipresponses are decoded.
The discovered Guzzle client used to decode responses, and no longer does, so the body of a response
in another encoding, such asdeflateorzstd, is ignored with a warning. Without that header the
SDK asks for an uncompressed response (#2115, #2112). PsrTransportonly decodes gzip responses (also asx-gzip). The body of a successful response
that can't be decoded, such as adeflateorbrone that the specification doesn't mention, is
ignored with a warning (#2112).
Added
OTEL_PHP_EXCLUDED_REQUEST_HEADERSdisables the SDK for web requests that have a matching
header, likeOTEL_PHP_EXCLUDED_URLSdoes for a URL, for example
User-Agent: kube-probe*,X-Skip-Tracing. Entries arename: valueorname, the name ignores
case and treats_as-, and the value takes*wildcards. A value cannot contain a comma,
and a header sent more than once is matched as one value joined with,. Headers are read from
$_SERVERand are set by the client, so use a header that a trusted proxy sets or removes if
clients must not be able to opt out. It is evaluated when the SDK autoloads, so it needs an
autoload per request and does not work in workers that autoload once at boot (#2113).- Composable samplers in
OpenTelemetry\SDK\Trace\Sampler\Consistent, led by
CompositeSampler. All are experimental (#2077). - The auto root span names spans
METHOD path, grouped byOTEL_PHP_TRANSACTION_URL_GROUPS. It
captures the headers named inOTEL_INSTRUMENTATION_HTTP_SERVER_CAPTURE_REQUEST_HEADERSand
OTEL_INSTRUMENTATION_HTTP_SERVER_CAPTURE_RESPONSE_HEADERS, and sets
http.response.status_code.OTEL_PHP_TRANSACTION_SPAN_ENABLEDturns it on, and
OTEL_PHP_TRANSACTION_SPAN_ENABLED_CLIadds a root span for CLI scripts. New
AutoRootSpan::start()(#2080). OTEL_METRICS_EXEMPLAR_FILTERacceptsalways_on,always_offandtrace_based, and defaults
totrace_based.all,noneandwith_sampled_tracestill work (#2057).RandomTraceIdGeneratorInterface. Root spans from a generator that implements it, such as
RandomIdGenerator, get the W3Crandomtrace flag (#2092).TemporalityPreference, anAggregationTemporalitySelectorInterfacethat picks temporality per
instrument kind (#2095), andTemporalityPreference::fromName()(#2105).DropAggregation,InstrumentUnitCriteria,ViewTemplate::withAggregationResolver(), and
recordMinMaxonExplicitBucketHistogramAggregation(#2093).ViewTemplate::withAttributeKeyFilter(), which keeps attribute keys by*and?patterns.
Excluded wins (#2095).ConsoleMetricExporteraccepts anAggregationTemporalitySelectorInterfaceand a
TransportInterface(#2095).SdkBuilder::setLogLevel(), applied bybuildAndRegisterGlobal()until its scope is detached
(#2068).OTEL_PHP_INSTRUMENTATION_HTTP_SERVER_CAPTURE_REQUEST_BODYmakes the auto root span record the
request body ashttp.request.body.content, cut at
OTEL_PHP_INSTRUMENTATION_HTTP_SERVER_CAPTURE_REQUEST_BODY_MAX_SIZEbytes (1024 by default).
It is off by default, records only textual bodies, and does not redact them (#2101).
Changed
- An unparseable
OTEL_CONFIG_FILE, or one set withoutopen-telemetry/sdk-configuration
installed, logs a warning and leaves the SDK as noop. It used to throw (#2076). - Instrumentation config is read from the same parse of
OTEL_CONFIG_FILEas the SDK. This needs
open-telemetry/sdk-configuration0.10. An older one logs a warning and instrumentation gets no
config (#2076). - A malformed
OTEL_RESOURCE_ATTRIBUTESlogs a warning and is discarded in full. It used to
throw, which left the SDK as noop (#2105). - A trailing or doubled comma in a map variable such as
OTEL_RESOURCE_ATTRIBUTESor
OTEL_EXPORTER_OTLP_HEADERSis skipped. An entry with an empty key is an error (#2105). BatchSpanProcessorandBatchLogRecordProcessorlower amaxExportBatchSizeabove
maxQueueSizeto the queue size, with a warning. They used to throw (#2105). They accept a
schedule delay or export timeout of0(#2095).TraceIdRatioBasedSamplerwarns once when used as a child sampler (#2105). Its description is
TraceIdRatioBased{...}, notTraceIdRatioBasedSampler{...}(#2092).AlwaysRecordSampleris no longer experimental (#2092).- Exception attributes set explicitly on a log record win over those from
setException()
(#2092). - HTTP export retries 429, 502, 503 and 504. It used to retry 408, 429 and every 5xx (#2061).
Instrument::$unitand$descriptionare strings. A null is stored as''(#2105).ConsoleMetricExporterwrites through a stream transport, and returns false if the metrics
can't be encoded. It writes NaN and infinities as"NaN","Infinity"and"-Infinity"
(#2095).- The console exporters' output format is unspecified and may change between releases (#2092).
SdkDistributionandDistributionRegistryare@internal.DistributionConfigurationand
DistributionPropertiesare experimental (#2097).
Deprecated
OTEL_PHP_EXPERIMENTAL_AUTO_ROOT_SPAN. UseOTEL_PHP_TRANSACTION_SPAN_ENABLED, which wins when
both are set (#2080).EventLoggerProvider,EventLoggerProviderInterfaceandNoopEventLoggerProvider, with the
rest of the Events API (#2092).
Fixed
- Every export failed when the HTTP client decoded a gzip response itself and left
Content-Encoding
in place, as Symfony HttpClient does, because the body was decoded again.PsrTransportnow sends
Accept-Encoding: identity, so the server doesn't compress the response, and the discovered Guzzle
client no longer decodes responses (decode_contentisfalse). A client you pass in yourself keeps
its own decoding, but gets the sameAccept-Encodingheader (#2115). PsrTransportlimits the OTLP/HTTP response body to 4 MiB, also after decompression, as the
specification requires. A larger response is discarded with a warning and the export fails without
a retry, whatever its status, even if the server accepted the data. Decompression is streamed and
checked in small steps. The PSR-18 client may buffer the whole response before the limit applies
(#2112).OTEL_ATTRIBUTE_COUNT_LIMITandOTEL_ATTRIBUTE_VALUE_LENGTH_LIMITwere ignored. They apply to
span, event, link and log record limits that aren't set more specifically (#2058).PsrTransportFactoryignored itscacert,certandkeyarguments. It passes them to the
HTTP client (#2060). A client that rejects them is created without them, with a warning, and
Symfony HttpClient no longer rejects them (#2095).- A zero HTTP client timeout was dropped, or applied literally by Symfony HttpClient. It means no
limit (#2095, #2105). - The wildcard matcher behind
OTEL_PHP_TRANSACTION_URL_GROUPSmatched texts it should not: a
pattern with several*accepted its parts in the wrong order (*health*probe*matched
client/probe/health) and the last part could overlap an earlier one (ab*bcmatchedabc)
(#2113).
Full Changelog: 1.15.0...1.16.0
Release 1.15.0
What's Changed:
- Avoid collecting unsanitized process arguments by @PuvaanRaaj in 1993
- fix(sdk): don't emit placeholder service.version in Composer detector by @PuvaanRaaj in 2004
- fix(ResourceInfoFactory): Align ResourceInfoFactory detectors to otel specification by @jerrytfleung in 2006
- fix(sdk): require sem-conv ^1.38 for VERSION_1_38_0 constant by @PuvaanRaaj in 2003
- fix(sdk): skip absent keys in FilteredAttributeProcessor by @jorgsowa in 2000
- fix(sdk): guard Span::setAttributes() against mutation after end() by @jorgsowa in 1999
- chore(deps): bump open-telemetry/sem-conv to ^1.36.0 by @intuibase in 1994
- fix(sdk): wire meterProvider for span self-observability metrics and add otel.sdk.span.ended by @intuibase in 1990
- feat(sdk): implement OTel SDK self-observability metrics by @intuibase in 1987
- Fix(SDK): Auto root span start timestamps precision by @zigzagdev in 1985
- Allow span suppression strategy configuration using file-based and env-based config by @Nevay in 1920
- Fix span suppression with non recording spans by @Nevay in 1921
Full Changelog: 1.14.0...1.15.0
Release 1.14.0
What's Changed:
- chore: Fixed phpstan errors by @jerrytfleung in 1911
- config: use OTEL_CONFIG_FILE instead of experimental variable by @codeboten in 1901
Full Changelog: 1.13.0...1.14.0
Release 1.13.0
What's Changed:
- Update open-telemetry/api version to ^1.8 by @nolanpro in 1882
- Delete Jaeger propagator by @Nevay in 1874
Full Changelog: 1.12.0...1.13.0
Release 1.12.0
What's Changed:
- generate semconv 1.38.0 by @brettmc in 1855
- Add
Logger::logRecordBuilder()by @Nevay in 1859 - Add
AlwaysRecordSamplerby @vitorvasc in 1836
Full Changelog: 1.11.0...1.12.0
Release 1.11.0
What's Changed:
- Disable SDK from autoloading during composer execution. by @ChrisLightfootWild in 1727
Full Changelog: 1.10.0...1.11.0
Release 1.10.0
What's Changed:
- feat: Implement onEnding interface of Span Processor in Trace SDK by @jerrytfleung in 1785
- chore: Added comments to the duplicate event.name code in EventLogger by @jerrytfleung in 1768
- fixing psalm and rector complaints by @brettmc in 1732
- Propagate Trace Context Level 2 random flag by @Nevay in 1731
- Chore: fix docs url by @pieterocp in 1730
Full Changelog: 1.9.0...1.10.0
Release 1.9.0
What's Changed:
- Implement span suppression strategies by @Nevay in 1599
- rework ServiceInfoFactory priorities by @brettmc in 1644
Full Changelog: 1.8.0...1.9.0
Release 1.8.0
What's Changed:
- feat: Add experimental response propagator interface by @jerrytfleung in 1712
Full Changelog: 1.7.1...1.8.0