rigetti / rigetti/qcs-sdk-rust

Add unit tests for OTel context propagation on gRPC requests

Open
#547 0 comments 0 reactions 0 assignees View on GitHub

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:

  1. We need to fuller configurability TracingConfiguration that TracingConfiguration::from_env offers. See qcs-api-client-common issue 109 for some potential options.
  2. In the test_tracing_subscriber test module, add a test test_translation_submit_and_retrieve_grpc_trace_propagation. The TracingConfiguration should include the traceparent metadata key in the request metadata keys to ascribe as an attribute on the span.
  3. After reading the traces from file, look up the rpc.grpc.request.metadata.traceparent attribute 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.