[1/7] Telemetry Foundation: Types, Config, and Exception Classifier#324
Merged
samikshya-db merged 2 commits intomainfrom Jan 29, 2026
Merged
[1/7] Telemetry Foundation: Types, Config, and Exception Classifier#324samikshya-db merged 2 commits intomainfrom
samikshya-db merged 2 commits intomainfrom
Conversation
This is part 1 of 7 in the telemetry implementation stack. Core Components: - Telemetry type definitions for events, metrics, and configuration - Exception classifier for terminal vs retryable error classification - Client context telemetry configuration fields Type Definitions: - TelemetryEvent: Runtime events emitted by driver - TelemetryMetric: Aggregated data exported to Databricks - DriverConfiguration: Driver metadata and feature flags - StatementMetrics: Per-statement aggregation data - TelemetryConfiguration: Config for telemetry features Exception Classification: - Terminal errors (401, 403, 404, 400, AuthenticationError) - flush immediately - Retryable errors (429, 500, 502, 503, 504, timeouts) - buffer until complete - Smart flushing optimizes export efficiency Testing: - 51 comprehensive unit tests for ExceptionClassifier - 100% coverage of edge cases and error types This provides the foundation for subsequent telemetry layers.
This was referenced Jan 28, 2026
jadewang-db
approved these changes
Jan 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 1 of 7-part Telemetry Implementation Stack
This is the foundation layer for the complete telemetry system implementation.
Summary
Adds core telemetry types, configuration fields, and exception classification logic. This provides the base types and utilities that all other telemetry components will build upon.
Components
Type Definitions (
lib/telemetry/types.ts)TelemetryEvent- Runtime events emitted by driverTelemetryMetric- Aggregated data exported to DatabricksDriverConfiguration- Driver metadata and feature flagsStatementMetrics- Per-statement aggregation dataTelemetryConfiguration- Configuration for telemetry featuresTelemetryEventTypeenum - Event type constantsDEFAULT_TELEMETRY_CONFIG- Default configuration valuesException Classifier (
lib/telemetry/ExceptionClassifier.ts)Static utility class for classifying exceptions:
Configuration (
lib/contracts/IClientContext.ts)Added telemetry configuration fields to ClientConfig:
telemetryEnabled- Feature flagtelemetryBatchSize- Batch size for metrics (default: 100)telemetryFlushIntervalMs- Flush interval (default: 5000ms)telemetryMaxRetries- Max retry attempts (default: 3)telemetryAuthenticatedExport- Use authenticated endpoint (default: true)telemetryCircuitBreakerThreshold- Circuit breaker threshold (default: 5)telemetryCircuitBreakerTimeout- Circuit breaker timeout (default: 60000ms)Testing
Next Steps
This PR is followed by:
##Dependencies
No dependencies - this is the foundation layer.