Application Insights 不记录传递给 Azure Function 的查询字符串

Mat*_*und 4 azure-application-insights azure-functions

我们有一个 Http 触发的 Azure 函数,它从 url 和查询字符串获取参数,例如 url 模式“/customers/{customerid}”,然后可以将参数“includeorderdata=true”添加到查询字符串中。因此传入的 url 将为 https://ourazurefunction/api/customers/12345?includeorderdata=true。

在 Application Insights 中,正在记录 url 部分,但我们在任何地方都看不到查询字符串。

kri*_*shg 6

默认的http请求自动收集器专门删除了查询字符串,我没有看到任何包含它的选项。代码参考。这是开放的github 问题。不幸的是,目前我们无能为力。作为替代方案,您可以从代码中记录自定义遥测数据作为暂时的解决方法(注意仅适用于基于 C# 或 JavaScript 的函数)。