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

Agents re-configure applications to replace plain-text formatters with ECS formatters #373

Open
8 of 15 tasks
felixbarny opened this issue Nov 25, 2020 · 2 comments
Open
8 of 15 tasks

Comments

@felixbarny
Copy link
Member

felixbarny commented Nov 25, 2020

Users can set a configuration option to make APM Agents automatically re-configure logging for them. After opting into it, agents instrument the construction of log appenders (such as file or stdout appenders) and replace the default plain-text formatter (such as PatternLayout) with the equivalent from the ECS logger that formats the logs to ECS-compliant JSON.

This is an interesting option when manually changing the logging setup of an application is not a trivial task such as when there are long dev release cycles, onboarding logs for legacy applications, or standard off-the-shelf applications.
Users still have to manually configure Fleet/Filebeat to ship the logs.

This is only feasible for agents that support some kind of instrumentation. This is the result of an early feasibility check per agent:

Agent Comment
.NET core 1-liner code change is needed. Potentially doable with no code changes via runtime IL manipulation with profiler
.NET Framework 1-liner code change needed, Possible for biggest frameworks Serilog and NLog
Go 3-liner code change needed
Java POC exists
Node.js seems feasible
PHP seems feasible
Python seems feasible
Ruby seems feasible

Spec issue

Agent issues

Extend ECS logging documentation

Support replacement of plain-text formatters with ECS formatters

@trentm
Copy link
Member

trentm commented Jan 7, 2021

Answering tentatively for Node.js, it seems feasible that we should be able to do this. Each of the logging frameworks that we might support (winston, pino, morgan, bunyan) have their own quirks that might make complexity an issue.

@AlexanderWert AlexanderWert modified the milestones: 7.12, 7.13 Mar 29, 2021
@eyalkoren
Copy link
Contributor

See related spec for more details.

@AlexanderWert AlexanderWert modified the milestones: 7.13, 7.15 Jun 22, 2021
@AlexanderWert AlexanderWert removed this from the 7.15 milestone Oct 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants