# Add trace ids to deprecation logs

**URL:** <https://discuss.elastic.co/t/add-trace-ids-to-deprecation-logs/252999>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-monitoring\
**Created:** [October 22, 2020, 12:31pm UTC](https://discuss.elastic.co/t/add-trace-ids-to-deprecation-logs/252999 "2020-10-22T12:31:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rdragan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rdragan/32/51129_2.png) [@rdragan](https://discuss.elastic.co/u/rdragan)\
**Post date:** [October 22, 2020, 12:31pm UTC](https://discuss.elastic.co/t/add-trace-ids-to-deprecation-logs/252999/1 "2020-10-22T12:31:44Z")

</div>

Hello,

I've noticed that your search and indexing slow logs have attached trace ids [[Github code]](https://github.com/elastic/elasticsearch/blob/3f8097bce163e35dedbb644392c3097a90aec61b/server/src/main/java/org/elasticsearch/index/SearchSlowLog.java#L176).

I was wondering if it would be possible to add them to deprecation logs as well?

The motivation behind this is the fact that we find it hard to remove deprecated features without knowing what is the source that is triggering them. We are using a micro-service infrastructure, where multiple services are hitting ES. Having trace ids in these deprecation logs would help us identify faster which service is triggering the deprecated feature.

Let me know what you think.

Thanks,  
Relu

---

<div class="post-metadata">

**Author:** ![rdragan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rdragan/32/51129_2.png) [@rdragan](https://discuss.elastic.co/u/rdragan)\
**Post date:** [October 28, 2020, 1:54pm UTC](https://discuss.elastic.co/t/add-trace-ids-to-deprecation-logs/252999/2 "2020-10-28T13:54:44Z")

</div>

If not, is there a way to configure the deprecation logger to throw instead of log? Then, we would catch these exceptions in our service, where we have trace ids.

---

<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, 2020, 1:54pm UTC](https://discuss.elastic.co/t/add-trace-ids-to-deprecation-logs/252999/3 "2020-11-25T13:54:54Z")

</div>

Closed on November 25, 2020, 1:54pm UTC

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