Search code examples
azureazure-functionsazure-application-insights

Azure Functions v2: Filter out dependency tracking


Does anyone have some sample code for Azure Functions V2 to disable Dependency tracking via the host.json?


Solution

  • In host.json, set the field enableDependencyTracking to false.

    For more details, please refer to this article -> logging field -> applicationInsights field.

    A sample of host.json to disable dependency tracking:

     {
          "logging": {
            "applicationInsights": {
              "samplingSettings": {
                //other settings
              },
              "enableDependencyTracking": false
            }
          }
        }
    

    And the screenshot of sample from the official doc:

    enter image description here