You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(go/adbc): refactor logging instrumentation into OTel tracing - part 1/3 (#4655)
This pull request introduces OpenTelemetry tracing to the FlightSQL
driver, enhancing observability for record reading and endpoint
streaming operations. The main changes involve adding tracing hooks,
attributes, and error recording to critical code paths, as well as
refactoring logging and context management to support tracing.
Additionally, new utility functions for collecting and attaching
response metadata to traces are implemented.
**Tracing and Observability Enhancements:**
* Added OpenTelemetry tracing support to `record_reader.go`, including
span creation, event recording, and error tracking in `newRecordReader`
and endpoint goroutines. This enables detailed tracing of FlightSQL
record reading operations.
* Introduced new tracing utility functions and types in
`flightsql_tracing.go` for collecting response metadata, building trace
attributes for endpoints, and summarizing stream progress as
OpenTelemetry attributes.
**Refactoring for Tracing Integration:**
* Replaced the logger-based endpoint and stream progress attribute
builders in `logging.go` with tracing attribute builders, and removed
now-redundant logging functions.
* Updated context and cancellation handling in `record_reader.go` to use
`context.CancelCauseFunc` for improved error propagation and tracing.
**Internal API and Dependency Updates:**
* Added OpenTelemetry and internal tracing imports to relevant files to
support the new tracing features.
* Extended the `recordReaderConfig` struct to include a tracing
configuration parameter, enabling tracing to be passed through to record
readers.
---
These changes collectively provide fine-grained tracing and error
visibility for FlightSQL operations, making it easier to monitor, debug,
and analyze the driver's behavior in production environments.
Refactors slog instrumentation into OTel tracing.
- update utilities to instrument duration for a span from a given start
time.
- update utilities to separate already recorded error to avoid duplicate
events in the span
- adds a `flightsql_tracing.go` to provide tracing wrappers originally
provided in `logging.go`
- some updates in `driverbase` to handle improved trace handling
- some initial instrumentation in flightsql connection and reader
Part 1 of a multi-part change to refactor logging instrumentation into
OTel tracing.
---------
Co-authored-by: Bruce Irschick (Bit Quill Technologies Inc) <v-birschick@microsoft.com>
0 commit comments