# Unique query id for slow log

**URL:** <https://discuss.elastic.co/t/unique-query-id-for-slow-log/287883>\
**Category:** Elasticsearch\
**Created:** [October 28, 2021, 6:36am UTC](https://discuss.elastic.co/t/unique-query-id-for-slow-log/287883 "2021-10-28T06:36:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shawndu](https://avatars.discourse-cdn.com/v4/letter/s/3ec8ea/32.png) [@shawndu](https://discuss.elastic.co/u/shawndu)\
**Post date:** [October 28, 2021, 6:36am UTC](https://discuss.elastic.co/t/unique-query-id-for-slow-log/287883/1 "2021-10-28T06:36:01Z")

</div>

As I know, query log is per shard. If a index has 5 shards and slow query log is enabled. when issue a query, There will be 5 query logs. I am collecting these logs for analysis. I want to aggregate these 5 logs into a log, but I can't find a unique query id. any ideas? how do I know these 5 logs comes from the same client query? Thanks.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 25, 2021, 6:36am UTC](https://discuss.elastic.co/t/unique-query-id-for-slow-log/287883/2 "2021-11-25T06:36:04Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
