-
Notifications
You must be signed in to change notification settings - Fork 169
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
docs: Finish Application logging docs #2542
Conversation
A documentation preview will be available soon: |
keys_under_root: true | ||
overwrite_keys: true | ||
add_error_key: true | ||
expand_keys: true | ||
overwrite_keys: true <2> | ||
add_error_key: true <3> | ||
expand_keys: true <4> |
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.
Removed keys_under_root
as new keys go under root by default. This can be changed with target
(source), but I didn't think it was necessary to list it here as we're not suggesting changing the default.
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.
@bmorelli25 do you know which version introduced this change and does it applies to other keys that are injected into the document ?
In the ready-to-use examples that I currently have (initially built for 8.5.3, but now upgraded to 8.6.0):
fields_under_root
: https://github.com/elastic/apm-contrib/blob/b99ee6225f01bad97901396d63a2f29d31a57f2a/apm-agent-java/log-ingest/01-filebeat.yml#L20 (for plain-text logs)keys_under_root
https://github.com/elastic/apm-contrib/blob/b99ee6225f01bad97901396d63a2f29d31a57f2a/apm-agent-java/log-ingest/02-filebeat.yml#L13 (for nd-json logs)
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.
For nd_json logs, keys_under_root
doesn't do anything and never has; a documentation error in the Filebeat docs made it appear necessary. In 8.2, the documentation was updated to show target
instead of keys_under_root
. If target
is not set, fields go to the root of the event by default (source).
For plain text logs, you are correct. fields_under_root
is needed to store custom fields as top-level fields in the output document instead of being grouped under a fields
sub-dictionary (source).
In order to have correlation between log documents and APM services, we need to (at least) set the value of
When using the other strategies (ECS reformatting and Log sending), then the ECS logging library in the agent is configured with the Without this, the end-user will only be able to see logs documents in the Logs Stream UI, not in APM. |
The
I don't think that we need to document the |
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.
Changes LGTM from an editorial perspective.
Thanks! For |
For the plain-text logs, I think that adding the observability-docs/docs/en/observability/tab-widgets/filebeat-logs/content.asciidoc Line 43 in ce3ebd1
While there is a mention of |
…into finish-logging-docs
* docs: follow-ups to app logs * docs: add log correlation info to plaintext * docs: add service.name to tabbed widget (cherry picked from commit 47e0adf)
* docs: follow-ups to app logs * docs: add log correlation info to plaintext * docs: add service.name to tabbed widget (cherry picked from commit 47e0adf) Co-authored-by: Brandon Morelli <[email protected]>
Summary
This PR is a follow-up to #2452. Its main purpose is to update the Filebeat configuration with additional details and updated configuration options.