The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v4.4.0.
Features
-
Add
metrics()->timing()
(#1670)This allows you to emit a distribution metric based on the duration of the provided callback.
use function Sentry\metrics; metrics()->timing( key: 'my-metric', callback: fn() => doSomething(), );
-
Add
withMonitor()
(#1679)This wraps a callback into monitor check-ins.
use function Sentry\withMonitor; withMonitor( slug: 'my-monitor', callback: fn () => doSomething(), monitorConfig: new MonitorConfig(...), );
-
Add new
failure_issue_threshold
andrecovery_threshold
configuration toMonitorConfig
(#1685) -
Add
TransactionContext::make()
andSpanContext::make()
(#1684)use Sentry\Tracing\SpanContext; $spanCpntext = SpanContext::make() ->setOp('http.client') ->setDescription('GET https://example.com')
-
Add support for fluent use of
Transaction::setName()
(#1687) -
Add support for the W3C
traceparent
header (#1680)
Bug Fixes
-
Do not send an empty event if no metrics are in the bucket (#1676)
-
Fix the
http_ssl_verify_peer
option to set the correct value toCURLOPT_SSL_VERIFYPEER
(#1686)
Misc
- Depreacted
UserDataBag::getSegment()
andUserDataBag::setSegment()
. You may use a custom tag or context instead (#1681)