-
Notifications
You must be signed in to change notification settings - Fork 197
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
Introduce TraceFormatter, add log correlation docs #635
Conversation
Introduce TraceFormatter, a function taking a context and returning a fmt.Formatter that can format trace, transaction, and span IDs.
Codecov Report
@@ Coverage Diff @@
## master #635 +/- ##
==========================================
+ Coverage 84.55% 87.78% +3.22%
==========================================
Files 122 123 +1
Lines 7493 7522 +29
==========================================
+ Hits 6336 6603 +267
+ Misses 823 816 -7
+ Partials 334 103 -231
Continue to review full report at Codecov.
|
---- | ||
|
||
You can follow this article in order to ingest JSON-encoded logs with Filebeat: | ||
{blog-ref}how-to-instrument-your-go-app-with-the-elastic-apm-go-agent#logs[How to instrument your Go app with the Elastic APM Go agent]. |
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 agree that the content of this link is better suited for a blog post than documentation, but I'm wondering if you think it's possible/useful to include some of this information in the docs?
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 would love to see more guided walkthroughs in our docs in general. For the specific case of how to ingest JSON logs using Filebeat, to me it seems more appropriate to add it to FIlebeat docs than here. WDYT?
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.
Yeah, it's a tough line to toe. Our docs are so difficult to navigate cross-stack that I worry about users getting lost along the way. With this in mind, I've added a small amount of Filebeat information to the central documentation for this feature -- with the hopes that it will be helpful enough for users, and not be too difficult to maintain.
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.
Cool, I'll link to that instead then.
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.
... of course that's not actually merged yet, so I can't. I'll update the Go docs once that's merged and released.
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.
This LGTM. Once all Agents have their documentation created I may come back trough and open a PR with suggested changes to the format/layout to better align with others.
Introduce TraceFormatter, a function taking a context and returning a fmt.Formatter that can format trace, transaction, and span IDs.
Also, add documentation around log correlation.