-
Notifications
You must be signed in to change notification settings - Fork 66
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
feat(agent): Implements log decorating #733
Conversation
Release 10.12
Adds linking metadata to the Monolog LogRecord by using the 'extra' array element to store a string containing the log decorating linking metadata.
Codecov Report
@@ Coverage Diff @@
## dev #733 +/- ##
=======================================
Coverage 78.21% 78.22%
=======================================
Files 188 188
Lines 25994 26030 +36
=======================================
+ Hits 20332 20362 +30
- Misses 5662 5668 +6
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
These tests are not actually for PHP 5 only but are simply run with CLM disabled so a #skipif is not required.
The decorating processor function was being created multiple times if more than one handler was pushed. This was due to the scoped name of the function (in lowercase) was not being used in the search to see if it had been previously created. A new integration test was added to check the use case where more than one handler is being used. The handler is now checked to see if it supported the pushProcessor() functionality and if it does not then a warning is generated to notify the user messages sent to that handler will not be decorated.
Hi, just a curious user here.. we've been eagerly awaiting PHP agent support for logging 'extra' (aka context) data along with each log entry (similar to how the java agent does it). Does this PR accomplish that? |
tests/integration/logging/monolog3/test_monolog_decoration_basic.php
Outdated
Show resolved
Hide resolved
tests/integration/logging/monolog3/test_monolog_decoration_basic.php
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 👍
P.S. I didn't review all integration test updates - just the monolog ones.
tests/integration/logging/monolog3/test_monolog_decoration_multiple_handlers.php
Show resolved
Hide resolved
tests/integration/logging/monolog2/test_monolog_decoration_multiple_handlers.php
Show resolved
Hide resolved
Are there any tests (unit or integration) to verify that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Adds linking metadata to the Monolog LogRecord by using the 'extra' array element to store a string containing the log decorating linking metadata.