Skip to content

feat(tracing): instrument Soroban RPC child spans- #1 - #945

Open
lekescrew22 wants to merge 2 commits into
AtomicIP:mainfrom
lekescrew22:main
Open

feat(tracing): instrument Soroban RPC child spans- #1#945
lekescrew22 wants to merge 2 commits into
AtomicIP:mainfrom
lekescrew22:main

Conversation

@lekescrew22

Copy link
Copy Markdown

Closes #857

Summary

Adds explicit child spans for Soroban RPC operations so distributed traces show the RPC hop independently from the surrounding HTTP or GraphQL request.

What changed

  • Added reusable async Soroban RPC span helpers to the tracing modules.
  • Wrapped every GraphQL Soroban RPC client call:
    • IP lookup
    • Swap lookup
    • Seller/buyer/IP swap listings
    • Dispute evidence lookup
    • Reputation lookup
  • Recorded the RPC operation, Soroban system, elapsed duration, and failure status.
  • Logged RPC errors while preserving the existing error returned to the caller.
  • Added canonical RPC attribute constants in the OpenTelemetry module.

Observability behavior

Each RPC call emits a soroban.rpc span beneath the active request span with:

  • rpc.system = stellar_soroban
  • rpc.operation = <client operation>
  • rpc.duration_ms
  • error = true when the RPC returns an error

Compatibility

  • No endpoint or response contract changes.
  • Existing RPC errors continue to propagate unchanged.
  • Cache hits do not create an RPC span because no RPC call occurs.

Validation

  • Commit created and branch pushed successfully.
  • Rust formatting/tests could not be run in this environment because cargo is not installed.

Review focus

  • Confirm the tracing subscriber/OpenTelemetry bridge exports tracing child spans as expected.
  • Run cargo fmt --all -- --check and cargo test --manifest-path api-server/Cargo.toml in CI or a Rust-enabled environment.

lekescrew22 and others added 2 commits August 28, 2026 09:39
Record Soroban RPC latency and failures as child spans beneath active request traces.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <[email protected]>
feat(tracing): instrument Soroban RPC child spans
@drips-wave

drips-wave Bot commented Aug 28, 2026

Copy link
Copy Markdown

@lekescrew22 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

Add OpenTelemetry span coverage for RPC calls

1 participant