mirror of
https://github.com/simonw/datasette.git
synced 2026-09-27 12:24:07 +02:00
parent
90f2f1910f
commit
8e17729ff3
14 changed files with 412 additions and 1451 deletions
|
|
@ -1,10 +1,6 @@
|
|||
"""
|
||||
Render the span reference in ``internals.rst`` from
|
||||
``datasette/telemetry_registry.py``.
|
||||
|
||||
Driven by cog, and ``cog --check docs/*.rst`` runs in CI - so adding a span
|
||||
without documenting it, or documenting one that no longer exists, is a build
|
||||
failure rather than something a reader discovers later.
|
||||
Cog helpers that render the span and metric reference in ``internals.rst``
|
||||
from ``datasette/telemetry_registry.py``.
|
||||
"""
|
||||
|
||||
|
||||
|
|
@ -32,9 +28,7 @@ def spans(cog):
|
|||
for span in SPANS:
|
||||
cog.out(f"``{span}``\n")
|
||||
cog.out(f" {span.description}\n\n")
|
||||
# INTERNAL is the default and the overwhelming majority of spans -
|
||||
# printing it on every one would be noise. Only the exceptional case,
|
||||
# a real database call, is worth calling out.
|
||||
# Only show the kind for spans that are not INTERNAL
|
||||
if span.kind != SpanKind.INTERNAL:
|
||||
cog.out(f" Kind: ``{span.kind.name}``.\n\n")
|
||||
_attribute_lines(cog, span.attributes)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue