-
Notifications
You must be signed in to change notification settings - Fork 404
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
PinoHttp automatic http logs with default successful log message not being forwarded to NewRelic #2718
Comments
Are you able to provide a minimal reproduction with plain JavaScript? |
Hi @jsumners-nr , |
I am getting a 404 when I visit that link. Can you make it public? |
My bad! it should be public now. |
@danimagb-moonfare I ran your repro and I see the |
Hey @bizob2828, Thanks for your response. |
@danimagb-moonfare I'm going to close this bug for now. If you can figure out a way to reproduce, please update your github repo and reopen this issue. |
Description
I'm using nestjs-pino which uses pino-http and allows me to log http requests automatically.
The pino-http package automatically logs http requests with a default message based on the result of the request (e.g: 'request completed', 'request errored', 'request aborted', etc...)
I noticed that when the log message is 'request completed', I see the log in my console locally but it seems that for some reason the log never reaches newrelic. If I customize the log message to something else like 'http request completed', then I'm able to see it in my console and it is automatically forward to newrelic by the agent.
I was able to find a similar bug related to pino-http here
I tried to update my newrelic node agent to the version where the bug was fixed but it didn't help, so I guess this may be something else.
https://github.com/newrelic/node-newrelic/releases/tag/v12.5.1
Expected Behavior
The log should reach newrelic regardless of the message being logged. The log should be forwarded to newrelic when the log message is 'request completed'.
Troubleshooting or NR Diag results
When configuring the module without customizing the default success message defined in pino-http for successful http requests I can see the logs in my console, but the automatic http log never reaches newrelic.
Console Logs
Default PinoHttp success log message
request completed
isn't forwarded to NewRelicNewRelic logs
When I change the log message to a custom one like
Http Request Completed
, it starts workingConsole Logs
NewRelic logs
Steps to Reproduce
Link to the repo here
Your Environment
Additional context
The text was updated successfully, but these errors were encountered: