# Is there a way to change the transaction to the interface name?

**URL:** <https://discuss.elastic.co/t/is-there-a-way-to-change-the-transaction-to-the-interface-name/302952>\
**Category:** APM\
**Tags:** java\
**Created:** [April 21, 2022, 5:54pm UTC](https://discuss.elastic.co/t/is-there-a-way-to-change-the-transaction-to-the-interface-name/302952 "2022-04-21T17:54:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phoebus888](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/phoebus888/32/104665_2.png) [@Phoebus888](https://discuss.elastic.co/u/Phoebus888)\
**Post date:** [April 21, 2022, 5:54pm UTC](https://discuss.elastic.co/t/is-there-a-way-to-change-the-transaction-to-the-interface-name/302952/1 "2022-04-21T17:54:04Z")

</div>

![image](https://us1.discourse-cdn.com/elastic/original/3X/3/b/3b13a4db7c8bb53fcf75ab61ae973e04c98cc6cc.png)  
Interface names are more intuitive

---

<div class="post-metadata">

**Author:** ![Eyal\_Koren](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eyal_koren/32/36830_2.png) [@Eyal\_Koren](https://discuss.elastic.co/u/Eyal_Koren)\
**Post date:** [April 24, 2022, 4:58am UTC](https://discuss.elastic.co/t/is-there-a-way-to-change-the-transaction-to-the-interface-name/302952/2 "2022-04-24T04:58:37Z")

</div>

There is definitely a way to customize the transaction name however you see fit.  
Choose one of our [APIs](https://www.elastic.co/guide/en/apm/agent/java/current/apis.html) for that.  
For example, use our public API to [override the transaction name](https://www.elastic.co/guide/en/apm/agent/java/current/public-api.html#api-set-name). Find a place in your code that is invoked whenever there is a transaction active and use it.  
For example, one good option is to add a `Servlet` [`Filter`](https://docs.oracle.com/javaee/7/api/javax/servlet/Filter.html) and do this **after** calling `chain.doFilter()`.

I hope this helps.

---

<div class="post-metadata">

**Author:** ![Phoebus888](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/phoebus888/32/104665_2.png) [@Phoebus888](https://discuss.elastic.co/u/Phoebus888)\
**Post date:** [April 24, 2022, 6:31am UTC](https://discuss.elastic.co/t/is-there-a-way-to-change-the-transaction-to-the-interface-name/302952/3 "2022-04-24T06:31:16Z")

</div>

Can this directly display the interface name like skywalking agent?

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

---

<div class="post-metadata">

**Author:** ![Phoebus888](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/phoebus888/32/104665_2.png) [@Phoebus888](https://discuss.elastic.co/u/Phoebus888)\
**Post date:** [April 24, 2022, 6:40am UTC](https://discuss.elastic.co/t/is-there-a-way-to-change-the-transaction-to-the-interface-name/302952/4 "2022-04-24T06:40:04Z")

</div>

Can the agent code directly grab the interface name?

---

<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:** [May 15, 2022, 2:41am UTC](https://discuss.elastic.co/t/is-there-a-way-to-change-the-transaction-to-the-interface-name/302952/5 "2022-05-15T02:41:04Z")

</div>

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