docs(telemetry): replace text hierarchy with ASCII box diagrams

Follow project convention (PerfLog.h, SpanGuard.h) for documentation
diagrams. Show HTTP single, HTTP batch, and WebSocket span nesting.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Pratik Mankawde
2026-04-20 14:29:32 +01:00
parent d15d2d2df6
commit 895e9167b0

View File

@@ -19,14 +19,50 @@
*
* Span hierarchy (automatic nesting via OTel thread-local context):
*
* HTTP path:
* rpc.http_request ServerHandler::processSession(Session)
* rpc.process ServerHandler::processRequest()
* rpc.command.{name} RPC::callMethod() [repeats for batch]
* HTTP JSON-RPC path (single request):
*
* WebSocket path:
* rpc.ws_message ServerHandler::processSession(WSSession)
* rpc.command.{name} RPC::callMethod()
* +-------------------------------------------------------+
* | rpc.http_request |
* | ServerHandler::processSession(Session) |
* | |
* | +--------------------------------------------------+ |
* | | rpc.process | |
* | | ServerHandler::processRequest() | |
* | | | |
* | | +---------------------------------------------+ | |
* | | | rpc.command.{name} | | |
* | | | RPC::callMethod() | | |
* | | | attrs: command, version, role, status | | |
* | | +---------------------------------------------+ | |
* | +--------------------------------------------------+ |
* +-------------------------------------------------------+
*
* HTTP batch path (multiple commands per request):
*
* +-------------------------------------------------------+
* | rpc.http_request |
* | |
* | +--------------------------------------------------+ |
* | | rpc.process | |
* | | | |
* | | +------------------+ +------------------+ | |
* | | | rpc.command.{a} | | rpc.command.{b} | ... | |
* | | +------------------+ +------------------+ | |
* | +--------------------------------------------------+ |
* +-------------------------------------------------------+
*
* WebSocket path:
*
* +-------------------------------------------------------+
* | rpc.ws_message |
* | ServerHandler::processSession(WSSession) |
* | |
* | +--------------------------------------------------+ |
* | | rpc.command.{name} | |
* | | RPC::callMethod() | |
* | | attrs: command, version, role, status | |
* | +--------------------------------------------------+ |
* +-------------------------------------------------------+
*
* Covered paths:
* - HTTP JSON-RPC (single and batch requests)
@@ -37,10 +73,10 @@
*
* Known gaps (not yet instrumented):
* - gRPC endpoints (GRPCServer.cpp) — no spans at all
* - Early validation errors in processRequest() before rpc.process span
* (malformed JSON, auth failures, oversized requests)
* - fillHandler() rejections in doCommand() before rpc.command span
* (unknown command, too busy, permission denied)
* - Early validation errors in processRequest() before rpc.process
* span (malformed JSON, auth failures, oversized requests)
* - fillHandler() rejections in doCommand() before rpc.command
* span (unknown command, too busy, permission denied)
* - WebSocket upgrade failures in onHandoff()
* - WebSocket message parse errors in onWSMessage()
* - Subscription push notifications (server-initiated, not RPC)