-
Notifications
You must be signed in to change notification settings - Fork 46
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: Add auto-logging feature #1274
base: main
Are you sure you want to change the base?
Conversation
Removing existing wrapLogger calls in preamble to tell them apart.
Asset Size Report
Merging this pull request will result in the following asset size changes:
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1274 +/- ##
==========================================
+ Coverage 88.75% 88.80% +0.04%
==========================================
Files 170 170
Lines 7348 7412 +64
Branches 1489 1503 +14
==========================================
+ Hits 6522 6582 +60
- Misses 716 722 +6
+ Partials 110 108 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
This is my approval, but this needs to wait until tentative GA date as discussed internally. Adjacent teams doing final checks. Blocking until that is reached
The auto-logging feature builds on top of the current API calls
log
andwrapLogger
. The api calls continue to provide a way to add custom attributes as needed. Otherwise, customers may simply configure browser logs (on/off, logging level, and sampling rates), which will capture logging statements from the browserconsole
across a given session automatically.Overview
This PR includes work that:
log
flag received from rum call to BCSRelated Issue(s)
https://new-relic.atlassian.net/browse/NR-323591
https://new-relic.atlassian.net/browse/NR-323597
https://new-relic.atlassian.net/browse/NR-341932
Testing
Extended the existing e2e tests for logging harvests:
Extended existing logging aggregate unit and e2e tests around handling the flag. Includes tests for each logging mode to ensure log messages of equal or higher levels are collected. For example, if the log flag = 3 (INFO), then collect console.error, console.warn, console.info, and console.log events.
Extended existing tests to ensure no harvests when rum flag = 0 and events are drained.