Trace overloaded methods

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

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 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 should be relevant for most server-side HTTP transactions.

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