Hi,
We are getting a lot of "hapi server emitted a log event tagged error" with a hapi server.
Any clue? Thanks very much, best regards
Javier
Hi,
We are getting a lot of "hapi server emitted a log event tagged error" with a hapi server.
Any clue? Thanks very much, best regards
Javier
Hi Javier,
The Node.js APM agent will capture an error for any hapi server.log(tags, data)
call where "error" is one of the tags. If the logged data
field is neither an Error instance nor a string, the captured error will be given a fallback message "hapi server emitted a log event tagged error".
If it helps, the data
passed to server.log(['error'], data)
is included in the capture error in custom context, which should be visible in the "Metadata" tab:
At least for me (relatively new to hapi), I don't think that is very obvious, so I've opened hapi instrumentation capturing of `server.log(['error'], ...)` is obscure · Issue #2071 · elastic/apm-agent-nodejs · GitHub to look into improving the experience here.
Thanks for bringing this up.
This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.