[PECOBLR-1143] Implement telemetry Phase 4-5: Export infrastructure and opt-in configuration #317
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