Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency sentry/sentry to v4 #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link

@renovate renovate bot commented Nov 6, 2023

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
sentry/sentry (source) ~1.6 -> ~4.0 age adoption passing confidence

Release Notes

getsentry/sentry-php (sentry/sentry)

v4.9.0

Compare Source

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

Features
  • Allow retrieving a single piece of data from the span by it’s key (#​1767)

    \Sentry\SentrySdk::getCurrentHub()->getSpan()?->setData([
        'failure' => $span->getData('failure', 0) + 1,
    ]);
  • Add span trace origin (#​1769)

v4.8.1

Compare Source

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

Bug Fixes

v4.8.0

Compare Source

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

Features
  • Add timing span when emiting a timing metric (#​1717)

    use function Sentry\metrics;
    
    // This will now both emit a distribution metric and a span with the "expensive-operation" key
    metrics()->timing(
        key: 'expensive-operation',
        callback: fn() => doExpensiveOperation(),
    );
Bug Fixes
  • Fix missing data on HTTP spans (#​1735)
  • Test span sampled status before creating child spans (#​1740)
Misc
  • Implement fast path for ignoring errors (#​1737)
  • Add array shape for better autocomplete of Sentry\init function (#​1738)
  • Represent callable strings as strings (#​1741)
  • Use AWS_LAMBDA_FUNCTION_VERSION environment variable for release if available (#​1742)

v4.7.0

Compare Source

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

Features
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)

v4.6.1

Compare Source

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)

v4.6.0

Compare Source

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)

v4.5.0

Compare Source

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)

v4.4.0

Compare Source

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)

v4.3.1

Compare Source

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)

v4.3.0

Compare Source

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()]);
    
    // Add 2 to gauge named `parallel_requests`, tagged with `type: "a"`
    Sentry.metrics.gauge('parallel_requests', 2, { tags: { type: 'a' } });
    
    // 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 https://github.com/getsentry/sentry-php/discussions/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)

v4.2.0

Compare Source

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)

v4.1.0

Compare Source

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

v4.0.1

Compare Source

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)

v4.0.0

Compare Source

The Sentry SDK team is thrilled to announce the immediate availability of Sentry PHP SDK v4.0.0.

Breaking Change

Please refer to the UPGRADE-4.0.md guide for a complete list of breaking changes.

  • This version exclusively uses the envelope endpoint to send event data to Sentry.

    If you are using sentry.io, no action is needed.
    If you are using an on-premise/self-hosted installation of Sentry, the minimum requirement is now version >= v20.6.0.

  • You need to have ext-curl installed to use the SDK.

  • The IgnoreErrorsIntegration integration was removed. Use the ignore_exceptions option instead.

    Sentry\init([
        'ignore_exceptions' => [BadThingsHappenedException::class],
    ]);

    This option performs an is_a check now, so you can also ignore more generic exceptions.

Features
  • Add new fluent APIs (#​1601)

    // Before
    $transactionContext = new TransactionContext();
    $transactionContext->setName('GET /example');
    $transactionContext->setOp('http.server');
    
    // After
    $transactionContext = (new TransactionContext())
        ->setName('GET /example');
        ->setOp('http.server');
  • Simplify the breadcrumb API (#​1603)

    // Before
    \Sentry\addBreadcrumb(
        new \Sentry\Breadcrumb(
            \Sentry\Breadcrumb::LEVEL_INFO,
            \Sentry\Breadcrumb::TYPE_DEFAULT,
            'auth',                // category
            'User authenticated',  // message (optional)
            ['user_id' => $userId] // data (optional)
        )
    );
    
    // After
    \Sentry\addBreadcrumb(
        category: 'auth',
        message: 'User authenticated', // optional
        metadata: ['user_id' => $userId], // optional
        level: Breadcrumb::LEVEL_INFO, // set by default
        type: Breadcrumb::TYPE_DEFAULT, // set by default
    );
  • New logger option (#​1625)

    To make it easier to debug the internals of the SDK, the logger option now accepts a Psr\Log\LoggerInterface instance.
    We do provide two implementations, Sentry\Logger\DebugFileLogger and Sentry\Logger\DebugStdOutLogger.

    // This logs messages to the provided file path
    Sentry\init([
        'logger' => new DebugFileLogger(filePath: ROOT . DS . 'sentry.log'),
    ]);
    
    // This logs messages to stdout
    Sentry\init([
        'logger' => new DebugStdOutLogger(),
    ]);
  • New default cURL HTTP client (#​1589)

    The SDK now ships with its own HTTP client based on cURL. A few new options were added.

    Sentry\init([
        'http_proxy_authentication' => 'username:password', // user name and password to use for proxy authentication
        'http_ssl_verify_peer' => false, // default true, verify the peer's SSL certificate
        'http_compression' => false, // default true, http request body compression
    ]);

    To use a different client, you may use the http_client option.

    use Sentry\Client;
    use Sentry\HttpClient\HttpClientInterface;
    use Sentry\HttpClient\Request;
    use Sentry\HttpClient\Response;
    use Sentry\Options;
    
    $httpClient = new class() implements HttpClientInterface {
        public function sendRequest(Request $request, Options $options): Response
        {
    
            // your custom implementation
    
            return new Response($response->getStatusCode(), $response->getHeaders(), '');
        }
    };
    
    Sentry\init([
        'http_client' => $httpClient,
    ]);

    To use a different transport, you may use the transport option. A custom transport must implement the TransportInterface.
    If you use the transport option, the http_client option has no effect.

Misc
  • The abandoned package php-http/message-factory was removed.

v3.22.1

Compare Source

The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v3.22.1.

Bug Fixes
  • Fix capturing out-of-memory errors when memory-constrained (#​1633)

v3.22.0

Compare Source

The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v3.22.0.

Features
  • Adopt Starfish HTTP attributes in spans and breadcrumbs (#​1581)
Bug Fixes
  • Don't add empty HTTP fragment or query strings to breadcrumb data (#​1588)
Misc
  • Remove obsolete tags option depreaction (#​1588)
  • Run CI on PHP 8.3 (1591)
  • Add support for symfony/options-resolver: ^7.0 (1597)

v3.21.0

Compare Source

The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v3.21.0.

Features
  • Add Sentry::captureCheckIn() (#​1573)

    Sending check-ins from the SDK is now simplified.

    $checkInId = Sentry\captureCheckIn(
        slug: 'monitor-slug',
        status: CheckInStatus::inProgress()
    );
    
    // do something
    
    Sentry\captureCheckIn(
        checkInId: $checkInId,
        slug: 'monitor-slug',
        status: CheckInStatus::ok()
    );

    You can also pass in a monitorConfig object as well as the duration.

  • Undeprecate the tags option (#​1561)

    You can now set tags that are applied to each event when calling Sentry::init().

    Sentry\init([
        'tags' => [
            'foo' => 'bar',
        ],
    ])
  • Apply the prefixesoption to profiling frames (#​1568)

    If you added the prefixes option when calling Sentry::init(), this option will now also apply to profile frames.

    Sentry\init([
        'prefixes' => ['/var/www/html'],
    ])
Misc
  • Deduplicate profile stacks and frames (#​1570)

    This will decrease the payload size of the profile event payload.

  • Add the transaction's sampling decision to the trace envelope header (#​1562)

v3.20.1

Compare Source

The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v3.20.1.

Bug Fixes
  • Use the result of isTracingEnabled() to determine the behaviour of getBaggage() and getTraceparent() (#​1555)
Misc
  • Always return a TransactionContext from continueTrace() (#​1556)

v3.20.0

Compare Source

The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v3.20.0.

Features
  • Tracing without Performance (#​1516)

    You can now set up distributed tracing without the need to use the performance APIs.
    This allows you to connect your errors that hail from other Sentry instrumented applications to errors in your PHP application.

    To continue a trace, fetch the incoming Sentry tracing headers and call \Sentry\continueTrace() as early as possible in the request cycle.

    $sentryTraceHeader = $request->getHeaderLine('sentry-trace');
    $baggageHeader = $request->getHeaderLine('baggage');
    
    continueTrace($sentryTraceHeader, $baggageHeader);

    To continue a trace outward, you may attach the Sentry tracing headers to any HTTP client request.
    You can fetch the required header values by calling \Sentry\getBaggage() and \Sentry\getTraceparent().

  • Upserting Cron Monitors (#​1511)

    You can now create and update your Cron Monitors programmatically with code.
    Read more about this in our docs.

v3.19.1

Compare Source

The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v3.19.1.

Bug Fixes
  • Use HTTP/1.1 when compression is enabled (#​1542)

v3.19.0

Compare Source

The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v3.19.0.

Misc
  • Add support for guzzlehttp/promises v2 (#​1536)

v3.18.2

Compare Source

The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v3.18.2.

Bug Fixes

v3.18.1

Compare Source

The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v3.18.1.

Bug Fixes

v3.18.0

Compare Source

The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v3.18.0.

Features
  • Add TransactionContext::fromEnvironment (#​1519)
Misc
  • Sent all events to the /envelope endpoint if tracing is enabled (#​1518)
  • Attach the Dynamic Sampling Context to error events (#​1522)

v3.17.0

Compare Source

The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v3.17.0.

Features
  • Add ignore_exceptions & ignore_transactions options (#​1503)

    We deprecated the IgnoreErrorsIntegration in favor of this new option.
    The option will also take previous exceptions into account.

    \Sentry\init([
      'ignore_exceptions' => [BadThingsHappenedException::class],
    ]);

    To ignore a transaction being sent to Sentry, add its name to the config option.
    You can find the transaction name on the Performance page.

    \Sentry\init([
        'ignore_transactions' => ['GET /health'],
    ]);
Misc
  • Bump php-http/discovery to ^1.15 (#​1504)

    You may need to allow the added composer plugin, introduced in php-http/discovery v1.15.0, to execute when running composer update.
    We previously pinned this package to version <1.15.
    Due to conflicts with other packages, we decided to lift this restriction.

v3.16.0

Compare Source

The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v3.16.0.
This release adds initial support for Cron Monitoring.

Warning
Cron Monitoring is currently in beta. Beta features are still in-progress and may have bugs. We recognize the irony.
If you have any questions or feedback, please email us at crons-feedback@sentry.io, reach out via Discord (#cronjobs), or open an issue.

Features
  • Add inital support for Cron Monitoring (#​1467)

    You can use Cron Monitoring to monitor your cron jobs. No pun intended.

    Add the code below to your application or script that is invoked by your cron job.
    The first Check-In will let Sentry know that your job started, with the second Check-In reporting the outcome.

    <?php
    
    $checkIn = new CheckIn(
        monitorSlug: '<your-monitor-slug>',
        status: CheckInStatus::inProgress(),
    );
    
    $event = Event::createCheckIn();
    $event->setCheckIn($checkIn);
    
    $this->hub->captureEvent($event);
    
    try {
    
        // do stuff
    
        $checkIn->setStatus(CheckInStatus::ok());
    } catch (Throwable $e) {
        $checkIn->setStatus(CheckInStatus::error());
    }
    
    $event = Event::createCheckIn();
    $event->setCheckIn($checkIn);
    
    $this->hub->captureEvent($event);

    If you only want to check if a cron did run, you may create a "Heartbeat" instead.
    Add the code below to your application or script that is invoked by your cron job.

    <?php
    
    // do stuff
    
    $checkIn = new CheckIn(
        monitorSlug: '<your-monitor-slug>',
        status: CheckInStatus::ok(), // or - CheckInStatus::error()
        duration: 10, // optional - duration in seconds
    );
    
    $event = Event::createCheckIn();
    $event->setCheckIn($checkIn);
    
    $this->hub->captureEvent($event);
  • Introduce a new trace helper function (#​1490)

    We made it a tad easier to add custom tracing spans to your application.

    $spanContext = new SpanContext();
    $spanContext->setOp('function');
    $spanContext->setDescription('Soemthing to be traced');
    
    trace(
        function (Scope $scope) {
            // something to be traced
        },
        $spanContext,
    );

v3.15.0

Compare Source

The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v3.15.0.
This release adds initial support for Profiling.

Warning
Profiling is currently in beta. Beta features are still in-progress and may have bugs. We recognize the irony.
If you have any questions or feedback, please email us at profiling@sentry.io, reach out via Discord (#profiling), or open an issue.

Profiling is only available on Sentry SaaS (sentry.io). Support for Sentry self-hosted is planned once Profiling is released into GA.

Features
  • Add initial support for profiling (#​1477)

    Under the hood, we're using Wikipedia's sampling profiler Excimer.
    We chose this profiler for its low overhead and for being used in production by one of the largest PHP-powered websites in the world.

    Excimer works with PHP 7.2 and up, for PHP 8.2 support, make sure to use Excimer version 1.1.0.

    There is currently no support for either Windows or macOS.

    You can install Excimer via your operating systems package manager.

    apt-get install php-excimer

    If no suitable version is available, you may build Excimer from source.

    git clone https://github.com/wikimedia/mediawiki-php-excimer.git
    
    cd excimer/
    phpize && ./configure && make && sudo make install

    Depending on your environment, you may need to enable the Excimer extension afterward.

    phpenmod -s fpm excimer

or

phpenmod -s apache2 excimer


Once the extension is installed, you may enable profiling by adding the new `profiles_sample_rate` config option to your `Sentry::init` method.

```php
\Sentry\init([
    'dsn' => '__DSN__',
    'traces_sample_rate' => 1.0,
    'profiles_sample_rate' => 1.0,
]);

Profiles are being sampled in relation to your traces_sample_rate.

Please note that the profiler is started inside transactions only. If you're not using our Laravel or Symfony SDKs, you may need to manually add transactions to your application as described here.

Other things you should consider:
  • The current sample rate of the profiler is set to 101Hz (every ~10ms). A minimum of two samples is required for a profile being sent, hence requests that finish in less than ~20ms won't hail any profiles.
  • The maximum duration of a profile is 30s, hence we do not recommend enabling the extension in an CLI environment.
  • By design, the profiler will take samples at the end of any userland functions. You may see long sample durations on tasks like HTTP client requests and DB queries.
    You can read more about Excimer's architecture here.

v3.14.0

Compare Source

The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v3.14.0.

Features
  • Add a new enable_tracing: true/false option, an alternative for traces_sample_rate: 1.0/null (#​1458)
Bug Fixes
  • Fix missing keys in the request body (#​1470)
  • Add support for partial JSON encoding (#​1481)
  • Prevent calling magic methods when retrieving the ID from an object (#​1483)
  • Only serialize scalar object IDs (#​1485)
Misc
  • The SDK is now licensed under MIT (#​1471)
    • Read more about Sentry's licensing here.
  • Deprecate Client::__construct $serializer argument. It is currently un-used (#​1482)

v3.13.1

Compare Source

The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v3.13.1.

Bug Fixes
  • Sanatize HTTP client spans & breadcrumbs (#​1453)
  • Pin php-http/discovery to < 1.15 to disable some unwanted side-effect introduced in this new minor version (#​1464)

v3.13.0

Compare Source

The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v3.13.0.

Features
  • Object IDs are now automatically serialized as part of a stack trace frame (#​1443)

  • Add more functionality to the ExceptionMechanism::class (#​1450)

    • Attach arbitrary data
      $hint = EventHint::fromArray([
          'exception' => $exception,
          'mechanism' => new ExceptionMechanism(
              ExceptionMechanism::TYPE_GENERIC,
              false,
              [
                  'key' => 'value',
                  //...
              ],
          ),
      ]);
      captureEvent(Event::createEvent(), $hint);
      Learn more about the interface of the ExceptionMechanism on https://develop.sentry.dev/sdk/event-payloads/exception/#exception-mechanism
    • Access or mutate ExceptionMechanism::data via ExceptionMechanism::getData() and ExceptionMechanism::setData()
    • If an exception contains a user-provided code, the value will be serialized into the event and displayed on the issues details page.
      throw new \Exception('Oh no!', 123);

v3.12.1

Compare Source

  • fix: Allow null on getTracesSampleRate and setTracesSampleRate in Options class (#​1441)

v3.12.0

Compare Source

  • feat: Add before_send_transaction option (#​1424)
  • fix: Set traces_sample_rate to null by default (#​1428)

v3.11.0

Compare Source

  • fix: Only include the transaction name to the DSC if it has good quality (#​1410)
  • ref: Enable the ModulesIntegration by default (#​1415)
  • ref: Expose the ExceptionMechanism through the event hint (#​1416)

v3.10.0

Compare Source

  • ref: Add correct never option for max_request_body_size (#​1397)
    • Deprecate max_request_body_size.none in favour of max_request_body_size.never
  • fix: Sampling now correctly takes in account the parent sampling decision if available instead of always being false when tracing is disabled (#​1407)

v3.9.1

Compare Source

  • fix: Suppress errors on is_callable (#​1401)

v3.9.0

Compare Source

  • feat: Add tracePropagationTargets option (#​1396)
  • feat: Expose a function to retrieve the URL of the CSP endpoint (#​1378)
  • feat: Add support for Dynamic Sampling (#​1360)
    • Add segment to UserDataBag
    • Add TransactionSource, to set information about the transaction name via TransactionContext::setSource() (#​1382)
    • Deprecate TransactionContext::fromSentryTrace() in favor of TransactionContext::fromHeaders()

v3.8.1

Compare Source

  • fix: Use constant for the SDK version (#​1374)
  • fix: Do not throw an TypeError on numeric HTTP headers (#​1370)

v3.8.0

Compare Source

  • Add Sentry\Monolog\BreadcrumbHandler, a Monolog handler to allow registration of logs as breadcrumbs (#​1199)
  • Do not setup any error handlers if the DSN is null (#​1349)
  • Add setter for type on the ExceptionDataBag (#​1347)
  • Drop symfony/polyfill-uuid in favour of a standalone implementation (#​1346)

v3.7.0

Compare Source

  • Fix Scope::getTransaction() so that it returns also unsampled transactions (#​1334)
  • Set the event extras by taking the data from the Monolog record's extra (#​1330)

v3.6.1

Compare Source

  • Set the sentry-trace header when using the tracing middleware (#​1331)

v3.6.0

Compare Source

  • Add support for monolog/monolog:^3.0 (#​1321)
  • Add setTag and removeTag public methods to Event for easier manipulation of tags (#​1324)

v3.5.0

Compare Source

  • Bump minimum version of guzzlehttp/psr7 package to avoid CVE-2022-24775 (#​1305)
  • Fix stripping of memory addresses from stacktrace frames of anonymous classes in PHP >=7.4.2 (#​1314)
  • Set the default send_attempts to 0 (this disables retries) and deprecate the option. If you require retries you can increase the send_attempts option to the desired value. (#​1312)
  • Add http_connect_timeout and http_timeout client options (#​1282)

v3.4.0

Compare Source

  • Update Guzzle tracing middleware to meet the expected standard (#​1234)
  • Add toArray public method in PayloadSerializer to be able to re-use Event serialization
  • The withScope methods now return the callback's return value (#​1263)
  • Set the event extras by taking the data from the Monolog record's context (#​1244)
  • Make the StacktraceBuilder class part of the public API and add the Client::getStacktraceBuilder() method to build custom stacktraces (#​1124)
  • Support handling the server rate-limits when sending events to Sentry (#​1291)
  • Treat the project ID component of the DSN as a string rather than an integer (#​1294)

v3.3.7

Compare Source

  • Fix the serialization of a callable when the autoloader throws exceptions (#​1280)

v3.3.6

Compare Source

  • Optimize Span constructor and add benchmarks (#​1274)
  • Handle autoloader that throws an exception while trying to serialize a possible callable (#​1276)

v3.3.5

Compare Source

  • Bump the minimum required version of the jean85/pretty-package-versions package (#​1267)

v3.3.4

Compare Source

  • Avoid overwriting the error level set by the user on the event when capturing an ErrorException exception (#​1251)
  • Allow installing the project alongside Symfony 6.x components (#​1257)
  • Run the test suite against PHP 8.1 (#​1245)

v3.3.3

Compare Source

  • Fix fatal error in the EnvironmentIntegration integration if the php_uname function is disabled (#​1243)

v3.3.2

Compare Source

  • Allow installation of guzzlehttp/psr7:^2.0 (#​1225)
  • Allow installation of psr/log:^1.0|^2.0|^3.0 (#​1229)

v3.3.1

Compare Source

  • Fix missing collecting of frames's arguments when using captureEvent() without expliciting a stacktrace or an exception (#​1223)

v3.3.0

Compare Source

  • Allow setting a custom timestamp on the breadcrumbs (#​1193)
  • Add option ignore_tags to IgnoreErrorsIntegration in order to ignore exceptions by tags values. (#​1201)

v3.2.2

Compare Source

  • Fix missing handling of EventHint in the HubAdapter::capture*() methods (#​1206)

v3.2.1

Compare Source

  • Changes behaviour of error_types option when not set: before it defaulted to error_reporting() statically at SDK initialization; now it will be evaluated each time during error handling to allow silencing errors temporarily (#​1196)

v3.2.0

Compare Source

  • Make the HTTP headers sanitizable in the RequestIntegration integration instead of removing them entirely (#​1161)
  • Deprecate the logger option (#​1167)
  • Pass the event hint from the capture*() methods down to the before_send callback (#​1138)
  • Deprecate the tags option, see the docs for other ways to set tags (#​1174)
  • Make sure the environment field is set to production if it has not been overridden explicitly (#​1116)

v3.1.5

Compare Source

  • Fix incorrect detection of silenced errors (by the @ operator) (#​1183)

v3.1.4

Compare Source

  • Allow jean85/pretty-package-versions 2.0 (#​1170)

v3.1.3

Compare Source

  • Fix the fetching of the version of the SDK (#​1169)
  • Add the $customSamplingContext argument to Hub::startTransaction() and HubAdapter::startTransaction() to fix deprecations thrown in Symfony (#​1176)

v3.1.2

Compare Source

  • Fix unwanted call to the before_send callback with transaction events, use traces_sampler instead to filter transactions (#​1158)
  • Fix the logger option not being applied to the event object (#​1165)
  • Fix a bug that made some event attributes being overwritten by option config values when calling captureEvent() (#​1148)

v3.1.1

Compare Source

  • Add support for PHP 8.0 (#​1087)
  • Change the error handling for silenced fatal errors using @ to use a mask check in order to be php 8 compatible (#​1141)
  • Update the guzzlehttp/promises package to the minimum required version compatible with PHP 8 (#​1144)
  • Update the symfony/options-resolver package to the minimum required version compatible with PHP 8 (#​1144)

v3.1.0

Compare Source

  • Fix capturing of the request body in the RequestIntegration integration (#​1139)
  • Deprecate SpanContext::fromTraceparent() in favor of TransactionContext::fromSentryTrace() (#​1134)
  • Allow setting custom data on the sampling context by passing it as 2nd argument of the startTransaction() function (#​1134)
  • Add setter for value on the ExceptionDataBag (#​1100)
  • Add Scope::removeTag method (#​1126)

v3.0.4

Compare Source

  • Fix stacktrace missing from payload for non-exception events (#​1123)
  • Fix capturing of the request body in the RequestIntegration integration when the stream is empty (#​1119)

v3.0.3

Compare Source

  • Fix missing source code excerpts for stacktrace frames whose absolute file path is equal to the file path (#​1104)
  • Fix requirements to construct a valid object instance of the UserDataBag class (#​1108)

v3.0.2

Compare Source

  • fix: Use the traces sample rate for traces instead of the event sample rate (#​1106)

v3.0.1

Compare Source

  • fix: Use Span on Scope instead of Transaction for GuzzleMiddleware (#​1099)

v3.0.0

Compare Source

Migration Guide:

https://github.com/getsentry/sentry-php/blob/master/UPGRADE-3.0.md

These breaking changes are mostly regarding the internal interfaces of the SDK.
If you were consuming the SDK from a pure usage perspective (how we describe it in our docs) there shouldn't be any code changes necessary.

Tracing API / Performance Monitoring

In this version, we released API for Tracing. \Sentry\startTransaction is your entry point for manual instrumentation.
More information can be found in our Performance docs.

Breaking Change: This version uses the envelope endpoint. If you are
using an on-premise installation it requires Sentry version >= v20.6.0 to work. If you are using
sentry.io nothing will change and no action is needed.

  • [BC BREAK] Remove the deprecated code that made the Hub class a singleton (#​1038)
  • [BC BREAK] Remove deprecated code that permitted to register the error, fatal error and exception handlers at once (#​1037)
  • [BC BREAK] Change the default value for the error_types option from E_ALL to the value get from error_reporting() (#​1037)
  • [BC BREAK] Remove deprecated code to return the event ID as a string rather than an object instance from the transport, the client and the hub (#​1036)
  • [BC BREAK] Remove some deprecated methods from the Options class. (#​1047)
  • [BC BREAK] Remove the deprecated code from the ModulesIntegration integration (#​1047)
  • [BC BREAK] Remove the deprecated code from the RequestIntegration integration (#​1047)
  • [BC BREAK] Remove the deprecated code from the Breadcrumb class (#​1047)
  • [BC BREAK] Remove the deprecated methods from the ClientBuilderInterface interface and its implementations (#​1047)
  • [BC BREAK] The Scope::setUser() method now always merges the given data with the existing one instead of replacing it as a whole (#​1047)
  • [BC BREAK] Remove the Context::CONTEXT_USER, Context::CONTEXT_RUNTIME, Context::CONTEXT_TAGS, Context::CONTEXT_EXTRA, Context::CONTEXT_SERVER_OS constants (#​1047)
  • [BC BREAK] Use PSR-17 factories in place of the Httplug's ones and return a promise from the transport (#​1066)
  • [BC BREAK] The Monolog handler does not set anymore tags and extras on the event object (#​1068)
  • [BC BREAK] Remove the UserContext, ExtraContext and Context classes and refactor the ServerOsContext and RuntimeContext classes (#​1071)
  • [BC BREAK] Remove the FlushableClientInterface and the ClosableTransportInterface interfaces (#​1079)
  • [BC BREAK] Remove the SpoolTransport transport and all its related classes ([

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Copy link
Author

renovate bot commented Nov 6, 2023

⚠ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: composer.lock
Command failed: docker run --rm --name=renovate_a_sidecar --label=renovate_a_child --memory=3584m -v "/tmp/worker/177089/f23f99/repos/github/mastacheata/fuelmonitor":"/tmp/worker/177089/f23f99/repos/github/mastacheata/fuelmonitor" -v "/tmp/worker/177089/f23f99/cache":"/tmp/worker/177089/f23f99/cache" -e COMPOSER_CACHE_DIR -e COMPOSER_AUTH -e CONTAINERBASE_CACHE_DIR -w "/tmp/worker/177089/f23f99/repos/github/mastacheata/fuelmonitor" ghcr.io/containerbase/sidecar:9.23.11 bash -l -c "install-tool php 8.2.12 && install-tool composer 1.10.27 && composer update sentry/sentry:4.0.0 --with-dependencies --ignore-platform-reqs --no-ansi --no-interaction --no-scripts --no-autoloader --no-plugins"
Package "sentry/sentry:4.0.0" listed for update is not installed. Ignoring.
Loading composer repositories with package information
Warning from https://repo.packagist.org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See https://blog.packagist.com/deprecating-composer-1-support/
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package sentry/sentry (locked at 1.7.0, required as ~4.0) is satisfiable by sentry/sentry[1.7.0] but these conflict with your requirements or minimum-stability.
  Problem 2
    - Installation request for sentry/sentry ~4.0 -> satisfiable by sentry/sentry[4.0.0].
    - Conclusion: don't install guzzlehttp/psr7 1.4.2
    - sentry/sentry 4.0.0 requires guzzlehttp/psr7 ^1.8.4|^2.1.1 -> satisfiable by guzzlehttp/psr7[1.8.4, 1.8.5, 1.9.0, 1.9.1, 2.1.1, 2.1.2, 2.2.0, 2.2.1, 2.2.2, 2.3.0, 2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.4.4, 2.4.5, 2.5.0, 2.5.1, 2.6.0, 2.6.1].
    - Can only install one of: guzzlehttp/psr7[1.8.4, 1.4.2].
    - Can only install one of: guzzlehttp/psr7[1.8.5, 1.4.2].
    - Can only install one of: guzzlehttp/psr7[1.9.0, 1.4.2].
    - Can only install one of: guzzlehttp/psr7[1.9.1, 1.4.2].
    - Can only install one of: guzzlehttp/psr7[2.1.1, 1.4.2].
    - Can only install one of: guzzlehttp/psr7[2.1.2, 1.4.2].
    - Can only install one of: guzzlehttp/psr7[2.2.0, 1.4.2].
    - Can only install one of: guzzlehttp/psr7[2.2.1, 1.4.2].
    - Can only install one of: guzzlehttp/psr7[2.2.2, 1.4.2].
    - Can only install one of: guzzlehttp/psr7[2.3.0, 1.4.2].
    - Can only install one of: guzzlehttp/psr7[2.4.0, 1.4.2].
    - Can only install one of: guzzlehttp/psr7[2.4.1, 1.4.2].
    - Can only install one of: guzzlehttp/psr7[2.4.2, 1.4.2].
    - Can only install one of: guzzlehttp/psr7[2.4.3, 1.4.2].
    - Can only install one of: guzzlehttp/psr7[2.4.4, 1.4.2].
    - Can only install one of: guzzlehttp/psr7[2.4.5, 1.4.2].
    - Can only install one of: guzzlehttp/psr7[2.5.0, 1.4.2].
    - Can only install one of: guzzlehttp/psr7[2.5.1, 1.4.2].
    - Can only install one of: guzzlehttp/psr7[2.6.0, 1.4.2].
    - Can only install one of: guzzlehttp/psr7[2.6.1, 1.4.2].
    - Installation request for guzzlehttp/psr7 (locked at 1.4.2) -> satisfiable by guzzlehttp/psr7[1.4.2].


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants