azure - Track HTTP body content on Application Insights -
is there way include http body response content in application insights http or dependency tracking modules? useful knowing http response status code of request is, important know response message/data.
ive looked @ creating custom filter or initializer no properties seem have response content, how can include it?
this requires bit more inspecting properties of response object. have use response filter in order capture body before it's done.
the gist below has 2 files. 1 capturestream.cs
file implements stream abastract class , passes along information. along way append data in stringbuilder.
in other example of global.asax.cs
overrides application_beginrequest
method , application_logrequest
method.
you can choose method in asp.net application lifecycle think right location. chose these 2 because first 2 remember using in other projects.
https://gist.github.com/debugthings/058f8c0634accfbdcce2c8c5b818d514
Comments
Post a Comment