Agents re-configure applications to replace plain-text formatters with ECS formatters
- Dominant language
- Gherkin
- Stars
- 427
- Forks
- 125
- PR merge metrics
- No merged PRs in 30d
Description
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
- [ ] https://github.com/elastic/apm/issues/403
## Agent issues
### Extend ECS logging documentation
- [x] https://github.com/elastic/apm-agent-java/issues/1617
- [x] https://github.com/elastic/apm-agent-dotnet/issues/1130
- [x] https://github.com/elastic/apm-agent-go/issues/869
- [ ] https://github.com/elastic/apm-agent-php/issues/321
- [x] https://github.com/elastic/apm-agent-ruby/issues/931
- [ ] https://github.com/elastic/apm-agent-nodejs/issues/1943
- [x] https://github.com/elastic/apm-agent-python/issues/1007
### Support replacement of plain-text formatters with ECS formatters
- [x] https://github.com/elastic/apm-agent-java/issues/1616
- [ ] https://github.com/elastic/apm-agent-dotnet/issues/1129
- [ ] https://github.com/elastic/apm-agent-go/issues/868
- [ ] https://github.com/elastic/apm-agent-php/issues/320
- [x] https://github.com/elastic/apm-agent-ruby/issues/930
- [ ] https://github.com/elastic/apm-agent-nodejs/issues/1942
- [x] https://github.com/elastic/apm-agent-python/issues/1006
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.