From 2f627e8e8e0b64e9b4dedd906b87df8eb5a7702f Mon Sep 17 00:00:00 2001 From: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com> Date: Wed, 22 Jul 2026 13:12:55 +0100 Subject: [PATCH] =?UTF-8?q?docs(telemetry):=2009-doc=20=E2=80=94=20pathfin?= =?UTF-8?q?d.request=20parents=20to=20rpc.process,=20not=20rpc.command?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reflects the C1 fix: rpc.command.* stays unscoped (its dispatch wraps doRipplePathFind which yields), so pathfind.request nests under rpc.process. The request -> compute -> discover sub-tree nests correctly via ScopedSpanGuard. Co-Authored-By: Claude Opus 4.8 (1M context) --- OpenTelemetryPlan/09-data-collection-reference.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/OpenTelemetryPlan/09-data-collection-reference.md b/OpenTelemetryPlan/09-data-collection-reference.md index 710a5a4d17..87f6e97666 100644 --- a/OpenTelemetryPlan/09-data-collection-reference.md +++ b/OpenTelemetryPlan/09-data-collection-reference.md @@ -136,12 +136,19 @@ Controlled by `trace_rpc=1` in `[telemetry]` config (pathfinding spans fire with | Span Name | Parent | Source File | Description | | --------------------- | ------------------ | ---------------- | -------------------------------------------------------- | -| `pathfind.request` | `rpc.command.*` | PathRequests.cpp | RPC entry for path_find / ripple_path_find | +| `pathfind.request` | `rpc.process` | PathFind.cpp | RPC entry for path_find (doPathFind) | | `pathfind.compute` | `pathfind.request` | PathRequest.cpp | Single path computation (doUpdate) | | `pathfind.update_all` | — | PathRequests.cpp | Async recomputation of all active path requests on close | | `pathfind.discover` | `pathfind.compute` | Pathfinder.cpp | Graph exploration phase (Pathfinder::find) | | `pathfind.rank` | `pathfind.compute` | Pathfinder.cpp | Path ranking and selection phase | +> **Note**: `pathfind.request` parents to `rpc.process`, not `rpc.command.*`. +> `rpc.command.*` is intentionally unscoped: its generic dispatch (`callMethod`) +> also wraps `doRipplePathFind`, whose span is held across a coroutine +> `yield()` — scoping it would risk a wrong-thread scope pop on resume. The +> `pathfind.request → compute → discover` sub-tree nests correctly because those +> handlers run synchronously (no yield) and use `ScopedSpanGuard`. + **Where to find**: Tempo → TraceQL: `{resource.service.name="xrpld" && name=~"pathfind.*"}` **Grafana dashboard**: _RPC & Pathfinding (StatsD)_ (`xrpld-statsd-rpc`) for StatsD timers; span-derived metrics via _RPC Performance_ (`rpc-performance`)