feat(o11y): track destination_id state in LroRecorder#5819
Conversation
resource_destination_id state in LroRecorder
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5819 +/- ##
=======================================
Coverage 97.89% 97.89%
=======================================
Files 226 226
Lines 57713 57713
=======================================
+ Hits 56496 56497 +1
+ Misses 1217 1216 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Code Review
This pull request refactors the LRO tracing implementation by removing the POLL_ATTEMPT_COUNT task-local variable and consolidating the active LRO span and polling attempt count into an immutable, thread-safe LroRecorder struct. It also cleans up conditional compilation attributes (#[cfg(google_cloud_unstable_tracing)]) across several files. Feedback on the changes suggests simplifying the resource_destination_id method in src/lro/src/internal/tracing.rs using the ? operator on the Option returned by ok() to make the code more concise and idiomatic.
e4a626b to
3634220
Compare
e967476 to
50fef44
Compare
b1aad1c to
8af79f6
Compare
8af79f6 to
b40da83
Compare
resource_destination_id state in LroRecorderdestination_id state in LroRecorder
Introduce a synchronized
destination_idstate togoogle_cloud_lro::LroRecorderto persist the extracted resource destination ID across polling iterations.This serves as the underlying plumbing for generated tracing decorators to inject
gcp.resource.destination.idinto LRO spans.