rigetti / rigetti/qcs-sdk-rust
Add unit tests for OTel context propagation on gRPC requests
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 15
- Forks
- 4
- Avg merge
- 1h 9m
- Merged PRs (30d)
- 1
Description
For context, see https://github.com/rigetti/qcs-sdk-rust/pull/544#discussion_r2010348602
Goal:
Test that the traceparent metadata on execution and translation requests is set; assert that the value contains the hex representation of the OTel context trace id from the calling Python OTel span.
How:
- We need to fuller configurability
TracingConfigurationthatTracingConfiguration::from_envoffers. Seeqcs-api-client-commonissue 109 for some potential options. - In the
test_tracing_subscribertest module, add a testtest_translation_submit_and_retrieve_grpc_trace_propagation. TheTracingConfigurationshould include thetraceparentmetadata key in the request metadata keys to ascribe as an attribute on the span. - After reading the traces from file, look up the
rpc.grpc.request.metadata.traceparentattribute on the gRPC spans; ensure that the value of this attribute contains the hex representation of the Python span's trace identifier.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in the test_tracing_subscriber test module and review TracingConfiguration::from_env, along with qcs-api-client-common issue 109 and the referenced pull-request discussion. Configure the request metadata keys, run the translation and execution request tests, and inspect the traces read from file. Done means the gRPC span's rpc.grpc.request.metadata.traceparent attribute contains the Python OTel span's trace identifier in hexadecimal.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- grpc, python, rust
- Domain
- api, observability-sre, testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100