Wire telemetry into DatabricksConnection lifecycle\n\nTask ID: task-7.1-databricks-connection-integration#307
Draft
jadewang-db wants to merge 30 commits intomainfrom
Draft
Wire telemetry into DatabricksConnection lifecycle\n\nTask ID: task-7.1-databricks-connection-integration#307jadewang-db wants to merge 30 commits intomainfrom
jadewang-db wants to merge 30 commits intomainfrom
Conversation
added 5 commits
March 5, 2026 05:11
…sk ID: task-1.2-statement-telemetry-context
7 tasks
This was referenced Mar 5, 2026
Draft
GetEndpointUrl now ensures the host has a scheme prefix before constructing the telemetry endpoint URL. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
e93500f to
fa49977
Compare
Use JsonFormatter with PreserveProtoFieldNames(true) instead of JsonFormatter.Default to produce snake_case field names (session_id, system_configuration, etc.) matching the JDBC driver and proto schema. Default produces camelCase (sessionId) which is incorrect. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
7943dd3 to
7b8178e
Compare
This file was accidentally committed and should not be tracked. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…task-2.2-telemetry-client-manager
64758ff to
cefa489
Compare
- Fix final flush no-op by using _closing flag before _disposed - Drain all batches in FlushAsync instead of just one - Fix race condition in TelemetryClientManager with lock-based synchronization - Replace Debug.WriteLine with Activity.Current?.AddEvent() for tracing - Change TelemetrySessionContext setters to internal - Use Interlocked counter for queue size instead of ConcurrentQueue.Count - Use blocking wait in FlushAsync during close - Use test-isolated TelemetryClientManager instances with proper cleanup Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…2-circuit-breaker-telemetry-exporter
… task-4.1-metrics-aggregator
…activity-listener
cefa489 to
da4ab14
Compare
…metryMetric These are no longer used. TelemetryClient now uses a direct enqueue → flush → export pipeline without the Activity-based aggregation layer. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…\nTask ID: task-5.1-telemetry-client-implementation
Remove ActivityListener and MetricsAggregator dependencies. TelemetryClient now directly enqueues TelemetryFrontendLog objects and flushes them via the circuit breaker-protected exporter. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…-activity-tag-enhancement
….1-databricks-connection-integration
StatementTelemetryContext is now created and populated during DatabricksStatement.ExecuteQuery(), with telemetry logs emitted to the TelemetryClient on completion. TelemetryClient.Enqueue() is no longer a no-op — it queues logs and exports via the circuit-breaker-protected exporter pipeline. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fill in remaining TelemetrySessionContext fields: DriverSystemConfiguration (driver version, OS, runtime, locale), DriverConnectionParameters (HTTP path, mode, host), and IsCompressed flag on StatementTelemetryContext. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Split OsName/OsVersion to match JDBC (was combined OSDescription) - Add CharSetEncoding and ProcessName to SystemConfiguration - Add AuthMech (PAT/OAuth) and AuthFlow to DriverConnectionParams - Format HostUrl as "https://host:443" to match JDBC format - Set Port=0 to match JDBC convention Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Override ExecuteQueryAsync in DatabricksStatement to emit telemetry (previously only ExecuteQuery was hooked up). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
CreateTelemetryHttpClient was creating a plain HttpClient without auth, causing 401 Unauthorized on /telemetry-ext. Now uses the same handler pipeline as feature flag client (PAT, OAuth, WIF, proxy support). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Hook up telemetry for all four statement execution paths: ExecuteQuery, ExecuteQueryAsync, ExecuteUpdate, ExecuteUpdateAsync. Refactor to extract shared helpers (CreateTelemetryContext, RecordSuccess, RecordError) to reduce duplication across the four overrides. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Extract sql_statement_id from DatabricksCompositeReader's response OperationHandle after query execution. Expose StatementId property on DatabricksCompositeReader for telemetry context to read. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Instead of exposing StatementId on DatabricksCompositeReader, capture it on DatabricksStatement.LastStatementId in DatabricksConnection.NewReader() which already has access to both the statement and response objects. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
da4ab14 to
529700e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Please fill in a description of the changes here.
This contains breaking changes.
Closes #NNN.