# How to filter certain span in a transaction

**URL:** <https://discuss.elastic.co/t/how-to-filter-certain-span-in-a-transaction/206042>\
**Category:** APM\
**Tags:** go\
**Created:** [October 31, 2019, 1:14pm UTC](https://discuss.elastic.co/t/how-to-filter-certain-span-in-a-transaction/206042 "2019-10-31T13:14:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aladine](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aladine/32/42201_2.png) [@aladine](https://discuss.elastic.co/u/aladine)\
**Post date:** [October 31, 2019, 1:14pm UTC](https://discuss.elastic.co/t/how-to-filter-certain-span-in-a-transaction/206042/1 "2019-10-31T13:14:23Z")

</div>

I am using go agent for apm. In a (http request) transaction, when I integrate with **apmsql** to display the span of db, it displays in Kibana of both `span.action=prepare` and `span.action=query`.  
Is there any way I can configure to filter exclude `span.action=prepare` in all the transactions?

---

<div class="post-metadata">

**Author:** ![axw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/axw/32/28197_2.png) [@axw](https://discuss.elastic.co/u/axw)\
**Post date:** [November 12, 2019, 8:52am UTC](https://discuss.elastic.co/t/how-to-filter-certain-span-in-a-transaction/206042/2 "2019-11-12T08:52:37Z")

</div>

@aladine sorry for the very late reply!

At the moment there is no way to filter out these spans in the agent. You could configure the server to use an [ingest node pipeline](https://www.elastic.co/guide/en/apm/server/current/configuring-ingest-node.html) to drop these kinds of span documents.

---

<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:** [December 3, 2019, 4:52am UTC](https://discuss.elastic.co/t/how-to-filter-certain-span-in-a-transaction/206042/3 "2019-12-03T04:52:43Z")

</div>

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