# How to filter traces by a custom label in a span

**URL:** <https://discuss.elastic.co/t/how-to-filter-traces-by-a-custom-label-in-a-span/384013>\
**Category:** Elastic Observability\
**Created:** [December 12, 2025, 11:29am UTC](https://discuss.elastic.co/t/how-to-filter-traces-by-a-custom-label-in-a-span/384013 "2025-12-12T11:29:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![xyz1111](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xyz1111/32/142157_2.png) [@xyz1111](https://discuss.elastic.co/u/xyz1111)\
**Post date:** [December 12, 2025, 11:29am UTC](https://discuss.elastic.co/t/how-to-filter-traces-by-a-custom-label-in-a-span/384013/1 "2025-12-12T11:29:41Z")

</div>

Hey! I’m trying to find a way to only see the spans with a particular label value. Similar to opening the traces on Grafana and typing something like {span.mycustomfield=”value”} and seeing all the spans underneath. Tried doing it on kibana Applications/Traces “Search transactions” bar, it sees my custom label key but doesn’t see any values (and doesn’t show anything after filtering). Any ideas?

---

<div class="post-metadata">

**Author:** ![Tortoise](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tortoise/32/147587_2.png) [@Tortoise](https://discuss.elastic.co/u/Tortoise)\
**Post date:** [December 12, 2025, 12:18pm UTC](https://discuss.elastic.co/t/how-to-filter-traces-by-a-custom-label-in-a-span/384013/2 "2025-12-12T12:18:39Z")

</div>

Hello @xyz1111

Welcome to the community!!

I believe as you suggested below is the screen & custom filter which is applied by you but for your custom field there are no values to filter ?

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/8/f/8f51296c9785ba8e446ea85ae98ccbef18478fc5.png)

Can we see via Discover \> APM Dataview if you are able to filter the records over there ?

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/3/3/338db0bd13b9eeea9d5a582f541a2b42985715ee.png)

This can help to know why your search using custom field has issues on the Traces screen.

Thanks!!
