Stack trace for async methods

Hi,
I am trying to figure out how to trace async methods for a particular transaction.
Currently I am not able to get the stack traces for end-to-end flow of the transaction.
Could you please help me understand how the agent keeps track of spans occurring in different threads?
Is it possible that I can make changes in the agent code so as to get all the stack traces for an async flow which also include custom methods that only does simple business logic(no DB call or external API calls).

Please help me with this query, I have been looking for a solution for a long time.

Thank you
Abhijith C V

Hi !

I think the implementation in dotnet is quite close to the Java instrumentation, with the difference that it's dotnet CLR and not Java bytecode that gets instrumented.

If you need to track custom code with async delegation, this would be a case where modifying your code and use a tracing API explicitly would be relevant, see [docs] for details (Public API | APM .NET Agent Reference [1.x] | Elastic).

(disclamer: I'm not an expert of the dotnet instrumentation technical details)

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