-
Notifications
You must be signed in to change notification settings - Fork 525
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
[7.x] Add logging.ecs and update beats framework to 553c92eeff2d #3749
Conversation
Set logging.ecs=true to add minimal fieldset for ECS conformant logging messages.
EXPOSE 88 | ||
EXPOSE 749 | ||
|
||
CMD sleep infinity |
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.
oh come on ;)
💚 Build SucceededExpand to view the summary
Build stats
Test stats 🧪
Steps errorsExpand to view the steps failures
|
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.
some suggestions on wording
Co-authored-by: Gil Raphaelli <g@raphaelli.com> Co-authored-by: Brandon Morelli <bmorelli25@gmail.com>
Co-authored-by: Brandon Morelli <bmorelli25@gmail.com>
With {"level":"info","timestamp":"2020-05-14T06:01:03.400Z","logger":"request","caller":"middleware/log_middleware.go:97","message":"not modified","request_id":"99b0ca4b-bcb7-4de5-a897-57d6e5949e90","method":"GET","URL":"/config/v1/agents?service.name=apm-server","content_length":0,"remote_address":"pipe","user-agent":"elasticapm-go/1.7.2 go/go1.13.9","response_code":304} With {"log.level":"info","@timestamp":"2020-05-14T06:02:25.710Z","log.logger":"request","log.origin":{"file.name":"middleware/log_middleware.go","file.line":97},"message":"request ok","request_id":"bba74925-9625-4205-95bd-434cdcc16ea1","method":"GET","URL":"/","content_length":0,"remote_address":"127.0.0.1","user-agent":"curl/7.29.0","response_code":200,"ecs.version":"1.5.0"} The ECS fields look good to me. We might want to update the field names we add in apm-server to be ECS-compliant, but that's out of scope here. I've opened an enhancement for that: #3796 |
Add `logging.ecs` option to config files Forwardport of #3749
Motivation/summary
Updates to latest beats changes in
7.x
branch, major changes that are pulled in:apm-server.yml
file is builtThis PR only adds minimal required changes to be compatible with newly introduced way of building
yml
configuration files. Since libbeat now has a dedicated template file per section, we could change our process and start pulling in templates from libbeat again instead of manually syncing them, but this is out of scope for this update.logging.ecs
option to enable logging with minimal fieldset for ECSChecklist
- [ ] I have signed the Contributor License Agreement.make check-full
for static code checks and linting)- [ ] I have added tests that prove my fix is effective or that my feature works(tested in libbeat)- [ ] I have updated CHANGELOG.asciidoc(part of beats changelog)How to test these changes
Start APM Server with
logging.json=true
andlogging.ecs=true
and see@timestamp
,log.level
,message
andecs.version
added to every log line.log.origin.file
andlog.origin.line
are added.error.message
is logged when error is giventhis can be tested for
Related issues
#3155