Go to All Forums

C# StackTrace with incorrect line number

Hello all,

I currently running asp.net (C#) site with Site24x7 APM enabled. However, I notice that my stack trace of exception in my log is displaying incorrect line number. I'm suspecting that it's might be the APM causing this...Is there a way to fix this?

Like (1) Reply
Replies (1)

Re: C# StackTrace with incorrect line number

Hi Trung, 

Please note that stack trace information may not be complete and accurate in Release mode due to inlining and other optimizations. The APM Insight agent works at the IL code, and adds a couple of lines at the start and end of each method to calculate the time taken. This happens at runtime, so the symbols information (*.pdb files), which are generated at compile time, may be a little off. 

Kindly share few more details like

1. What is the logging framework you use ? We track exceptions logged using popular frameworks like Log4Net, NLog etc and show them in the exceptions tab.  

2. How much the stack trace line numbers were offset and whether this offset was seen in system methods or custom instrumented methods (if any) ?

Thanks & Regards,
Shrinivasan S S
Developer, APM Insight .NET Agent

Like (0) Reply

Was this post helpful?