mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-13 21:56:51 +00:00
Add check_otel_naming.py and wire it into on-pr.yml so every PR validates that span-attribute names stay consistent across the code, collector, Tempo, dashboards, and docs. - The valid key set is derived dynamically from the *SpanNames.h constants and the resource attributes the code registers in Telemetry.cpp — no hardcoded allowlist to drift. - Each rule is presence-gated: it runs only when the file it needs is in the tree, so the check is correct whether telemetry changes land in one PR or several (the collector/Tempo/dashboard/runbook layers arrive in later phases). - Rule A flags dotted span-attribute keys; Rule F flags string-literal attribute keys and span-name arguments (values may be runtime data). - stdlib-only, mirroring the levelization check (bare `python`, no pip step). - Telemetry.h / SpanGuard.h @code examples now use *SpanNames.h constants so the strict literal check passes. - CONTRIBUTING.md documents the check and how to run it locally. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>