Elastic APM with .Net 5.0

Hi,

I am trying to instrument my sample dotnet application which is .net 5.0 version with elastic APM. While I am able to get the transactions and their respective stacktraces, the traces captured seems to be intermittent.
Example: My sample application has a delete API which is fetching the record that is to be deleted and then performs delete.
But in the stacktrace of the traces I can see only select query or sometimes I am able to fetch both the queries which is the expected stacktrace.
Can someone help me with the configurations required to get both the queries consistently while Capturing the stack traces.
For more information on this I have followed below steps for configuring the agent with my application:

  • I have publish application i.e .exe of my dotnet application and below is the command used to run the application with elasti-apm:
  • source elastic-apm-startup-hook.sh
  • cd d/path-to-my-publish-application/application-name
  • ./EmpApplication.exe
  • elastic-apm-startup-hook.sh contains path to the ElasticApmAgentStartupHook.dll
  • Additionally, I have also tried to configure below environment variables in my .sh file
  • ELASTIC_APM_SPAN_COMPRESSION_ENABLED='false'
  • TRACE_CONTEXT_IGNORE_SAMPLED_FALSE='true'
  • ELASTIC_APM_SPAN_FRAMES_MIN_DURATION='25ms' --Have also tried giving negative value -1ms

Could you please help/advise me so as to resolve this intermittent trace capture issue.
Kindly correct me if in any case the above steps require some corrections as I am new to dotnet technology.

Thanks In advance.

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