- 
                Notifications
    
You must be signed in to change notification settings  - Fork 161
 
feat(csharp/src/Drivers/Databricks): Implement telemetry tag definitions (phase 1) #3653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat(csharp/src/Drivers/Databricks): Implement telemetry tag definitions (phase 1) #3653
Conversation
| 
           please make sure to have good PR descriptions  | 
    
| public TelemetryTagAttribute(string tagName) | ||
| { | ||
| TagName = tagName ?? throw new ArgumentNullException(nameof(tagName)); | ||
| ExportScope = TagExportScope.ExportAll; | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is this used? Why hardcode to ExportAll?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
defaulted to export local as discussed offline
| public const string DriverRuntime = "driver.runtime"; | ||
| 
               | 
          ||
| // Feature Flags | ||
| [TelemetryTag("feature.cloudfetch", ExportScope = TagExportScope.ExportDatabricks, Description = "CloudFetch enabled")] | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these only for Export to Databricks? Not local?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated to export all
| /// <summary> | ||
| /// Gets tags allowed for Databricks export (privacy whitelist). | ||
| /// </summary> | ||
| // TODO: Explore alternate approaches to avoid maintaining separate GetDatabricksExportTags methods in each event class. | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a todo comment to explore alternate approaches to GetDatabricksExportTags method (other than reflection), or changing the flow based on how we use this method (in the next phases)
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.