Releases: getsentry/sentry-php
Release list
4.29.0
The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v4.29.0.
Features
- Scrub
Proxy-Authorizationrequest headers by default. (#2126) - Send
gen_aispans using the span v2 protocol. (#2141)
Bug Fixes
- Reset fatal error handler state when starting a new runtime context. (#2128)
4.28.0
The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v4.28.0.
Features
- Add
SentryPropagatorto inject and extractsentry-traceheaders in OpenTelemetry contexts. (#2105)
Bug Fixes
- Keep feature flag values serialized as a JSON list when a flag is updated multiple times. (#2104)
4.27.0
The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v4.27.0.
Features
- Add
profiles_sampleroption. (#2082)
Bug Fixes
- Preserve manually configured user attributes on logs and metrics when
send_default_piiis disabled. (#2083)
Misc
- Add Mago static analysis to CI. (#2020)
4.26.0
The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v4.26.0.
Features
- Add
AgentClientandAgentClientBuilderto hand off envelopes to a local Sentry agent. (#2062) - Add fallback HTTP delivery for
AgentClientwhen the local Sentry agent is unavailable. (#2072) - Add
LogToSentryIssueHandlerMonolog handler to capture log messages as Sentry issues. (#2075)
Bug Fixes
4.25.0
The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v4.25.0.
Features
- Add
ExceptionToSentryIssueHandlerMonolog handler that only captures exceptions as Sentry issues without converting log messages to errors. (#2061) - Add
metric_flush_thresholdoption to automatically flush buffered metrics after a configured number of metric records. (#2059)
\Sentry\init([
'dsn' => '__YOUR_DSN__',
'metric_flush_threshold' => 50,
]);Bug Fixes
- Prevent PHP warnings when trying to increase the memory limit for out-of-memory error handling. (#2063)
Misc
4.24.0
The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v4.24.0.
Bug Fixes
- Serialize native PHP enums as readable enum strings, including backed enum values, instead of opaque
Objectstrings. (#2038) - Exclude
AGENTS.mdandCLAUDE.mdfrom distribution archives. (#2046)
Misc
- Deprecate
Sentry\Monolog\Handlerin favor ofSentry\Monolog\LogsHandlerwith theenable_logsSDK option. (#2051)
4.23.1
The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v4.23.1.
Bug Fixes
- Use
server.addresslog attribute instead ofsentry.server.address. (#2040)
4.23.0
The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v4.23.0.
Features
- Add
OTLPIntegrationsupport to interoperate with OpenTelemetry traces. (#2030)
\Sentry\init([
'dsn' => '__YOUR_DSN__',
'integrations' => [
new \Sentry\Integration\OTLPIntegration(),
],
]);- Add
log_flush_thresholdto automatically flush buffered logs after a configured number of log records. (#2032)
\Sentry\init([
'dsn' => '__YOUR_DSN__',
'enable_logs' => true,
'log_flush_threshold' => 20,
]);4.22.0
The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v4.22.0.
Features
- Add support for the client report protocol without collecting client reports yet. (#1978)
- Add
strict_trace_continuationsupport to only continue incoming traces when the upstream baggageorg_idmatches the SDK org ID. (#2016)
Example:
\Sentry\init([
'dsn' => '__YOUR_DSN__',
'strict_trace_continuation' => true,
]);Bug Fixes
- Preserve sub-second timestamps for Monolog breadcrumbs. (#2018)
4.21.0
The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v4.21.0.
Features
- Add
RuntimeContextand context lifecycle helpers for long-lived runtimes such as FrankenPHP and RoadRunner. (#2011)
Long-lived worker runtimes keep process memory between requests, which can cause scope data to leak from one request to the next.
RuntimeContext isolates SDK state per request and flushes buffered telemetry when the request context ends.
Data configured before a runtime context is started is copied into each new context as baseline scope data.
Example:
\Sentry\init([
'dsn' => '__YOUR_DSN__',
]);
$handler = static function (): void {
\Sentry\withContext(static function (): void {
// Handle one request.
});
};
while (frankenphp_handle_request($handler)) {}When using a runtime context, manual \Sentry\flush() calls are not needed for request teardown.
It is still necessary to finish transactions explicitly.