Azure Function 可以工作,但报告“409 指定的容器已存在”

tym*_*tam 9 azure-functions

在没有任何 Azure 存储代码的 Azure 函数中,我在 Application Insights 中收到以下警告。

Error response [15fd74...ec3601] 409 The specified container already exists. (00.0s)
Server:Windows-Azure-Blob/1.0,Microsoft-HTTPAPI/2.0
x-ms-request-id:b72b1...f5-26564f000000
x-ms-client-request-id:15fd74...0ec3601
x-ms-version:2020-08-04
x-ms-error-code:ContainerAlreadyExists
Date:Mon, 21 Feb 2022 07:33:56 GMT
Content-Length:230
Content-Type:application/xml
Run Code Online (Sandbox Code Playgroud)

我认为可以合理地假设这与 Azure Functions 用于记录其状态等的存储帐户有关。

SDK版本azurefunctions:4.1.3.17473

有没有办法调试和/或解决问题?

小智 8

这显然是函数 SDK 中的一个错误。如果将 "Azure.Core": "Error" 添加到 host.json 文件中的 logLevel 设置中,则会抑制它。

{
  "version": "2.0",
    "logging": {
      "applicationInsights": {
        "samplingSettings": {
          "isEnabled": true,
          "excludedTypes": "Request"
        }
      },
      "logLevel": {
        "default": "Warning",
        "Custom": "Information",
        "Function": "Information", // dependency telemetry, used to analyzing dependencies and their performance
        "Host.Results": "Information", // request telemetry, used for analyzing execution performance
        "Azure.Core": "Error" // suppressing sdk blob warnings 
      }
    }
}
Run Code Online (Sandbox Code Playgroud)