birschick-bq opened a new pull request, #4661:
URL: https://github.com/apache/arrow-adbc/pull/4661

   This pull request refactors the FlightSQL driver's statement execution and 
bulk ingest logic to improve observability by replacing custom logging with 
structured OpenTelemetry tracing. It introduces detailed span events and 
attributes for all major statement operations, ensures errors are properly 
recorded, and fingerprints queries in a privacy-preserving way. The changes 
also update key helper functions to generate OpenTelemetry attributes and clean 
up legacy logging code.
   
   **Tracing and Observability Improvements:**
   
   * All statement operations (`SetSqlQuery`, `ExecuteQuery`, `ExecuteUpdate`, 
`Prepare`, and bulk ingest) now create OpenTelemetry spans, add structured 
events/attributes, and record errors with stack traces for better traceability. 
   * Query and Substrait plan fingerprinting is now performed via new helper 
functions that generate OpenTelemetry attributes with only the query length and 
SHA-256 prefix, avoiding PII exposure. 
   * Logging via `slog` has been removed from statement execution paths in 
favor of OpenTelemetry events and attributes. 
   
   **API and Helper Updates:**
   
   * Helper functions such as `queryAttrs`, `flightInfoTracingKeyValues`, and 
correlation header attribute generators have been updated to return 
OpenTelemetry `attribute.KeyValue` slices instead of generic `any` slices. 
   * Imports have been updated to remove unused logging and add OpenTelemetry 
packages where required. 
   
   **Testing:**
   
   * Added a test to ensure that trace files are cleaned up after construction 
failures, improving test coverage for telemetry-related resource management. 
   
   Extends: https://github.com/apache/arrow-adbc/pull/4659
   Part 3/3


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to