Can you record parameters from a function call during tracing?

We can define functions to be measured during there call with: trace_methods. If I have a function:
String doStuff(int bankID);
Is it possible to record bankID in tracing information?
AppDynamics offers Information Points for this functionality. But AppDynamics is pretty unstable.

We do not want to add anything to our source code.

Hi @c64zottel ,
you can use Public API | APM Java Agent Reference [1.x] | Elastic .
And in your method String doStiff(int bankID) you can access to current active span and call setLabel method.

1 Like

Thanks @nugusbayevkk.
We are actually trying to get the parameters without adding source code.

Currently there is no way to achieve that without code changes, nor it is planned to be supported soon.

If you are worried about adding vendor-specific stuff to your source code, you may use OpenTracing API (e.g. io.opentracing.Span#setTag()) and use our OpenTracing bridge instead.

We are already working on supporting the OpenTelemetry API as well, so achieving vendor-agnostic code changes through this API will be available in the future as well.

1 Like

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