• Creates an INotificationListener that accumulates success/dropped/retry counts and periodically flushes them as Item_Success_Count, Item_Dropped_Count, and Item_Retry_Count metrics via core.track(). Reads config.sdkStats.int dynamically from core.config on each flush.

    Parameters

    • core: IAppInsightsCore<IConfiguration>

      The IAppInsightsCore instance (provides track() and config)

    • sdkVersion: string

      The SDK version string to include in reported metrics

    • OptionaleventName: string

      Optional top-level event name (e.g. "Ms.Web.SdkStat" for 1DS). Defaults to the standard AI event name "Microsoft.ApplicationInsights.[iKey].SdkStats". The counter name (Item_Success_Count etc.) is kept in baseData.name and the metricName property, never the top-level name.

    Returns ISdkStatsNotifCbk

    An INotificationListener with flush and unload methods