-
Notifications
You must be signed in to change notification settings - Fork 56
feat: Control log API through separate RUM flag #1467
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
base: main
Are you sure you want to change the base?
Conversation
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 #1467 +/- ##
==========================================
- Coverage 87.92% 87.86% -0.06%
==========================================
Files 196 196
Lines 7744 7739 -5
Branches 1548 1549 +1
==========================================
- Hits 6809 6800 -9
- Misses 804 806 +2
- Partials 131 133 +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:
|
@@ -166,13 +168,18 @@ export class Aggregate extends AggregateBase { | |||
this.events.clear() | |||
this.events.clearSave() | |||
} | |||
this.updateLoggingMode(LOGGING_MODE.OFF) | |||
this.loggingMode = { |
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.
Should this just call this.updateLocalLoggingMode
to reduce the places that this.loggingMode
is set?
@@ -14,5 +14,5 @@ export function setupLogAPI (agent) { | |||
} | |||
|
|||
export function log (message, { customAttributes = {}, level = LOG_LEVELS.INFO } = {}, agentRef, targetEntityGuid, timestamp = now()) { | |||
bufferLog(agentRef.ee, message, customAttributes, level, targetEntityGuid, timestamp) | |||
bufferLog(agentRef.ee, message, customAttributes, level, false, targetEntityGuid, timestamp) |
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.
what is <api>.wrapLogger
setting for this? Shouldnt that honor the API settings as well?
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.
I wasn't sure. It wasn't clear if the goal was to configure just .log separate or .wrapLogger as well--or whether those two themselves should also be separate.
At the moment, only individual .log are controlled by the new flag, while wrapLogger is lumped with console
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.
I believe the original "auto logging" documentation has solely described auto-implementation of the console APIs. I think it would make more sense to include wrapLogger
in with the API sampling but I will defer to @ptang-nr who is leading the feature.
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.
Talked with PM, wrapLogger
should also follow API sampling 👍
Hi! I would love to get my hands on this feature! Is there an approximate release timeline? Currently, I find myself stuck having to allow my browser apps to ingest millions of unused logs monthly, just to get a few hundred relevant logs that I need to know about. |
Logs captured by the
newrelic.log
method will now be configurable through settings and controlled separately from wrapped logs. This allows one to be disabled without affecting the other, as in the case that onlynewrelic.log
is desired and not auto instrumentedconsole
.Overview
Related Issue(s)
https://new-relic.atlassian.net/browse/NR-399179
Testing
Added