azure - 有没有办法在 Azure 应用服务中记录 http 请求的正文?

标签 azure azure-web-app-service azure-appservice

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

我注意到有这个应用程序服务日志。 这里是否有一个配置可以让我将正文记录在Azure存储中。

enter image description here

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

最佳答案

就像@Vihanga Bandara所说,没有办法将body存储在存储中,您需要使用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

关于azure - 有没有办法在 Azure 应用服务中记录 http 请求的正文?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62040982/

相关文章:

Azure 数据工厂更改 Azure 表架构

php - Azure 上适用于 Magento 的 MySQL 应用程序内

GitLab 持续部署到 Azure Web 应用程序

nginx - Azure Web 应用服务 + Docker Compose + NGINX 反向代理 - 部署中出现 502 错误

c# - Azure 应用服务应用程序设置值未更新

Azure ARM 模板——如何横向扩展至正好 2 个实例?

azure - "Turn off"Azure 应用服务和 Azure SQL Server 以降低成本

azure - 日常任务的替代方案

c - 检测 Azure Linux VM 中的临时磁盘

c# - Azure 应用服务在执行检索时抛出未找到数据库的错误