Skip to content

Releases: getsentry/sentry-php

4.7.0

10 Apr 13:38
Compare
Choose a tag to compare

The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v4.7.0.

Features

  • Improve debugging experience by emitting more logs from the SDK (#1705)
  • Handle metric_bucket rate limits (#1726) & (#1728)

Bug Fixes

  • Fix deprecation notice when trying to serialize a callable (#1732)

Misc

  • Deprecated SpanStatus::resourceExchausted(). Use SpanStatus::resourceExhausted() instead (#1725)
  • Update metric normalization (#1729)

4.6.1

08 Mar 09:14
Compare
Choose a tag to compare

The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v4.6.1.

Bug Fixes

  • Always add the sampled flag to the W3C traceparent header (#1713)
  • Add JSON_ERROR_NON_BACKED_ENUM to allowed JSON::encode() errors. (#1707)

4.6.0

13 Feb 11:43
Compare
Choose a tag to compare

The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v4.6.0.

Features

  • Add the PHP SAPI to the runtime context (#1700)

Bug Fixes

  • Correctly apply properties/options in ClientBuilder::class (#1699)
  • Attach _metrics_summary to transactions (#1702)

Misc

  • Remove final from Metrics::class (#1697)
  • Return early when using ignore_exceptions (#1701)
  • Attach exceptions to the log message from FrameContextifierIntegration::class (#1678)

4.5.0

29 Jan 16:21
a6e06f0
Compare
Choose a tag to compare

The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v4.5.0.

Features

  • Add before_send_check_in and before_send_metrics (#1690)

    \Sentry\init([
        'before_send_check_in' => function (\Sentry\Event $event) {
            $checkIn = $event->getCheckIn(),
            // modify the check-in or return null to not send it
        },
    ]);
    \Sentry\init([
        'before_send_metrics' => function (\Sentry\Event $event) {
            $metrics = $event->getMetrics(),
            // modify the metrics or return null to not send it
        },
    ]);

Bug Fixes

  • Fix _metrics_summary formatting (#1682)

  • Fix DebugFileLogger and DebugStdOutLogger to be usable with PHP 7.2 and up (#1691)

  • Allow whitespace in metric tag values (#1692)

4.4.0

23 Jan 09:56
Compare
Choose a tag to compare

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 and recovery_threshold configuration to MonitorConfig (#1685)

  • Add TransactionContext::make() and SpanContext::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 to CURLOPT_SSL_VERIFYPEER (#1686)

Misc

  • Depreacted UserDataBag::getSegment() and UserDataBag::setSegment(). You may use a custom tag or context instead (#1681)

4.3.1

22 Dec 18:52
Compare
Choose a tag to compare

The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v4.3.1.

Bug Fixes

  • Fix tags not being serialized correctly for metrics (#1672)

Misc

  • Remove @internal annotation from MetricsUnit class (#1671)

4.3.0

21 Dec 16:44
Compare
Choose a tag to compare

The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v4.3.0.

Features

  • Add support for Sentry Developer Metrics (#1619)

    use function Sentry\metrics;
    
    // Add 4 to a counter named hits
    metrics()->increment(key: 'hits', value: 4);
    
    // Add 25 to a distribution named response_time with unit milliseconds
    metrics()->distribution(key: 'response_time', value: 25, unit: MetricsUnit::millisecond());
    
    // Add 2 to gauge named parallel_requests, tagged with type: "a"
    metrics()->gauge(key: 'parallel_requests', value: 2, tags: ['type': 'a']);
    
    // Add a user's email to a set named users.sessions, tagged with role: "admin"
    metrics()->set('users.sessions, 'jane.doe@example.com', null, ['role' => User::admin()]);
    
    // Flush the metrics to Sentry
    metrics()->flush();
    
    // We recommend registering the flushing in a shutdown function
    register_shutdown_function(static fn () => metrics()->flush());

    To learn more about Sentry Developer Merics, join the discussion at #1666.

Bug Fixes

  • Disallow to seralize the HubAdapter::class (#1663)
  • Do not overwrite trace context on event (#1668)
  • Serialize breadcrumb data to display correct in the Sentry UI (#1669)

Misc

  • Remove the final keyword from Hub::class, Client::class and Scope::class (#1665)

4.2.0

19 Dec 16:45
Compare
Choose a tag to compare

The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v4.2.0.

Features

  • Add a config option to allow overriding the Spotlight url (#1659)

    Sentry\init([
        'spotlight_url' => 'http://localhost:8969',
    ]);

Bug Fixes

  • Restore setting the logger value on the event payload (#1657)

  • Only apply the sample_rate on error/message events (#1662)

    This fixes an issue where Cron Check-Ins were wrongly sampled out if a sample_rate lower than 1.0 is used.

Misc

  • Remove the @internal annotation from ClientBuilder::class (#1661)

4.1.0

04 Dec 12:46
Compare
Choose a tag to compare

The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v4.1.0.

Features

  • Add support for Spotlight (#1647)

    Spotlight is Sentry for Development. Inspired by an old project, Django Debug Toolbar. Spotlight brings a rich debug overlay into development environments, and it does it by leveraging the existing power of Sentry's SDKs.

    To learn more about Spotlight, go to https://spotlightjs.com/.

Misc

  • Normalize response status (#1644)

4.0.1

13 Nov 13:48
fa41522
Compare
Choose a tag to compare

The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v4.0.1.

Bug Fixes

  • Fix capturing out-of-memory errors when memory-constrained (#1636)
  • Check if the cURL extension is installed (#1632)