Skip to content

Conversation

@sreekanth-db
Copy link
Contributor

Low level design doc for telemetry in databricks ADBC driver

Signed-off-by: Sreekanth Vadigi <[email protected]>
@github-actions github-actions bot added this to the ADBC Libraries 21 milestone Oct 27, 2025
@sreekanth-db sreekanth-db marked this pull request as draft October 27, 2025 16:09
## 3. Architecture Overview

### 3.1 High-Level Design

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make this a mermaid diagram

│ - /telemetry-unauth (unauthenticated - connection errors) │
└─────────────────────────────────────────────────────────────────┘
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove the databricsk internal implementation

/// Collects and aggregates telemetry events for a connection.
/// Thread-safe and non-blocking.
/// </summary>
internal sealed class TelemetryCollector : IDisposable
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we replace the methods with just one record method with an operation type?

```

**Implementation Details**:

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't need this level of detail in a design doc, in stead we should focus more on interface/contract between different class objects

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

focus on adding more class diagram and sequence diagram, etc, instead of putting big block of code into the design doc.

EnqueueEvent(telemetryEvent);
}

public void RecordStatementExecute(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what will happen, if data of same statement being reported multiple times, will our backend merge them?

```

### 9.3 Data Residency Compliance

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need this section?


#### 11.1.1 TelemetryCollector Tests

**File**: `TelemetryCollectorTests.cs`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe just a list of test case name, no need for detail code.

}
```

### 11.4 Mock Endpoint Testing
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need this?


## 12. Migration & Rollout

### 12.1 Rollout Phases
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's remove this section

```
```

#### Internal Documentation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this section

@@ -0,0 +1,11 @@
1. "can you understand the content present in this google doc: {telemetry-design-doc-url}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do you plugin the actual url? Is this a databricks internal google doc link?

@@ -0,0 +1,11 @@
1. "can you understand the content present in this google doc: {telemetry-design-doc-url}"

2. "can you use google mcp"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is internal google doc mcp right?

```csharp
private async Task DownloadFileAsync(IDownloadResult downloadResult, ...)
{
var sw = Stopwatch.StartNew();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need a separate stopwatch? The existing cloudfetch telemetry already capture this using ActivityTrace.


4. "can you check the databricks jdbc repo and understand how it is currently implemented"

5. "now, lets go through the arrow adbc driver for databricks present at {project-location}/arrow-adbc/csharp/src/Drivers/Databricks, and understand its flow"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we ask llm to also go through this PR of how existing tracing/exporter framework is implemented: #3315.
I believe this can potentially reduce this complexity of our design and we can reuse some of the existing components.

{
Debug.WriteLine($"Failed to check telemetry feature flag: {ex.Message}");
// Default to enabled if check fails
return true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default to enable? Is this expected? Any side-effect(perf) for this exporter?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants