Skip to content
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

Enhance ECS logging correlation fields #765

Closed
5 tasks done
SylvainJuge opened this issue Feb 10, 2023 · 3 comments
Closed
5 tasks done

Enhance ECS logging correlation fields #765

SylvainJuge opened this issue Feb 10, 2023 · 3 comments
Assignees

Comments

@SylvainJuge
Copy link
Member

SylvainJuge commented Feb 10, 2023

Out of scope for now

  • spec and document behavior of error.id when an error is reported in the logs (currently the Java agent creates an error, this feature is currently documented as Error capturing)
  • adding service.name, service.environment and service.version to the fields that are automatically injected in MDCs for log correlation: this would allow for example to use those in plain-text logs.
  • specify and document the span.id for log correlation.
@felixbarny
Copy link
Member

question: should we include the container.id in the agents specification too ?

I think it doesn't hurt mentioning it but there's nothing that agents need to do as they already send the container.id as part of the metadata. The container.id correlation is more relevant when shipping the logs with Filebeat and when there's no service.name within the logs.

documentation: document the log correlation fields (both service-level and trace-level) in the "log-correlation" section:

+1 on improving the docs to point out how service/log correlation works and how to configure Filebeat or Elastic Agent to add service.name/service.environment metadata. The guide also focusses mainly on the semi-deprecated Filebeat and misses to mention Elastic Agent.

@SylvainJuge
Copy link
Member Author

SylvainJuge commented Feb 10, 2023

I've added a mention of container.id in 6b9968f

+1 for the documentation part, I will add it to the shopping list in this issue description, same for providing the configuration options to set those fields in the filebeat configuration and maybe in ECS-logging. When the APM agent is combined with ECS-logging library I would recommend to let the agent provide its own values though to avoid inconsistencies.

For the fact that Elastic Agent isn't mentioned, I think it would be better handled as a follow-up once this part is done.
I haven't tried using "Custom logs" integration yet, but that should not be very different from the filebeat configuration that we currently offer.

@SylvainJuge
Copy link
Member Author

Closing as specs and documentation are complete, implementation in agents is not 100% complete for service environment correlation see #773 for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants