Add a consistency check for the SDK metrics reference - #4986
Merged
Conversation
Rename local_activity_succeeded_endtoend_latency to local_activity_succeed_endtoend_latency to match Core, Go, and Java. Fix the swapped resource_slots_cpu_usage and resource_slots_mem_usage anchors. Add Core to the four Nexus metric sections and to sticky_cache_total_forced_eviction, add Java to num_pollers, and drop the "Go and Java only" note from nexus_task, LocalActivityWorker, and NexusWorker. Remove the "in seconds" claims that contradict the units note, fix task-queue to task_queue, and drop two trailing commas.
Add break opportunities before underscores in table of contents entries, tighten the leading within an entry, and hang continuation lines.
Validate that the summary table and per-metric sections agree on anchor, type, and availability, that headings are backticked metric names, and that SDK names, metric types, emitters, and tags come from a known vocabulary. Runs on pull requests that touch the page.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📖 Docs PR preview linksThis PR does not change any pages in /docs. If you make updates, links to the modified pages will appear here. |
Duncanma
marked this pull request as draft
July 29, 2026 14:49
Duncanma
marked this pull request as ready for review
July 30, 2026 20:17
Duncanma
enabled auto-merge (squash)
July 30, 2026 20:17
lennessyy
approved these changes
Jul 30, 2026
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a CI check that validates the internal consistency of
docs/references/sdk-metrics.mdx, so the class of drift fixed in #4985 cannot silently return.The page states the same facts twice — once in the summary table, once in the per-metric section — and nothing kept them in sync. That is how the table came to link two metrics to each other's anchors and to disagree with five sections about which SDKs emit a metric.
What it checks
The tag vocabulary is a single constant checked against both the shared key list at the top of the page and each metric's own
Tagsline, so a hyphen/underscore slip in either place fails rather than merely looking inconsistent.Does it work?
Replayed against the pre-fix page from
main, it reports 14 problems — every bug found by hand during the #4985 audit except the two that were wrong consistently in both the table and the section:Scope and limits
It reads no SDK source. It cannot tell you a documented metric name is wrong — it would not have caught
local_activity_succeeded_endtoend_latency, norsticky_cache_total_forced_evictionmissing Core, because those were wrong consistently in both places. Catching those needs a scheduled diff against the SDK repos, which is a separate, more fragile piece of work worth doing next. The header comment states this so a green check is not mistaken for "verified against the SDKs."No alphabetical-ordering rule. The table is mostly sorted, but the five Nexus rows are not, so the rule would fail today and force a reorder outside this PR's scope.
Implementation notes
Follows the existing
bin/check-redirects-for-moved-pages.jspattern: exported functions, amain()that prints problems and exits non-zero, plus a colocated.test.js. Runnable locally asyarn check:metrics.The workflow needs no
yarn installsince everything is plain Node, and it runs the checker's own unit tests before the checker itself.Test plan
yarn check:metricspasses on the current page (48 metrics consistent)┆Attachments: EDU-6840 Add a consistency check for the SDK metrics reference