Azure Function App - Application insights sampling

Martiniak Milan 46 Reputation points
2020-10-05T08:39:02.513+00:00

Hi,

we try to reduce the amount of data in Application Insights.

By the documentation, we set the Application Insights sampling for Azure Function as follows:

{  
  "version": "2.0",  
  "logging": {  
    "applicationInsights": {  
      "samplingSettings": {  
        "isEnabled": true,  
        "maxTelemetryItemsPerSecond": 5,  
        "initialSamplingPercentage": 5.0,  
        "minSamplingPercentage": 5.0,  
        "maxSamplingPercentage": 5.0,  
        "excludedTypes": "Request;Trace;Dependency"  
      }  
    }  
  }  
}  
  

Despite the fact that Request, Trace and Dependency are excluded from application insights, logs are still growing.

Can you advise us on what we are doing wrong?
Thanks.

I can provide names of demo Azure Function, Application Insights and Subscriptions if it helps. (by e-mail)

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,022 questions
{count} votes

Accepted answer
  1. JayaC-MSFT 5,511 Reputation points
    2020-10-06T13:03:35.52+00:00

    @Martiniak Milan Thank you for sharing the details offline. I have suggested to use the "IncludeTypes" instead of "ExcludeTypes".

    30421-image.png

    for sampling, if you are excluding any specific type, it will not get sampled. let's say "traces" is excluded, so only request and other telemetry will get sampled not traces.

    Please let me know if this helps.

    0 comments No comments

0 additional answers

Sort by: Most helpful