Skip to content

test(o11y): add Discovery LRO tracing success integration test#5891

Draft
haphungw wants to merge 4 commits into
googleapis:mainfrom
haphungw:fix-lro-tracing-discovery-success
Draft

test(o11y): add Discovery LRO tracing success integration test#5891
haphungw wants to merge 4 commits into
googleapis:mainfrom
haphungw:fix-lro-tracing-discovery-success

Conversation

@haphungw

Copy link
Copy Markdown
Contributor

Introduce tracing tests for success cases for Discovery-based client pollers.

Stacked on top of https://github.com/googleapis/google-cloud-rust/pull/5889.



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

Copy link
Copy Markdown
Contributor

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 introduces integration tests for Long-Running Operation (LRO) tracing within the o11y integration tests, covering successful polling, logical errors, transient and permanent RPC errors, and discovery-based LRO success. The review feedback suggests removing a redundant #[cfg(google_cloud_unstable_tracing)] attribute within tests/o11y/src/lro_tracing.rs since the entire file is already gated by this configuration at the module level.

Comment thread tests/o11y/src/lro_tracing.rs Outdated
Comment on lines +499 to +500
#[cfg(google_cloud_unstable_tracing)]
google_cloud_lro::record_polling_attributes!(&span);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The #[cfg(google_cloud_unstable_tracing)] attribute is redundant here because the entire file is already gated by #![cfg(google_cloud_unstable_tracing)] at the module level (line 15). Removing it simplifies the code and improves readability.

Suggested change
#[cfg(google_cloud_unstable_tracing)]
google_cloud_lro::record_polling_attributes!(&span);
google_cloud_lro::record_polling_attributes!(&span);

@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.89%. Comparing base (d059878) to head (4e56084).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5891   +/-   ##
=======================================
  Coverage   97.89%   97.89%           
=======================================
  Files         233      233           
  Lines       59202    59202           
=======================================
  Hits        57958    57958           
  Misses       1244     1244           

☔ 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.

@haphungw haphungw force-pushed the fix-lro-tracing-discovery-success branch from def8d91 to 43a89a6 Compare June 16, 2026 18:28
haphungw added 2 commits June 16, 2026 22:23
Add error.type attribute to the LRO Wait span and populate it from the status code if the long-running operation fails with a status code. This allows observability tools to track error rates by error type for long-running operations.
@haphungw haphungw force-pushed the fix-lro-tracing-discovery-success branch from 43a89a6 to 5fa7173 Compare June 16, 2026 22:25
@haphungw haphungw force-pushed the fix-lro-tracing-discovery-success branch from 5fa7173 to 4e56084 Compare June 16, 2026 22:43
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.

1 participant