Hello team
With below code ,when I write my call stack details from stringWriter OR jsonTextWriter. I see at application insight end that call stack is truncated and subsequent write code below callStack ('Txt After writing call stack') is not written in telemetry.
During debugging I can see truncated value in tootip and in value window of my variable callStack which is source type , and when changed to view with Text visualizer I can see full complete call stack.
What can I do to ensure that my application insight receives the full call stack and not truncated one.
class myClass { public myMethod() { System.IO.StringWriter stringWriter = new System.IO.StringWriter(); Newtonsoft.Json.JsonTextWriter jsonWriter = new Newtonsoft.Json.JsonTextWriter(stringWriter); source callStack = con2Str(xSession::xppCallStack()); int callStackLength = strLen(callStack); //Option 1 jsonWriter jsonWriter.WriteStartObject(); jsonWriter.WritePropertyName('JSON Call stack get length of call stack'); jsonWriter.WriteValue(callStackLength); jsonWriter.WritePropertyName('JSON Call stack'); jsonWriter.WriteValue(callStack); jsonWriter.WritePropertyName('JSON After writing call stack'); jsonWriter.WriteValue('Txt After writing call stack'); jsonWriter.WriteEndObject(); //Option 2 stringWriter stringWriter.WriteLine('SW Call stack get length of call stack'); stringWriter.WriteLine(callStackLength); stringWriter.WriteLine('SW Call stack'); stringWriter.WriteLine(callStack); stringWriter.WriteLine('SW After writing call stack'); stringWriter.WriteLine('Txt After writing call stack'); SysGlobalTelemetry::logEvent(stringWriter.ToString()); SysGlobalTelemetry::logMetric(stringWriter.ToString(), timeCounter); } }
I can see the following place from where OOTB system sends full call stack, however cannot see telemeteryclient class detail to figure how actually it is sent.
Thanks
Mav
André Arnaud de Cal...
291,965
Super User 2025 Season 1
Martin Dráb
230,836
Most Valuable Professional
nmaenpaa
101,156