scylladb / scylladb/cpp-rs-driver
Span tracing data isn't passed to the C logging callback
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 26
- Forks
- 19
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 7
Description
Finding: CustomLayer discards all span data.
CustomLayer (scylla-rust-wrapper/src/logging.rs:129) implements only on_event. There is no on_new_span, on_record, on_enter or on_close, so no span ever reaches the C log callback.
Consequences
- Everything the Rust driver records on
RequestSpan— partition key, token, replicas, shard, request/result size, result rows, speculative execution count — is invisible to a C/C++ application, at any log level. The cpp-driver'sCassLogMessagehas no notion of spans, so exposing this needs a deliberate design decision (flatten span fields into the event message? emit synthetic events on span open/close?). - Worse, it is not merely invisible but actively costly: with
CASS_LOG_TRACEset,trace_span!("Request", ...)becomes enabled, which makessession.rs:1826take its branch and computeget_cluster_state()+get_token_endpoints_iter()+ format every replica as"{ip}-shard{n}"into a span field — all of whichCustomLayerthen throws away.
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 with CustomLayer in scylla-rust-wrapper/src/logging.rs:129 and the RequestSpan setup at session.rs:1826, then compare the available data with the C/C++ CassLogMessage callback. Decide how span fields should be exposed and how to avoid computing data that the callback discards. Done means the chosen span behavior is documented and consistently reaches the C callback.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, cpp, rust
- Domain
- observability-sre
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100