Skip to content

test(o11y): add spanner e2e trace context propagation test#5031

Draft
haphungw wants to merge 3 commits intogoogleapis:mainfrom
haphungw:trace-propagation-e2e-test
Draft

test(o11y): add spanner e2e trace context propagation test#5031
haphungw wants to merge 3 commits intogoogleapis:mainfrom
haphungw:trace-propagation-e2e-test

Conversation

@haphungw
Copy link
Copy Markdown
Contributor

Execute live Google Cloud Trace pipeline proofs using the google-cloud-spanner dependency.
Expose the needed Spanner client methods as pub so the test can compile.

How to Run This Test Manually

If you want to verify that client-side trace spans correctly parent the Spanner backend spans, you can run this test locally against your own GCP project:

  1. Enable the required services:
gcloud services enable spanner.googleapis.com cloudtrace.googleapis.com telemetry.googleapis.com
  1. Provision a test Spanner instance and database:
gcloud spanner instances create trace-propagation-test-instance --config=regional-us-central1 --description="Test Instance" --nodes=1
gcloud spanner databases create test-database --instance=trace-propagation-test-instance
  1. Run the targeted O11y test:
export GOOGLE_CLOUD_PROJECT="$(gcloud config get project)"
env \
  GOOGLE_CLOUD_RUST_TEST_SERVICE_ACCOUNT=rust-sdk-test@${GOOGLE_CLOUD_PROJECT}.iam.gserviceaccount.com \
  GOOGLE_CLOUD_RUST_TEST_STORAGE_KMS_RING=us-central1 \
  GOOGLE_CLOUD_PROJECT=${GOOGLE_CLOUD_PROJECT} \
  GOOGLE_CLOUD_SPANNER_TEST_INSTANCE=trace-propagation-test-instance \
  GOOGLE_CLOUD_SPANNER_TEST_DATABASE=test-database \
  RUSTFLAGS="--cfg google_cloud_unstable_tracing" \
cargo test --features run-integration-tests --package integration-tests-o11y --test spanner_tracing -- --nocapture

…gration tests

Allows setting generic HTTP/gRPC headers via GOOGLE_CLOUD_TEST_EXTRA_HEADERS.
@haphungw haphungw force-pushed the trace-propagation-e2e-test branch from 02a57ff to 2b6d1cd Compare March 16, 2026 19:23
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 16, 2026

Codecov Report

❌ Patch coverage is 12.50000% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.53%. Comparing base (bf48d4f) to head (2b6d1cd).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/gax-internal/src/observability/grpc_tracing.rs 12.50% 14 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5031      +/-   ##
==========================================
- Coverage   92.66%   92.53%   -0.13%     
==========================================
  Files         226      226              
  Lines        8682     8698      +16     
==========================================
+ Hits         8045     8049       +4     
- Misses        637      649      +12     

☔ 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 trace-propagation-e2e-test branch 2 times, most recently from 6e8dffe to 2b6d1cd Compare March 16, 2026 20:00
@haphungw haphungw force-pushed the trace-propagation-e2e-test branch from 2b6d1cd to 7588bc7 Compare March 16, 2026 20:37
@haphungw
Copy link
Copy Markdown
Contributor Author

/gcbrun

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