# Trace overloaded methods

**URL:** <https://discuss.elastic.co/t/trace-overloaded-methods/316501>\
**Category:** APM\
**Tags:** java\
**Created:** [October 13, 2022, 7:59am UTC](https://discuss.elastic.co/t/trace-overloaded-methods/316501 "2022-10-13T07:59:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yahire](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yahire/32/104451_2.png) [@yahire](https://discuss.elastic.co/u/yahire)\
**Post date:** [October 13, 2022, 7:59am UTC](https://discuss.elastic.co/t/trace-overloaded-methods/316501/1 "2022-10-13T07:59:38Z")

</div>

Hi team,

Can we trace the parameters of the methods too?

I am having a class with overloaded methods, when i observed the traces, class name, line number and method name is traced, but i wanted to check among all the overloaded methods, which method is called exactly with parameter count or type apart from line number.

Thanks and regards,  
Yogesh Ahire

---

<div class="post-metadata">

**Author:** ![Sylvain\_Juge](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sylvain_juge/32/55521_2.png) [@Sylvain\_Juge](https://discuss.elastic.co/u/Sylvain_Juge)\
**Post date:** [October 13, 2022, 2:02pm UTC](https://discuss.elastic.co/t/trace-overloaded-methods/316501/2 "2022-10-13T14:02:39Z")

</div>

Hi @yahire ,

What you see as a transaction name in your case is very probably using the `ClassName#method` format, which means that two overloaded methods with different parameters will appear to be identical.

If the methods are instrumented through `trace_methods` configuration option, you could use the annotations available in the Public API [Public API | APM Java Agent Reference [1.x] | Elastic](https://www.elastic.co/guide/en/apm/agent/java/current/public-api.html#api-annotation) to customize the default transaction name.

If the methods are instrumented through an automatic instrumentation, there are a few plugins that allow to change how transactions/spans are named through configuration.  
For example [`use_path_as_transaction_name`](https://www.elastic.co/guide/en/apm/agent/java/current/config-http.html#config-use-path-as-transaction-name) should be relevant for most server-side HTTP transactions.

---

<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 3, 2022, 10:02am UTC](https://discuss.elastic.co/t/trace-overloaded-methods/316501/3 "2022-11-03T10:02:56Z")

</div>

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