feat(csharp): implement telemetry tag definitions (phase 1) #24
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.
🥞 Stacked PR
Use this link to review incremental changes.
What's Changed
This PR implements Phase 1 of telemetry tag definitions (telemetry-activity-based-design.md) for the C# Databricks ADBC driver, establishing structured telemetry collection with privacy-aware export controls.
Changes
Introduces a declarative tag definition system across three telemetry event types:
1. Connection Events - Captures connection lifecycle and driver configuration
2. Statement Execution Events - Tracks query performance and resource usage
3. Error Events - Records error patterns and retry behavior
Export Scope Design
Tags use
TagExportScopeenum to control export destinations:ExportLocal- Sensitive data only (SQL, errors, addresses)ExportDatabricks- Only to databricks serviceExportAll- Non-sensitive operational metrics (both local & Databricks)TelemetryTagRegistryprovides centralized privacy filtering viaGetDatabricksExportTags()andShouldExportToDatabricks().Design Note: Added TODO comment acknowledging the current approach duplicates export scope between attributes and whitelist methods.
Testing
TelemetryTagRegistryTests)Next Steps
Future phases will add ActivityListener, metrics aggregator, and exporter components.