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
nrWriter: an io.Writer that implements logs in context #548
Conversation
Let's hold this until after recharge. I would like to think about how this could incorporate metrics and maybe auto ingestion too. |
This has been updated as a one stop shop solution. All you need is the zerologWriter package to capture log metrics, events, and to decorate local logs. |
b42543e
to
385e3f3
Compare
NrWriter is a generic library for gathering log data from frameworks that do not allow us to get their internal data. This release kicks off with support for zerolog.
53eef85
to
fb26941
Compare
"io" | ||
"strings" | ||
|
||
"github.com/newrelic/go-agent/v3/internal/logcontext/nrwriter" |
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.
the fact that logcontext-v2 was made it's own module means the internal from newrelic/v3 can't be imported ..
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.
Sorry, I had gone from the initial error I got from failing imports.
There is a missing import for "github.com/newrelic/go-agent/v3/internal"
, and the capitalization is mismatched for "github.com/newrelic/go-agent/v3/internal/logcontext/nrwriter"
which prevents it from being found.
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.
@Meroje the problem is actually that we created a submodule in internal :(. Looks like we will have to hotfix this.
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'm pretty sure that most of the stuff in internal is not package correctly to be protected from external imports haha. We will have a fix for this immediately :)
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.
Thanks for reporting! Please use the 3.19.1 hot fix release
Packaging for supporting capturing log data from any framework that writes using the io.Writer interface for: