From ee8096485e51f85779928d73f8faf44c3db59d9f Mon Sep 17 00:00:00 2001 From: Alex Bouma Date: Thu, 16 Oct 2025 10:48:14 +0200 Subject: [PATCH] Fix `sentry.origin` value --- src/Monolog/LogsHandler.php | 2 +- tests/Monolog/LogsHandlerTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Monolog/LogsHandler.php b/src/Monolog/LogsHandler.php index 6d6842edd..f96a6a5e7 100644 --- a/src/Monolog/LogsHandler.php +++ b/src/Monolog/LogsHandler.php @@ -66,7 +66,7 @@ public function handle($record): bool self::getSentryLogLevelFromMonologLevel($record['level']), $record['message'], [], - array_merge($record['context'], $record['extra'], ['sentry.origin' => 'auto.logger.monolog']) + array_merge($record['context'], $record['extra'], ['sentry.origin' => 'auto.log.monolog']) ); return $this->bubble === false; diff --git a/tests/Monolog/LogsHandlerTest.php b/tests/Monolog/LogsHandlerTest.php index 20d69ec9a..2a6af3298 100644 --- a/tests/Monolog/LogsHandlerTest.php +++ b/tests/Monolog/LogsHandlerTest.php @@ -129,7 +129,7 @@ public function testOriginTagAppliedWithHandler(): void $this->assertCount(1, $logs); $log = $logs[0]; $this->assertArrayHasKey('sentry.origin', $log->attributes()->toSimpleArray()); - $this->assertSame('auto.logger.monolog', $log->attributes()->toSimpleArray()['sentry.origin']); + $this->assertSame('auto.log.monolog', $log->attributes()->toSimpleArray()['sentry.origin']); } public function testOriginTagNotAppliedWhenUsingDirectly()