# How to get more useful information from transactions

**URL:** <https://discuss.elastic.co/t/how-to-get-more-useful-information-from-transactions/328497>\
**Category:** APM\
**Tags:** java\
**Created:** [March 24, 2023, 8:54pm UTC](https://discuss.elastic.co/t/how-to-get-more-useful-information-from-transactions/328497 "2023-03-24T20:54:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Scott\_Chapman1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/scott_chapman1/32/118292_2.png) [@Scott\_Chapman1](https://discuss.elastic.co/u/Scott_Chapman1)\
**Post date:** [March 24, 2023, 8:54pm UTC](https://discuss.elastic.co/t/how-to-get-more-useful-information-from-transactions/328497/1 "2023-03-24T20:54:10Z")

</div>

So, I often see transactions with the name like "2#run". From the transaction it looks like it is a TimerTask. Is there anything I can do to help with the naming for that transaction?

I think I see different examples where there is a descriptive name. But I think in those cases I have a class that extends TimerTask.

---

<div class="post-metadata">

**Author:** ![Jonas\_Kunz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jonas_kunz/32/110740_2.png) [@Jonas\_Kunz](https://discuss.elastic.co/u/Jonas_Kunz)\
**Post date:** [March 27, 2023, 9:33am UTC](https://discuss.elastic.co/t/how-to-get-more-useful-information-from-transactions/328497/2 "2023-03-27T09:33:51Z")

</div>

We name `TimerTasks` based on the simple class and method names. I assume that `2#run` maybe comes from an anonymous class.

You can use our [public API](https://www.elastic.co/guide/en/apm/agent/java/current/public-api.html#api-set-name) to rename the transactions by adding the following snippet into your `run` methods:

```auto
ElasticApm.currentTransaction().setName("New Transaction Name Here");

```

---

<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:** [April 17, 2023, 5:34am UTC](https://discuss.elastic.co/t/how-to-get-more-useful-information-from-transactions/328497/3 "2023-04-17T05:34:13Z")

</div>

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