Skip to content

feat(o11y): track destination_id state in LroRecorder#5819

Merged
haphungw merged 2 commits into
googleapis:mainfrom
haphungw:fix-lro-tracing-done
Jun 11, 2026
Merged

feat(o11y): track destination_id state in LroRecorder#5819
haphungw merged 2 commits into
googleapis:mainfrom
haphungw:fix-lro-tracing-done

Conversation

@haphungw

@haphungw haphungw commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Introduce a synchronized destination_id state to google_cloud_lro::LroRecorder to persist the extracted resource destination ID across polling iterations.

This serves as the underlying plumbing for generated tracing decorators to inject gcp.resource.destination.id into LRO spans.

@haphungw haphungw changed the title feat(o11y): track resource_destination_id state in LroRecorder feat(o11y): track resource_destination_id state in LroRecorder Jun 2, 2026
@codecov

codecov Bot commented Jun 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.89%. Comparing base (1059b90) to head (8af79f6).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/lro/src/internal/tracing.rs Outdated
@haphungw haphungw force-pushed the fix-lro-tracing-done branch 2 times, most recently from e4a626b to 3634220 Compare June 2, 2026 23:39
Comment thread src/lro/src/internal/tracing.rs Outdated
@haphungw haphungw force-pushed the fix-lro-tracing-done branch from e967476 to 50fef44 Compare June 3, 2026 19:34
@haphungw haphungw marked this pull request as ready for review June 3, 2026 19:50
@haphungw haphungw requested a review from a team as a code owner June 3, 2026 19:50
@haphungw haphungw force-pushed the fix-lro-tracing-done branch from b1aad1c to 8af79f6 Compare June 4, 2026 18:44
@haphungw haphungw force-pushed the fix-lro-tracing-done branch from 8af79f6 to b40da83 Compare June 11, 2026 19:37
@haphungw haphungw changed the title feat(o11y): track resource_destination_id state in LroRecorder feat(o11y): track destination_id state in LroRecorder Jun 11, 2026
@haphungw haphungw merged commit 6ee985d into googleapis:main Jun 11, 2026
52 checks passed
@haphungw haphungw deleted the fix-lro-tracing-done branch June 11, 2026 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants