Skip to content

Commit 3f288da

Browse files
committed
fix: switch to scoped registration
1 parent 09a87bb commit 3f288da

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/MonitorServiceProvider.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ public function register(): void
1313
{
1414
$this->mergeConfigFrom(__DIR__.'/../config/monitor.php', 'monitor');
1515

16-
$this->app->singleton(Monitor::class, fn () => new Monitor);
17-
$this->app->singleton(Trace::class, fn () => new Trace);
18-
$this->app->singleton(LogTimer::class, fn () => new LogTimer);
19-
$this->app->singleton(CircuitBreaker::class, fn () => new CircuitBreaker);
20-
$this->app->singleton(ControlledContext::class, fn () => new ControlledContext);
16+
$this->app->scoped(Monitor::class, fn () => new Monitor);
17+
$this->app->scoped(Trace::class, fn () => new Trace);
18+
$this->app->scoped(LogTimer::class, fn () => new LogTimer);
19+
$this->app->scoped(CircuitBreaker::class, fn () => new CircuitBreaker);
20+
$this->app->scoped(ControlledContext::class, fn () => new ControlledContext);
2121

2222
// Remove automatic logging channel merging - users should configure their own channels
2323
}

0 commit comments

Comments
 (0)