问题
I am using azure app insights for logging in my webservice application, we are able to log the exception message and no issues in log the post method body object as well. But we are trying to log the large body object , the partiall content is truncated and shown in the azure portal. In my application side verified we are passing the serialized full object value, Code :
Dictionary<string, string> requestBodyData = new Dictionary<string, string>();
requestBodyData = ex.Data.Cast<System.Collections.DictionaryEntry>().ToDictionary(de => (string)de.Key, de => (string)de.Value);
(new Microsoft.ApplicationInsights.TelemetryClient()).TrackException(ex, requestBodyData, null);
requestBodyData - is carrying the post object data.
It seems post data length limit is 1KB like that, Could you please help me understand this behavior?
回答1:
I found this change on GitHub to set error message length to 1024 symbols.
I expect that this limit will be changed to 32k pretty soon, you can watch this repo on GitHub (ApplicationInsights-Home) to catch the right moment.
来源:https://stackoverflow.com/questions/39627109/is-there-any-limit-on-azure-appinsights-custom-data-trackexception-error-message