The configuration for the stats beat definition

3.4.4

interface IInternalSdkStatsConfig {
    cfgUrl?: string;
    iKey?: string;
    overrideCfgFn?: InternalSdkStatsCfgFetchFn;
    samplingPercentage?: number;
    shrtInt?: number;
    snp?: string;
}

Properties

cfgUrl?: string

The url of the remote SDK Stats configuration (cfg/v1.json) that identifies whether SDK Stats collection is currently enabled and the host that the events should be sent to. This value is normally delivered by the CDN / dynamic configuration rather than being hard coded by the SDK.

When the customer endpoint maps to an EU data-boundary region the eu- prefix is automatically inserted in front of the host, e.g. https://data.stats.monitor.azure.com/cfg/v1.json becomes https://eu-data.stats.monitor.azure.com/cfg/v1.json.

When not supplied no SDK Stats are collected or sent.

undefined
iKey?: string

Instrumentation key used for SDK Stats events. When omitted, SDK Stats are not sent.

undefined

Optional override for the function used to fetch the remote SDK Stats configuration (cfg/v1.json). When not provided the default fetch / XHR based implementation is used. This is primarily intended for testing or advanced scenarios where the configuration needs to be resolved through a custom mechanism.

samplingPercentage?: number

Percentage of generated SDK Stats telemetry that is sent. Each generated SDK Stats item is sampled independently using the current dynamic value. Included telemetry is stamped with this value so the ingestion service can account for the sampling rate.

Values must be between 0 and 100. Invalid values use the default.

100
shrtInt?: number

Collection interval in seconds. Counters persist in session storage across page loads. Non-positive values are ignored and the default is used instead.

3600 (1 hour)
snp?: string

Snippet version appended to the SDK Stats version.