docs: source links in the Telemetry Guide; the changelog
The final review's fix: the command looks a distribution up without the working directory, so a source checkout's metadata doesn't stand in for the installed one.
Agent: done
feat(telemetry): python -m kubed.mcp.pyroscope writes and checks .pyroscope.yaml
docs(telemetry): source-link rows renumbered TEL-25 to TEL-27 after main's TEL-24, and the merge's conflict markers resolved
Merge the base's wiki into issue-100
Conflicts for its agent: superpowers/specs/telemetry.md
feat(telemetry): map an image's packages to their sources for Pyroscope
fix: a build yields to the loop and builds run one at a time, so a cold server keeps answering (#99)
A rewritten build (every prefixed key) was 1-1.5 s of synchronous CPU on
the event loop, made on a new key's first request, usually
server/discover. A reconnect burst over several gateway routes queued
one per route, and /health missed its 1 s timeout behind them.
_make now checkpoints after each skill, command and agent and after
each skill's indexes, and one anyio.Lock per Plugins, taken after the
flight is registered, makes rewritten builds one at a time in the order
asked. An unrewritten build never yields and takes no lock. A build
cancelled at a checkpoint or on the lock leaves no flight and no held
lock.
A rewritten build's skill indexes are listed in one pass per skill
(skills._skill_children) instead of a throwaway EntryOnlySkillProvider
per skill, which reloaded the manifests for every folder; the file-row
decoration is shared with the provider (_served_file), so the indexes
are byte-identical. _Renderer and _Build._renderers are gone.
A build made or waited on is a kubed.mcp.build span (TEL-24) with its
generation, prefix, outcome and counts; a kept build has none. PLUG-55
says builds yield and run in order.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent: done
Agent: done
feat(telemetry): profiles carry service_repository and service_git_ref from the build
docs(telemetry): plan source links for profiles; TEL-24 to TEL-26 proposed
fix: warm FastMCP's state store before serving, and measure GC per generation (#97)
QuickMCP's lifespan reads FastMCP's private _state_store once, after the
components start and before the server's own lifespan (APP-5 step 4), so
the beartype-instrumented key_value.aio import lands in startup instead of
on a session's first request. A FastMCP without the store, or a warm-up
that raises, is one warning on kubed.mcp.config, by type only.
With otel on, kubed.mcp._gc records cpython.gc.collections and
cpython.gc.duration per generation (TEL-23), and warns of a pass of 0.5 s
or more with the trace id of the span it stalled. The gc callback only
reads the clock and the span context and queues the pass; a task on the
loop drains the queue every second, under an empty context. It starts and
stops with OpenTelemetry, first to stop, with one last drain.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent: done
feat(telemetry): call metrics time the seven listings (#87)
_CallMetrics now records tools/list, resources/list,
resources/templates/list, prompts/list, server/discover, skills/list
and agents/list on mcp.server.operation.duration, one point per
request labelled by its method alone: no component name, cursor, URI
or prefix. skills/list and agents/list have no typed hook, so
on_request records them from a fixed set, which also keeps the
component listings and discovery from being counted twice. A changed
UsageMiddleware still warns once and passes them through (TEL-6).
TEL-16 names every method recorded.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent: done
docs: TEL-21 labels a plugin read by pattern, library and plugin; the label never pins
TEL-21 now says the plugin layer labels a read first, with the pattern
table and `kubed.plugin.library` / `kubed.plugin.name`, that the span
keeps the exact URI, and that a routing error (a missing file's) carries
none of the three. TEL-16 says a prompt render takes no plugin label.
The CHANGELOG gains its Changed line.
The whole-branch review found that the label lookup could pin a build
the request never made, so a failing view failed a read that had
succeeded (TEL-6). `Plugins._read_labels` now reads the request's
existing pin only and never pins, and the module helper it shadowed is
renamed `_labelled`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent: done
Merge main's wiki into issue-63
docs: what profiling costs, on the Telemetry Guide (#63)
A new wiki page, Telemetry Guide, gives what each signal costs a bare
server in CPU, measured with scripts/profile_cost.py: CPU sampling
takes an idle server from 1 to 5 millicores, and allocation sampling
from 1 to 2; under load the two together add about 5. It says
profile_cpu: false is the cheaper switch for an idle server, gives the
live figures seen in production, and how to measure again. pyroscope-io's
sample_rate, upload_interval and mem_heap_sample_size are measured there
too, as none of them is a setting.
Home.md and the README point to it, and the spec's Profiles section gets
one sentence after TEL-8. The script now drops an inherited CONFIG_FILE,
ends a run whose profiles did not start, and refuses the credential
options, so none can print in a row's name.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent: done
Merge the base's wiki into issue-62
docs: TEL-20 names each OTLP exporter's endpoint; the changelog (#62)
TEL-20's example line shows each OTLP exporter's endpoint, and a new
bullet says how it is resolved and shown. The changelog's line goes
under Changed, for a patch release.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent: done
fix(telemetry): a subscriptions/listen stream gets no server span
FastMCP's seam middleware opens a SERVER span around every request, so
a listen stream, which lasts as long as the client's connection, showed
as one span minutes long. _ListenUntraced runs just ahead of the seam
and puts a listen request under suppress_fastmcp_telemetry(), so the
seam opens no span while trace context still propagates. The telemetry
component installs it on every server, otel on or not, since FastMCP
traces under any tracer provider. If FastMCP's low-level server has
changed, it logs one warning and installs nothing.
TEL-22 states it, and [Unreleased] gains the Fixed line.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent: done
docs: TEL-18, TEL-19 and TEL-21 are built; the review's fixes; the changelog for rc.3
The spec rows lose (proposed) and say what the code does: the ids in a
line's text and the Loki derived field; the probe, its kinds and the
addresses it never probes; reads labelled by the template lookup alone,
a failed read with no template unlabelled, the lookup inside the
duration, and a read through the read_resource tool recorded as a call
and a read. Three lines in [Unreleased].
The whole-branch review's fixes: the probe never sends the address's
credentials to a host the agent wouldn't push to (a userinfo holding a
"/" or "\" is refused) and sends no auth for an empty userinfo; resource
reads pass through with the one warning when UsageMiddleware._record's
signature changes, not only when it's gone; the probe starts after
OpenTelemetry; an unknown scheme is an invalid address; an HTTP error's
response is closed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent: done
docs: CMP-2 to 6 and TEL-20 built; the app, config, telemetry, delivery and facade rows; README and changelog
The spec rows say what was built, the components page gains the built-ins'
tables and a component example, and [Unreleased] gains the Added lines and
the BREAKING ones. The whole-branch review's fixes come with them: run()
refuses serving keys in its options, LOG_LEVEL is read case-insensitively,
the telemetry line never shows userinfo however the address is written, a
clash with a built-in's name suggests hooking it, and the runtime masking
and cancellation paths are tested.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent: done
spec: TEL-16 stays as built; TEL-21 alone proposes resource reads
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
spec: telemetry reports itself (TEL-18 to TEL-21, proposed): trace ids in the line, push failures, a start line, resource reads
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs: FAC-11, TEL-3 and TEL-15 in the spec, and the changelog (#34)
FAC-11 states what importing kubed.mcp loads: every name in __all__ but
Telemetry and TelemetrySettings resolves on first use, so a config layer can
embed TelemetrySettings without FastMCP. TEL-3 points to it, and TEL-15 takes
Dr K's row 11 ruling on root's handlers. The telemetry design, the
OpenTelemetry plan and this plan record it. The package docstring says the
same as FAC-11, and the fresh-interpreter tests show a failing child's stderr.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent: done
docs(telemetry): the call metrics ship: TEL-16, TEL-17, PKG-22 and APP-6 (#15)
Task 4 of the plan, and the whole-branch review's fixes. TEL-16,
TEL-17 and PKG-22 lose their tag, APP-6 puts the call metrics ahead
of QuickMCP's own middleware, and the design and the plan record
what shipped. TEL-13 and TEL-17 now say that a process that set only
its own tracer provider gets no meter provider, so the call metrics
record nowhere until it sets one. The Prometheus test's scrape of
localhost never goes through a proxy, and the order test checks that
the call metrics come first.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent: done
telemetry: shut down only the providers initialize() installed (#15)
Task 3 of the plan, at Dr K's review. Before initialize(), the start
records which of the tracer, meter and logger providers the process
already set. The stop shuts down only the ones initialize() installed,
so a server's own MeterProvider keeps running, and the call metrics
record to it. A kept provider's exporter variable reads none while
initialize() runs, then goes back as it was. Otherwise a second
pipeline would run with nothing recording to it, and Prometheus's would
hold the port. TEL-13 says so.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
telemetry: record each tool call and prompt render with FastMCP's call metrics (#15)
Task 1 of the plan. With telemetry.otel on, QuickMCP puts FastMCP's
UsageMiddleware(user_id="omit") first in the server's middleware,
ahead of the call scope, so mcp.server.operation.duration records what
the client received, a transient's teardown error included. The
middleware is imported only when otel is on, and a failure to build
it is one error by type: the server serves without it.
The wiki takes #14's commit, so TEL-1 to TEL-15 read as built here
too. TEL-12 says what is done to a tag's key. The plan gains Task 3:
a provider QuickMCP didn't install is never shut down (TEL-13).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
telemetry: record each tool call and prompt render with FastMCP's call metrics (#15)
Task 1 of the plan. With telemetry.otel on, QuickMCP puts FastMCP's
UsageMiddleware(user_id="omit") first in the server's middleware,
ahead of the call scope, so mcp.server.operation.duration records what
the client received, a transient's teardown error included. The
middleware is imported only when otel is on, and a failure to build
it is one error by type: the server serves without it.
This also merges issue-12 for the dependency audit of the telemetry
extra, and brings #14's wiki commit into the wiki branch, so TEL-1 to
TEL-15 read as built here too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs: telemetry: Telemetry is satisfied by the server's own section; UsageMiddleware sees requests as sent
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs: telemetry spec (TEL-1 to TEL-17, PKG-22) and its design, all proposed
Profiles to Pyroscope through pyroscope-io, and traces and metrics through OpenTelemetry's
standard configuration, each off until a server's `telemetry` section switches it on, and none
importable without the `telemetry` extra. The design records the research, Dr K's rulings and
what is left to the builder.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>