Skip to content

Lumen Context fix #922

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

Merged
merged 1 commit into from
Jul 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Sentry/Laravel/Integration/LaravelContextIntegration.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Sentry\Laravel\Integration;

use Illuminate\Support\Facades\Context;
use Illuminate\Log\Context\Repository as ContextRepository;
use Sentry\Event;
use Sentry\EventHint;
use Sentry\EventType;
Expand All @@ -15,7 +15,7 @@ class LaravelContextIntegration implements IntegrationInterface
public function setupOnce(): void
{
// Context was introduced in Laravel 11 so we need to check if we can use it otherwise we skip the event processor
if (!class_exists(Context::class)) {
if (!class_exists(ContextRepository::class)) {
return;
}

Expand All @@ -30,7 +30,7 @@ public function setupOnce(): void
return $event;
}

$event->setContext('laravel', Context::all());
$event->setContext('laravel', app(ContextRepository::class)->all());

return $event;
});
Expand Down
Loading