Restore event logger to payload#1657
Merged
cleptric merged 3 commits intogetsentry:masterfrom Dec 13, 2023
Merged
Conversation
Merged
cleptric
reviewed
Dec 11, 2023
Member
cleptric
left a comment
There was a problem hiding this comment.
Should add the logger to the tests, https://github.com/getsentry/sentry-php/blob/master/tests/Serializer/PayloadSerializerTest.php#L73
Contributor
Author
|
It looks like there was a test for this, but it was removed in 6ba2a2c Feel free to work on this if anyone has time/interest, otherwise it's on my list.. :) |
Contributor
Author
|
@cleptric ok, I restored the test to PayloadSerializerTest |
Member
|
Shipped in 4.2.0 |
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Event::setLogger() and Event::getLogger() methods still exist, but it seems they no longer add the logger to the event payload. As a result, when an event is sent to Sentry, the JSON shows
"logger":""- empty string, rather than the value that was passed to Event::setLogger().As far as how Event::setLogger() is used, it's not just me. The Monolog handler has
$event->setLogger(sprintf('monolog.%s', $record['channel']));