Skip to content

Commit 41b15c9

Browse files
authored
fix(logs): sentry.origin value (#1938)
1 parent 7ed64c1 commit 41b15c9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Monolog/LogsHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function handle($record): bool
6666
self::getSentryLogLevelFromMonologLevel($record['level']),
6767
$record['message'],
6868
[],
69-
array_merge($record['context'], $record['extra'], ['sentry.origin' => 'auto.logger.monolog'])
69+
array_merge($record['context'], $record['extra'], ['sentry.origin' => 'auto.log.monolog'])
7070
);
7171

7272
return $this->bubble === false;

tests/Monolog/LogsHandlerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public function testOriginTagAppliedWithHandler(): void
129129
$this->assertCount(1, $logs);
130130
$log = $logs[0];
131131
$this->assertArrayHasKey('sentry.origin', $log->attributes()->toSimpleArray());
132-
$this->assertSame('auto.logger.monolog', $log->attributes()->toSimpleArray()['sentry.origin']);
132+
$this->assertSame('auto.log.monolog', $log->attributes()->toSimpleArray()['sentry.origin']);
133133
}
134134

135135
public function testOriginTagNotAppliedWhenUsingDirectly()

0 commit comments

Comments
 (0)