Azure.Monitor.OpenTelemetry.Exporter.Internals.CustomerSdkStats.CustomerSdkStatsHelper
Helper class for tracking customer SDK statistics.
Categorizes an HTTP status code into a human-readable drop reason.
Follows the Python categorize_status_code function logic.
Gets the configured export interval for customer SDK stats in milliseconds.
Checks if customer SDK stats are enabled.
public static void TrackDropped(TelemetrySchemaTypeCounter telemetrySchemaTypeCounter, bool persistentBlobProviderExists)
Tracks dropped telemetry using pre-computed counts.
According to the specification:
- For non-retryable status codes: use the actual HTTP status code (401, 403, etc.) as dropCode
- For other scenarios: use DropCode enum values (CLIENT_EXCEPTION, CLIENT_READONLY, etc.)
public static void TrackDropped(TelemetrySchemaTypeCounter telemetrySchemaTypeCounter, int dropCode, string dropReason = null)
Tracks dropped telemetry using pre-computed counts.
public static void TrackRetry(TelemetrySchemaTypeCounter telemetrySchemaTypeCounter, int retryCode, string retryReason = null)
Tracks retry telemetry using pre-computed counts.
Tracks successful telemetry transmission using pre-computed counts.