You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[PECOBLR-1143] Implement telemetry Phase 4-5: Export infrastructure and 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 <[email protected]>
0 commit comments