# Is it possible to set task\_id?

**URL:** <https://discuss.elastic.co/t/is-it-possible-to-set-task-id/372919>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-monitoring\
**Created:** [January 8, 2025, 7:06am UTC](https://discuss.elastic.co/t/is-it-possible-to-set-task-id/372919 "2025-01-08T07:06:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![asafalroy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/asafalroy/32/139985_2.png) [@asafalroy](https://discuss.elastic.co/u/asafalroy)\
**Post date:** [January 8, 2025, 7:06am UTC](https://discuss.elastic.co/t/is-it-possible-to-set-task-id/372919/1 "2025-01-08T07:06:20Z")

</div>

Hey!

Our team heavily relies on traces and I wondered if there was a way to set the task\_id of the elastic query to be the traceId from the services that made the request for troubleshooting purposes (long running tasks specifically).  
This would help us figure out what user made the request, in what application (as many applications use our API), etc.

I didn't find a way to achieve this, but maybe there's a workaround?  
We figured we can put the traceId in the query under "excludeFields", but that's a little awkward.
