-
Notifications
You must be signed in to change notification settings - Fork 319
Fixed issues validating tracing pages which were converted to page iterators #3311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Fixed issues validating tracing pages which were converted to page iterators #3311
Conversation
API Change CheckAPIView identified API level changes in this PR and created the following API reviews |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes issues with tracing/instrumentation when using page iterators in the Azure SDK, particularly when converting from an ItemIterator to a PageIterator or when resuming pagination from a continuation token.
Key changes:
- Re-added span creation when converting from
Initstate with a continuation token in the pager logic - Refactored
MockSpanto properly manage span lifecycle with automatic cleanup on drop - Added test coverage for page iterator telemetry scenarios including immediate conversion and rehydration
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/core/azure_core/src/http/pager.rs | Fixed span creation logic to establish public API span when entering Init state (both initial and rehydrated); added custom Debug impl for State<C> using AsRef<str> |
| sdk/core/azure_core_test/src/tracing.rs | Refactored MockSpan into wrapper/inner pattern for proper drop semantics; added documentation for ExpectedInstrumentation fields |
| sdk/keyvault/azure_security_keyvault_secrets/tests/secret_client.rs | Added new test for page iterator telemetry; updated existing tests to use env! macros for package info; removed #[ignore] attribute from rehydration test |
| sdk/core/azure_core/src/http/mod.rs | Added Sanitizer to public exports |
| sdk/keyvault/assets.json | Updated test recording asset tag |
sdk/keyvault/azure_security_keyvault_secrets/tests/secret_client.rs
Outdated
Show resolved
Hide resolved
sdk/keyvault/azure_security_keyvault_secrets/tests/secret_client.rs
Outdated
Show resolved
Hide resolved
sdk/keyvault/azure_security_keyvault_secrets/tests/secret_client.rs
Outdated
Show resolved
Hide resolved
sdk/keyvault/azure_security_keyvault_secrets/tests/secret_client.rs
Outdated
Show resolved
Hide resolved
sdk/keyvault/azure_security_keyvault_secrets/tests/secret_client.rs
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Initstate on a continuation token;MockSpanto have it be dropped when the actual span goes out of scope (also verified that the same "end on drop" behavior occurs with an OpenTelemetrySpan).Debugrequirement for theCparameter so it can be printed successfully.ItemIteratorconverted immediately to aPageIterator.Created as Draft so it doesn't conflict with releases of various non-core crates.