Requested by: @stayallive
Merge target: master
Quick links:
Assign the accepted label to this issue to approve the release.
Targets
Checked targets will be skipped (either already published or user-requested skip). Uncheck to retry a target.
📋 Changelog
The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v4.21.0.
Features
- Add
RuntimeContext and 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.
Requested by: @stayallive
Merge target: master
Quick links:
Assign the accepted label to this issue to approve the release.
Targets
Checked targets will be skipped (either already published or user-requested skip). Uncheck to retry a target.
📋 Changelog
The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v4.21.0.
Features
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.
RuntimeContextisolates 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:
When using a runtime context, manual
\Sentry\flush()calls are not needed for request teardown.It is still necessary to finish transactions explicitly.