0

Hi i am wondering why my stack trace gets cut when i'm logging it in log analytics with Application insight?

enter image description here

as you can see in the image i don't get the whole stack trace for some reason.

i'm logging it like this in my application:

        catch (Exception e)
        {
            //create a dictionary to store the json string
            var customDataDict = new Dictionary<string, string>();

            customDataDict.Add("Exception StackTrace", e.StackTrace);

            // Send the exception telemetry:
            telemetry.TrackException(e, customDataDict);

            return new HttpResponseMessage(HttpStatusCode.BadRequest);
        }

My stacktrace should look like this:

at TestAPILogging.Controllers.LoggingApiController.d__0.MoveNext() in C:\Users\John\Documents\Visual Studio 2015\Projects\TestAPILogging\TestAPILogging\Controllers\LoggingApiController.cs:line 43

Am I missing something? is there a limit in how many characters can be saved?

H4p7ic
  • 1,669
  • 2
  • 32
  • 61

1 Answers1

0

Although there are size limits, I assume this is not the case. Projecting query result to a online grid might truncate some long records

Data might be there, but you have to query, project or export it to be sure.

Mladen
  • 189
  • 1
  • 8