How do I enable Application Insights server telemetry on WebApi project that uses OWIN?

后端 未结 3 449
一整个雨季
一整个雨季 2021-02-05 09:37

We are having a bunch of problems (read long response times) with a couple of projects in production and wanted to see exactly what was happening on the server. I then proceeded

3条回答
  •  温柔的废话
    2021-02-05 10:20

    AI uses httpmodule to collect information on begin request and send it on end request. As described here Owin/Katana uses middelwares to execute logic on a different stages. As most of AI auto collection logic is internal you cannot reuse it in your middleware. But you can instrument your code yourself. Create TelemetryClient from your code and start sending Request, Traces and Exceptions (like described here)

提交回复
热议问题