1

Default Sitecore logs performance counters every 5 second from each of the 4 roles. This is a bit much for our needs. Is it possible to reduce the sampling intervall of performance counters without reducing the other logging?

I see that in application.config file in the root directory this is set like this:

<Add Type="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor, Microsoft.AI.ServerTelemetryChannel">
  <MaxTelemetryItemsPerSecond>5</MaxTelemetryItemsPerSecond>
</Add>

But I want to change it to sample every 5 minutes instead of 5 seconds, not limit the number of samples per second. Is this possible?

  • 5 minutes is 600 seconds, did you try that? – Tamas Varga Sitecore Sep 26 '18 at 13:46
  • And where would you put 600? – devzero Sep 27 '18 at 7:48
1

In short

The setting MaxTelemetryItemsPerSecond is not setting the sampling interval to 5 seconds, but it is telling how many items to check in 1 second, so you cannot set it to 5 minutes.

In more details

Sampling is a feature in Azure Application Insights. It is the recommended way to reduce telemetry traffic and storage, while preserving a statistically correct analysis of application data.

There are three alternative sampling methods:

  • Adaptive sampling
  • Fixed-rate sampling
  • Ingestion sampling

In this case you are using Adaptive sampling which is the default sampling method and automatically adjusts the volume of telemetry sent from the SDK. It doesn't operate at low volumes of telemetry, so an app in debugging or a website with low usage won't be affected.

Couple of things you can do to lower the samplings:

  1. Use ExcludedTypes or IncludedTypes as additional parameters, for example:

    <ExcludedTypes>Trace;Exception</ExcludedTypes>
    <IncludedTypes>Request;Dependency</IncludedTypes>
    
  2. Disable the AdaptiveSamplingTelemetryProcessor and configuring fixed-rate sampling, for example:

      <Add  Type="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.SamplingTelemetryProcessor, Microsoft.AI.ServerTelemetryChannel">
           <!-- Set a percentage close to 100/N where N is an integer. -->
           <!-- E.g. 50 (=100/2), 33.33 (=100/3), 25 (=100/4), 20, 1 (=100/100), 0.1 (=100/1000) -->
            <SamplingPercentage>10</SamplingPercentage>
       </Add>
    

Learn more here: https://docs.microsoft.com/en-gb/azure/azure-monitor/app/sampling

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.