docs(telemetry): use rpc_span::op::process constant in @code examples

The OTel naming check (Rule F) scans @code doc-comment examples and fails
on string-literal span names; Rule H warns on undefined SpanNames
constants. Replace the literal "subtask" and the undefined
rpc_span::op::dispatch with the defined rpc_span::op::process constant so
the examples model correct API usage.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Pratik Mankawde
2026-07-22 14:43:59 +01:00
parent 0e7ca13cf3
commit 64cea3ded4
2 changed files with 2 additions and 2 deletions

View File

@@ -73,7 +73,7 @@ namespace xrpl::telemetry {
* @code
* // With an active parent span, startSpan() inherits the parent's trace_id
* // and the SDK does NOT call GenerateTraceId(), so no PendingTraceId is used.
* // auto child = parentGuard.childSpan("subtask"); // random/parent trace_id
* // auto child = parentGuard.childSpan(rpc_span::op::process); // random/parent trace_id
* @endcode
*/
class DeterministicIdGenerator final : public opentelemetry::sdk::trace::IdGenerator

View File

@@ -497,7 +497,7 @@ public:
* TraceCategory::Rpc, rpc_span::prefix::command, commandName);
* span.setAttribute(rpc_span::attr::command, commandName);
* // childSpan parents to `span` because it is active on this thread
* auto child = span.childSpan(rpc_span::op::dispatch);
* auto child = span.childSpan(rpc_span::op::process);
* @endcode
*
* 2. Capture on this thread, hand off to another (edge case):