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
Route console log to new relic logs #761
Comments
Hi @murphpdx and thanks for the feature request. This is actually on our roadmap for the quarter starting in January. We did do some work in a past version of the agent to gauge the data that would be sent if we automatically instrumented the If you, or any community member or customer, has any suggestions around what you would like to see with this feature, please let us know either here, in our forums, or by reaching out to customer engagement or support. Some things that we are trying to consider:
|
Hi! Piggy-backing on the request from @murphpdx |
any news about this? |
@CavalcanteLeo this work is on our roadmap to start this quarter. |
Just shimming in, this feature might be nice as an opt-in. Some projects allow the use of |
For me, instead of sending the console.log automatically, I would prefer something to manually send it to new relic, something like const useLog = (text: string): void => {
newrelic.log(text) // here sends the log to new relic [newrelic.info(), newrelic.error()]
console.log(text) // Here I could use some other log, like Pino or Winston. And It will get rid in production as well
} in this case, we don't rely on the console.logs only. Most of the frameworks get rid of the console logs when building the prod (which is correct) |
Optionally allowing each method in a config would be preferred. Our main focus is to get console.error captured as it would help track down a ton of problems. The console.log could become a ton of noise and high data ingest, but toggling it on and off at will would be super beneficial. |
Thank you for good work on logs |
I'd like a setting in the new relic brower agent that will automatically hook into the console.log/console.error functions and send the logs to new relic logging. I would also like it to not log in the browser. Alternatively, an api call that will send logs to new relic. It does not have to hook into console but it would be nice if it did.
Summary
Forward logs to new relic via the browser agent.
Desired Behavior
Conditionally override the console.log, console.error, console.debug, console.info etc functions so that they send logs to new relic and do not log in the console.
Possible Solution
Additional context
The text was updated successfully, but these errors were encountered: