-
Notifications
You must be signed in to change notification settings - Fork 67
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): Adds label forwarding to log events #1027
Conversation
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #1027 +/- ##
==========================================
+ Coverage 77.82% 77.87% +0.05%
==========================================
Files 198 198
Lines 27827 27899 +72
==========================================
+ Hits 21657 21727 +70
- Misses 6170 6172 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
bc18e12
to
df096d7
Compare
"common": { | ||
"attributes": { } | ||
}, |
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.
For other reviewers - sending "common"
object with empty "attributes"
is an existing functionality.
Thanks for adding the new tests_monolog_label* tests.
|
The function nr_txn_begin() now accepts a nrobj_t *log_labels parameter which contains the logging labels to be associated with log events.
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.
Looks good considering all limitations of agent<->daemon/integration_runner design.
Takes advantage of return value from nrp_get_hash_boolean() being -1 if the key lookup did not suceed to simplify this section of code. Also is smarter about retrieving data until it is known it is needed.
Checks if log forwarding is disabled then log forwarding labels is also disabled, even if the log forwarding labels config is set to true.
I think commit 65f9ba2 will address your points 1 and 3 above. I did run the integration tests (no multiverse tests for log labels (yet)) with valgrind. A couple of CLM related tests passed valgrind but failed because an additional span ("name": "Custom/Monolog\Logger::pushHandler") was detected. I'm suspecting this is because it ran slower with valgrind than w/o so it was included whereas it is not when valgrind is not used? |
Awesome, thank you! |
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.
Thanks for the work on this!
Multiverse tests are failing because this PR adds a metric and any existing test with an |
This PR adds the ability for labels to be forwarded with any log messages forwarded by the PHP agent.