diff --git a/composer.json b/composer.json index 592bbd4c..d24769f4 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ "require": { "php": "^7.2 | ^8.0", "illuminate/support": "^6.0 | ^7.0 | ^8.0 | ^9.0 | ^10.0 | ^11.0 | ^12.0", - "sentry/sentry": "^4.18.0", + "sentry/sentry": "^4.19.0", "symfony/psr-http-message-bridge": "^1.0 | ^2.0 | ^6.0 | ^7.0", "nyholm/psr7": "^1.0" }, diff --git a/src/Sentry/Laravel/Integration.php b/src/Sentry/Laravel/Integration.php index cae1cc2d..d2e71e46 100644 --- a/src/Sentry/Laravel/Integration.php +++ b/src/Sentry/Laravel/Integration.php @@ -9,6 +9,7 @@ use Sentry\ExceptionMechanism; use Sentry\Laravel\Integration\ModelViolations as ModelViolationReports; use Sentry\Logs\Logs; +use Sentry\Metrics\TraceMetrics; use Sentry\SentrySdk; use Sentry\Tracing\TransactionSource; use Throwable; @@ -123,6 +124,7 @@ public static function flushEvents(): void $client->flush(); Logs::getInstance()->flush(); + TraceMetrics::getInstance()->flush(); } } @@ -197,8 +199,8 @@ public static function sentryTracingMeta(): string /** * Retrieve the `traceparent` meta tag with tracing information to link this request to front-end requests. * - * @deprecated since version 4.14. To be removed in version 5.0. * @return string + * @deprecated since version 4.14. To be removed in version 5.0. */ public static function sentryW3CTracingMeta(): string { @@ -242,9 +244,9 @@ public static function captureUnhandledException(Throwable $throwable): ?EventId /** * Returns a callback that can be passed to `Model::handleMissingAttributeViolationUsing` to report missing attribute violations to Sentry. * - * @param callable|null $callback Optional callback to be called after the violation is reported to Sentry. - * @param bool $suppressDuplicateReports Whether to suppress duplicate reports of the same violation. - * @param bool $reportAfterResponse Whether to delay sending the report to after the response has been sent. + * @param callable|null $callback Optional callback to be called after the violation is reported to Sentry. + * @param bool $suppressDuplicateReports Whether to suppress duplicate reports of the same violation. + * @param bool $reportAfterResponse Whether to delay sending the report to after the response has been sent. * * @return callable */ @@ -256,9 +258,9 @@ public static function missingAttributeViolationReporter(?callable $callback = n /** * Returns a callback that can be passed to `Model::handleLazyLoadingViolationUsing` to report lazy loading violations to Sentry. * - * @param callable|null $callback Optional callback to be called after the violation is reported to Sentry. - * @param bool $suppressDuplicateReports Whether to suppress duplicate reports of the same violation. - * @param bool $reportAfterResponse Whether to delay sending the report to after the response has been sent. + * @param callable|null $callback Optional callback to be called after the violation is reported to Sentry. + * @param bool $suppressDuplicateReports Whether to suppress duplicate reports of the same violation. + * @param bool $reportAfterResponse Whether to delay sending the report to after the response has been sent. * * @return callable */ @@ -270,9 +272,9 @@ public static function lazyLoadingViolationReporter(?callable $callback = null, /** * Returns a callback that can be passed to `Model::handleDiscardedAttributeViolationUsing` to report discarded attribute violations to Sentry. * - * @param callable|null $callback Optional callback to be called after the violation is reported to Sentry. - * @param bool $suppressDuplicateReports Whether to suppress duplicate reports of the same violation. - * @param bool $reportAfterResponse Whether to delay sending the report to after the response has been sent. + * @param callable|null $callback Optional callback to be called after the violation is reported to Sentry. + * @param bool $suppressDuplicateReports Whether to suppress duplicate reports of the same violation. + * @param bool $reportAfterResponse Whether to delay sending the report to after the response has been sent. * * @return callable */