Skip to content

feat(o11y): remove google-cloud-unstable-tracing guards and regenerate#5292

Merged
haphungw merged 6 commits intogoogleapis:mainfrom
haphungw:remove-google-cloud-unstable-tracing-guards
Apr 13, 2026
Merged

feat(o11y): remove google-cloud-unstable-tracing guards and regenerate#5292
haphungw merged 6 commits intogoogleapis:mainfrom
haphungw:remove-google-cloud-unstable-tracing-guards

Conversation

@haphungw
Copy link
Copy Markdown
Contributor

@haphungw haphungw commented Apr 5, 2026

No description provided.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 5, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.56%. Comparing base (639a624) to head (ddab2b8).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/gax-internal/src/observability/grpc_tracing.rs 28.57% 15 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5292      +/-   ##
==========================================
- Coverage   97.58%   97.56%   -0.03%     
==========================================
  Files         222      222              
  Lines       46609    46616       +7     
==========================================
- Hits        45485    45481       -4     
- Misses       1124     1135      +11     

☔ View full report in Codecov by Sentry.
📢 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 remove-google-cloud-unstable-tracing-guards branch from c86588b to aaabb6e Compare April 5, 2026 13:12
@haphungw haphungw force-pushed the remove-google-cloud-unstable-tracing-guards branch from a1c2fd5 to 60b498d Compare April 6, 2026 12:43
@haphungw haphungw changed the title refactor(o11y): remove google-cloud-unstable-tracing guards and regenerate refactor(o11y): remove google-cloud-unstable-tracing guards and regenerate Apr 6, 2026
@haphungw haphungw force-pushed the remove-google-cloud-unstable-tracing-guards branch 4 times, most recently from 134dd05 to 98362b5 Compare April 7, 2026 07:13
haphungw added a commit that referenced this pull request Apr 7, 2026
Restore the test to use `#[tokio::test(flavor = "multi_thread",
worker_threads = 2)]` so the background server can run on a separate
thread.

I made a mistake when applying `#[tokio::test(flavor = "current_thread",
start_paused = true)]` to `grpc_client_request_success`. This failed
because:
1.  This test does not contain any sleeps to optimize.
2. It starts a background gRPC server, which deadlocks on a single
thread when the client waits for a response.

This surfaces in #5292 when the `unstable_tracing` guards are removed.
@haphungw haphungw force-pushed the remove-google-cloud-unstable-tracing-guards branch 3 times, most recently from 706eb09 to 8accedb Compare April 7, 2026 20:57
haphungw added a commit that referenced this pull request Apr 7, 2026
Add missing feature guards within `gax-internal` for isolation between
HTTP and gRPC transport layers.

Essentially fix build error for #5292.
haphungw added a commit that referenced this pull request Apr 7, 2026
Fix a `gcb-pr-minimal-versions` build failure in
`google-cloud-gax-internal` tests caused by `h2` version `0.4.2`, which
surfaces after `google_cloud_unstable_tracing` guards are removed in
#5292.

The Problem
During minimal-versions checks, `h2` resolves to `0.4.2`, which somehow
leads to deadlocks or missing tracing spans in our gRPC tests.

Previous Attempts
I tried switching tests to `multi_thread` (PR #5308), which masked the
issue but was not a good solution.
I tried forcing the version in the root `[workspace.dependencies]`, but
`Cargo` ignored it during the isolated package build for `gax-internal`.

The Fix
Add `h2 = "0.4.13"` as a direct dependency in
`src/gax-internal/Cargo.toml`. `0.4.13` is the version resolved in our
normal Cargo.lock.
@haphungw haphungw force-pushed the remove-google-cloud-unstable-tracing-guards branch 2 times, most recently from 2ad970b to f368b85 Compare April 13, 2026 12:35
@haphungw haphungw changed the title refactor(o11y): remove google-cloud-unstable-tracing guards and regenerate feat(o11y): remove google-cloud-unstable-tracing guards and regenerate Apr 13, 2026
@haphungw haphungw force-pushed the remove-google-cloud-unstable-tracing-guards branch from f368b85 to c80a9d7 Compare April 13, 2026 13:19
haphungw added a commit to googleapis/librarian that referenced this pull request Apr 13, 2026
…5103)

Remove `google_cloud_unstable_tracing` conditional compilation guards
from the Rust templates. This makes tracing unconditionally available in
the generated code, subject to runtime configuration via
`gaxi::options::tracing_enabled`.

This change prepares for the removal of the unstable feature flag in
`google-cloud-rust`:
[google-cloud-rust/pull/5292](googleapis/google-cloud-rust#5292)
@haphungw haphungw force-pushed the remove-google-cloud-unstable-tracing-guards branch 2 times, most recently from 307790b to acbf08c Compare April 13, 2026 16:16
@haphungw haphungw force-pushed the remove-google-cloud-unstable-tracing-guards branch from acbf08c to 307790b Compare April 13, 2026 16:54
@haphungw haphungw force-pushed the remove-google-cloud-unstable-tracing-guards branch from 307790b to f6a03af Compare April 13, 2026 16:58
@haphungw haphungw marked this pull request as ready for review April 13, 2026 17:21
@haphungw haphungw requested review from a team as code owners April 13, 2026 17:21
Copy link
Copy Markdown
Contributor

@coryan coryan left a comment

Choose a reason for hiding this comment

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

I am missing some large portions of the old code, help?

Comment thread src/bigquery/src/generated/gapic_storage/tracing.rs
Comment thread src/bigquery/src/generated/gapic_storage/tracing.rs
Comment thread src/firestore/src/generated/gapic/tracing.rs
Comment thread src/gax-internal/src/grpc.rs
Comment thread src/gax-internal/src/grpc.rs
@haphungw haphungw merged commit 4b687e0 into googleapis:main Apr 13, 2026
35 checks passed
haphungw added a commit to googleapis/librarian that referenced this pull request Apr 13, 2026
Remove the redundant braces from the `tracing.rs.mustache` template
googleapis/google-cloud-rust#5292, left behind
during the removal of `google_cloud_unstable_tracing` guards in
#5103.
haphungw added a commit that referenced this pull request Apr 14, 2026
Add a new integration test `grpc_transport_observability.rs` to verify
that transport-level metrics, spans, and logs are correctly emitted.

The test uses an in-memory collector to verify:
- `gcp.client.attempt.duration` metric is recorded.
- Transport span is created with `Error` status on failure.
- Actionable error log is emitted with correct trace correlation.

This test aims at increase coverage for transport-level signals, which
were missed @ commit
[f6a03af](#5292 (comment))
@haphungw haphungw deleted the remove-google-cloud-unstable-tracing-guards branch April 15, 2026 21:26
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