Skip to content

Synchronizes slowlog json keys with beats#74211

Merged
pgomulka merged 4 commits intoelastic:masterfrom
Mpdreamz:feature/ecs-slowlog-keys
Jun 21, 2021
Merged

Synchronizes slowlog json keys with beats#74211
pgomulka merged 4 commits intoelastic:masterfrom
Mpdreamz:feature/ecs-slowlog-keys

Conversation

@Mpdreamz
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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