Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
ac3f625
Add telemetry testing and documentation
samikshya-db Jan 28, 2026
6f5f72e
Add authentication support for REST API calls in telemetry
samikshya-db Jan 29, 2026
4badcc5
Fix telemetry and feature flag implementation
samikshya-db Jan 29, 2026
ee7fafe
Fix prettier formatting
samikshya-db Jan 29, 2026
b9cf684
Update telemetry design doc with system config and protoLogs format
samikshya-db Jan 30, 2026
ea1643b
Document telemetry export lifecycle and timing
samikshya-db Jan 30, 2026
29cc1b2
Merge branch 'telemetry-6-integration' into telemetry-7-documentation
samikshya-db Jan 30, 2026
c0e3a43
Add connection open latency tracking and enable telemetry by default
samikshya-db Jan 30, 2026
728f0d7
Populate sql_operation, statement_id, and auth_type in telemetry
samikshya-db Jan 30, 2026
d60b514
Map auth type to telemetry auth enum
samikshya-db Jan 30, 2026
d1d08d9
Add SqlExecutionEvent fields to telemetry
samikshya-db Jan 30, 2026
a8ec232
Filter out NIL UUID from statement ID in telemetry
samikshya-db Jan 30, 2026
42f1e23
Only populate sql_operation fields when present
samikshya-db Jan 30, 2026
658870f
Map Thrift operation type to proto Operation.Type enum
samikshya-db Jan 30, 2026
70c038c
Move auth_type to top level per proto definition
samikshya-db Jan 30, 2026
90fb7cd
Map result format to proto ExecutionResult.Format enum
samikshya-db Jan 30, 2026
8d6d819
Refactor telemetry type mappers to separate file
samikshya-db Jan 30, 2026
25c8f51
Add driver_connection_params with available fields
samikshya-db Jan 30, 2026
53189a8
Document proto field coverage in design doc
samikshya-db Jan 30, 2026
a37fdf0
Include system_configuration, driver_connection_params, and auth_type…
samikshya-db Jan 30, 2026
239e555
Add connection close telemetry event
samikshya-db Jan 30, 2026
e7f2144
Fix unit tests for connection close telemetry
samikshya-db Jan 30, 2026
d9cc2c9
Add connection.close event listener to telemetry wire-up
samikshya-db Jan 30, 2026
8ff09a9
Make telemetry logging silent by default
samikshya-db Jan 30, 2026
316d1e9
Ensure statement_type always populated in telemetry
samikshya-db Jan 30, 2026
adb70bc
Add operation types to connection metrics
samikshya-db Jan 30, 2026
09cde19
Fix telemetry proto field mapping
samikshya-db Jan 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,53 @@ client
});
```

## Telemetry

The Databricks SQL Driver for Node.js includes an **opt-in telemetry system** that collects driver usage metrics and performance data to help improve the driver. Telemetry is **disabled by default** and follows a **privacy-first design**.

### Key Features

- **Privacy-first**: No SQL queries, results, or sensitive data is ever collected
- **Opt-in**: Controlled by server-side feature flag (disabled by default)
- **Non-blocking**: All telemetry operations are asynchronous and never impact your queries
- **Resilient**: Circuit breaker protection prevents telemetry failures from affecting your application

### What Data is Collected?

When enabled, the driver collects:

- βœ… Driver version and configuration settings
- βœ… Query performance metrics (latency, chunk counts, bytes downloaded)
- βœ… Error types and status codes
- βœ… Feature usage (CloudFetch, Arrow format, compression)

**Never collected**:

- ❌ SQL query text
- ❌ Query results or data values
- ❌ Table/column names or schema information
- ❌ User credentials or personal information

### Configuration

To enable or disable telemetry explicitly:

```javascript
const client = new DBSQLClient({
telemetryEnabled: true, // Enable telemetry (default: false)
});

// Or override per connection:
await client.connect({
host: '********.databricks.com',
path: '/sql/2.0/warehouses/****************',
token: 'dapi********************************',
telemetryEnabled: false, // Disable for this connection
});
```

For detailed documentation including configuration options, event types, troubleshooting, and privacy details, see [docs/TELEMETRY.md](docs/TELEMETRY.md).

## Run Tests

### Unit tests
Expand Down
Loading
Loading