# Logging request headers for queries taking time above a threshold

**URL:** https://discuss.elastic.co/t/logging-request-headers-for-queries-taking-time-above-a-threshold/38778
**Category:** Elasticsearch
**Created:** [January 9, 2016, 7:44am UTC](https://discuss.elastic.co/t/logging-request-headers-for-queries-taking-time-above-a-threshold/38778 "2016-01-09T07:44:22Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Ashish\_Goel](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@Ashish\_Goel](https://discuss.elastic.co/u/Ashish_Goel)
#### Post date: [January 9, 2016, 7:44am UTC](https://discuss.elastic.co/t/logging-request-headers-for-queries-taking-time-above-a-threshold/38778/1 "2016-01-09T07:44:22Z")

</div>

Hi there,

In my ElasticSearch setup, I have placed logging configuration such that any query on a particular index taking more than 300ms is to be logged. The logging is working fine, it is just that I wanted to get one more piece of information to be logged and that is the details of the source of query, where it originated from. Is there any way I can log the request headers for these slow queries or any other method I can get the details I need?  
Also, I have Marvel installed on all my nodes in the cluster. Can Marvel provide me the needed details?

Thanks.

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [January 10, 2016, 9:07am UTC](https://discuss.elastic.co/t/logging-request-headers-for-queries-taking-time-above-a-threshold/38778/2 "2016-01-10T09:07:28Z")

</div>

There's currently no way to get this information logged without something like Shield.

---

<div class="post-metadata">

### Author: ![Ashish\_Goel](https://avatars.discourse-cdn.com/v4/letter/a/c2a13f/32.png) [@Ashish\_Goel](https://discuss.elastic.co/u/Ashish_Goel)
#### Post date: [January 14, 2016, 1:30pm UTC](https://discuss.elastic.co/t/logging-request-headers-for-queries-taking-time-above-a-threshold/38778/3 "2016-01-14T13:30:07Z")

</div>

Thanks for the confirmation Mark.

---

<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: [July 5, 2017, 11:24pm UTC](https://discuss.elastic.co/t/logging-request-headers-for-queries-taking-time-above-a-threshold/38778/4 "2017-07-05T23:24:29Z")

</div>


