Skip to content

Comments

Jacksonweber/enable customer sdk stats#2707

Draft
JacksonWeber wants to merge 9 commits intomicrosoft:betafrom
JacksonWeber:jacksonweber/enable-customer-sdk-stats
Draft

Jacksonweber/enable customer sdk stats#2707
JacksonWeber wants to merge 9 commits intomicrosoft:betafrom
JacksonWeber:jacksonweber/enable-customer-sdk-stats

Conversation

@JacksonWeber
Copy link

This pull request introduces SDK statistics tracking and enhances event notification capabilities in the Application Insights SDK. The main focus is on enabling periodic SDK stats reporting, improving notification for telemetry event lifecycle (including retries), and supporting these features with new interfaces and configuration options.

SDK Statistics Tracking:

  • Added support for SDK statistics reporting, including new configuration options (SDK_STATS, SDK_STATS_VERSION, SDK_STATS_FLUSH_INTERVAL) and default enablement in the config. The stats listener is registered during initialization and properly cleaned up on unload. (AISKU/src/AISku.ts [1] [2] [3] [4] [5] [6]
  • Introduced ISdkStatsNotifCbk and related imports to facilitate SDK stats notification callbacks. (AISKU/src/AISku.ts AISKU/src/AISku.tsL14-R21)

Telemetry Event Notification Enhancements:

  • Extended the notification system to include a new eventsRetry event, allowing listeners to be notified when telemetry items are retried, along with the relevant HTTP status code. (shared/AppInsightsCore/src/constants/InternalConstants.ts [1] shared/AppInsightsCore/src/core/NotificationManager.ts [2] [3] [4]
  • Updated the Sender plugin to trigger notification callbacks for events sent, discarded, and retried, including logic to extract minimal telemetry items for notification purposes. (channels/applicationinsights-channel-js/src/Sender.ts [1] [2] [3] [4] [5]

Internal Data Structure Updates:

  • Added a bT (baseType) property to IInternalStorageItem for mapping telemetry types in SDK stats and notification extraction. (channels/applicationinsights-channel-js/src/Interfaces.ts [1] channels/applicationinsights-channel-js/src/Sender.ts [2]

These changes collectively improve observability, reliability, and extensibility of the telemetry pipeline, especially for SDK usage metrics and event retry handling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant