/ notes / azure

Sampling

Sampling in in Azure functions

[[Tests done running Function locally on Visual Studio]]

  "logging": {
    "applicationInsights": {
      "enablePerformanceCountersCollection": false,
      "samplingSettings": {
        "isEnabled": true,
        "evaluationInterval": "00:00:10",
        "maxTelemetryItemsPerSecond": 2,
        "samplingPercentageDecreaseTimeout": "00:00:05",
        "samplingPercentageIncreaseTimeout": "00:00:05",
        "includedTypes": "Request"
      }
    }
  }

Important points:



Sampling in Asp.Net - .NET Framework

<!-- 4% sample fixed rate with a max of 5 items (i.e. requests) per seconds -->
<Add Type="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor, Microsoft.AI.ServerTelemetryChannel">
  <MaxTelemetryItemsPerSecond>5</MaxTelemetryItemsPerSecond>
  <InitialSamplingPercentage>4</InitialSamplingPercentage>
  <MinSamplingPercentage>4</MinSamplingPercentage>
  <MaxSamplingPercentage>4</MaxSamplingPercentage>
</Add>

Availability - web monitoring

Standard (preview) tests

az monitor app-insights web-test list
az monitor app-insights web-test list --output table
az monitor app-insights web-test show --resource-group Monitoring --name httpscheck-xxxxx-httpmonitoring
az monitor app-insights web-test update --resource-group Monitoring --name httpscheck-xxxxx-httpmonitoring --timeout=10