是否可以在Azure App Service中记录http请求的正文?

问题描述 投票:1回答:1

我需要在Azure AppService中记录请求的http正文。

我注意到有此应用程序服务日志。我是否可以在其中进行配置,以使该主体记录在Azure存储中。

enter image description here

在Azure存储中记录正文的最佳方法是什么(无需自己编写代码)? :)

azure azure-web-sites azure-appservice
1个回答
0
投票

就像@Vihanga Bandara所说的那样,无法将主体存储在存储中,您需要使用Application Insights自定义事件。

对于应用程序服务日志,我们只能获得这样的日志信息

2020-05-28 07:29:58 TONYTESTNETCORE POST /api/TodoItems X-ARR-LOG-ID=5a94c854-d4ff-4b2d-b2c4-6fdebb457cee 443 - 167.220.233.180 PostmanRuntime/7.24.1 ARRAffinity=152c130e21c95ce31be52418aed58ed4a1114b560e108246b2120e2d4dbf27ee - tonytestnetcore.azurewebsites.net 201 0 0 443 1359 62

参考:

Application Insights API for custom events and metrics

TrackRequest

© www.soinside.com 2019 - 2024. All rights reserved.