Azure Functions:如何使用 Python 使用 Azure Functions 使用本地调试模式将我的日志写入 Azure Application Insights?
Azure Function : How do I write my logs to Azure Application Insights using local debug mode with Azure Functions using Python?
我想将日志写入 Azure Application Insights,但不知道如何实现。
我需要更新我的 azure 函数 local.settings.json 和 host.json 文件吗??
另外,我是否需要在 init.py 文件中使用调用特定函数来将我的日志写入 Azure Application Insights?
你能分享一些例子来写日志吗?
请注意-我正在为我的 Azure 函数使用 python。
谢谢
这是host.json:
{
"version": "2.0",
"logging": {
"applicationInsights": {
"samplingSettings": {
"isEnabled": true,
"excludedTypes": "Request"
}
}
}
}
这是官方设置:
https://docs.microsoft.com/en-us/azure/azure-functions/functions-host-json#applicationinsights
'applicationInsights.samplingSettings.isEnabled' 是启用或禁用采样。
我想将日志写入 Azure Application Insights,但不知道如何实现。
我需要更新我的 azure 函数 local.settings.json 和 host.json 文件吗??
另外,我是否需要在 init.py 文件中使用调用特定函数来将我的日志写入 Azure Application Insights?
你能分享一些例子来写日志吗?
请注意-我正在为我的 Azure 函数使用 python。
谢谢
这是host.json:
{
"version": "2.0",
"logging": {
"applicationInsights": {
"samplingSettings": {
"isEnabled": true,
"excludedTypes": "Request"
}
}
}
}
这是官方设置:
https://docs.microsoft.com/en-us/azure/azure-functions/functions-host-json#applicationinsights
'applicationInsights.samplingSettings.isEnabled' 是启用或禁用采样。