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

Synchronizes slowlog json keys with beats #74211

Merged
merged 4 commits into from
Jun 21, 2021

Conversation

Mpdreamz
Copy link
Member

Filebeat ships with dedicated fields for Elasticsearch slowlog

This updates our ECS logger to report the slowlog keys under
elasticsearch.slowlog

https://github.com/elastic/beats/blob/23e4403ae093fcc8f7905345cad2c7ad256976d8/filebeat/module/elasticsearch/slowlog/test/slowlogs-json.log-expected.json

This prevents clashes with ECS templates

Filebeat ships with dedicated fields for Elasticsearch slowlog

This updates our ECS logger to report the slowlog keys under
`elasticsearch.slowlog`

https://github.com/elastic/beats/blob/23e4403ae093fcc8f7905345cad2c7ad256976d8/filebeat/module/elasticsearch/slowlog/test/slowlogs-json.log-expected.json

This prevents clashes with ECS templates
Copy link
Contributor

@pgomulka pgomulka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's fix the tests and it looks good!
This might need a follow up in filebeat test repository https://github.com/elastic/beats/tree/master/filebeat/module/elasticsearch/slowlog/test

map.put("id", doc.id());
map.put("elasticsearch.slowlog.message", index);
map.put("elasticsearch.slowlog.took", TimeValue.timeValueNanos(tookInNanos).toString());
map.put("elasticsearch.slowlog.took_millis", ""+TimeUnit.NANOSECONDS.toMillis(tookInNanos));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we can use String.valueOf (I missed this bit when working on this last time..)

@matriv matriv added the :Core/Infra/Logging Log management and logging utilities label Jun 18, 2021
@elasticmachine elasticmachine added the Team:Core/Infra Meta label for core/infra team label Jun 18, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

@pgomulka pgomulka merged commit 40b1dc0 into elastic:master Jun 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/Logging Log management and logging utilities Team:Core/Infra Meta label for core/infra team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants