[PECOBLR-1143] Implement telemetry Phase 4-5: Export infrastructure and opt-in configuration#317
Closed
samikshya-db wants to merge 1 commit intomainfrom
Closed
[PECOBLR-1143] Implement telemetry Phase 4-5: Export infrastructure and opt-in configuration#317samikshya-db wants to merge 1 commit intomainfrom
samikshya-db wants to merge 1 commit intomainfrom
Conversation
…nd opt-in configuration This commit implements the remaining components for PECOBLR-1143 (Phases 4-5): Phase 4: Export Infrastructure - Implement telemetryExporter with HTTP POST to /api/2.0/telemetry-ext - Add retry logic with exponential backoff (100ms base, 3 retries) - Integrate with circuit breaker for endpoint protection - Implement tag filtering via shouldExportToDatabricks() - Add error swallowing to ensure telemetry never impacts driver - Support both http:// and https:// URLs for testing Phase 5: Opt-In Configuration Integration - Implement isTelemetryEnabled() with 5-level priority logic: 1. forceEnableTelemetry=true - bypasses all server checks 2. enableTelemetry=false - explicit opt-out 3. enableTelemetry=true + server flag - user opt-in with server control 4. Server flag only - default Databricks-controlled behavior 5. Default disabled - fail-safe default - Wire up with existing featureFlagCache for server flag checks - Handle errors gracefully (default to disabled on failures) Testing: - Add 17 comprehensive unit tests for exporter (success, retries, circuit breaker, tag filtering, error swallowing, exponential backoff, context cancellation) - Add 8 unit tests for isTelemetryEnabled (all 5 priority levels, error handling, server scenarios) - All 70+ telemetry tests passing Documentation: - Update DESIGN.md checklist to mark Phases 3-5 as completed This completes the core telemetry infrastructure for PECOBLR-1143. Next phases (6-7) will add metric collection and driver integration. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
10 tasks
Collaborator
Author
|
Recreating with git stack for proper stacked PR management |
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.
Summary
This PR implements the remaining core infrastructure for PECOBLR-1143 (Phases 4-5), completing the foundational telemetry system for the Databricks SQL Go driver.
Phase 4: Export Infrastructure ✅
telemetryExporterwith HTTP POST to/api/2.0/telemetry-extshouldExportToDatabricks()Phase 5: Opt-In Configuration Integration ✅
isTelemetryEnabled()with 5-level priority logic:forceEnableTelemetry=true- bypasses all server checks (testing/internal)enableTelemetry=false- explicit opt-out (always disabled)enableTelemetry=true+ server flag - user opt-in with server controlfeatureFlagCachefor server flag checksChanges
New Files
telemetry/exporter.go(192 lines) - Export infrastructuretelemetry/exporter_test.go(448 lines) - Comprehensive exporter testsModified Files
telemetry/config.go(+48 lines) - AddedisTelemetryEnabled()functiontelemetry/config_test.go(+230 lines) - Added opt-in priority teststelemetry/DESIGN.md- Updated checklist (Phases 3-5 marked complete)Test Coverage
All 70+ tests passing ✅
Test run time: 2.017s
Testing Done
Unit Tests
Integration Tests
Design Alignment
This implementation follows the design document (
telemetry/DESIGN.md) specifications:Related Issues
Checklist
Next Steps
After this PR merges:
🤖 Generated with Claude Code