chore(spanner): trace server streaming queries and reads in ResultSet - #6204
chore(spanner): trace server streaming queries and reads in ResultSet#6204olavloite wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces built-in metrics and observability support for Spanner streaming operations, such as streaming SQL and streaming reads, by propagating an Observability instance and method names through transaction and result set parameters. The feedback highlights a critical issue where the disabled Observability instance from the inner Spanner client (client.spanner.o11y) is used instead of the active one from the DatabaseClient (client.o11y), which would prevent metrics from being recorded.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6204 +/- ##
==========================================
+ Coverage 96.04% 96.08% +0.04%
==========================================
Files 269 269
Lines 68390 68440 +50
==========================================
+ Hits 65686 65763 +77
+ Misses 2704 2677 -27 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
5920ee5 to
f4ee223
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request integrates observability and metrics tracking into Spanner's streaming operations. Specifically, it updates ResultSetParams to include o11y (observability) and method_name fields, allowing streaming SQL and read operations to trace their execution. The Observability struct was updated to be cloneable by wrapping its internal metrics and provider in Arc, and comprehensive unit tests were added to verify the new observability features. There are no review comments, and we have no feedback to provide.
Trace ExecuteStreamingSql and StreamingRead operation latencies across stream initialization and first result delivery.
f4ee223 to
6af98c4
Compare
Trace ExecuteStreamingSql and StreamingRead operation latencies across stream initialization and first result delivery.