You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feature: Report statistics to a central collector #898
For example, how much are people using AuthBridge, which plugins, what is the cost savings from the cost-saving plugins.
This issue is to enable AuthBridge to report statistics to a remote endpoint, so that another tool can produce summaries of AuthBridge usage for a group or an entire organization.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. If this issue is still relevant, please comment or remove the stale label.
A content-free per-event projection of SessionEvent (~30 scalars: host, model, durationMs, the four token counts, status, client, tool/message counts), an NDJSON sink, and the ability to replay it out of the 30-day archive for backfill
Aggregation and shipping: roll those records up — "token count by hour", per-plugin usage, savings from the cost-saving plugins — and deliver them to a remote always-up endpoint
So the work here becomes aggregate + transport + the organisational questions, and stops
including "get the data out of the proxy in a usable shape." That part is #1810.
Why this way round
Two exporters reading the same events, with two schemas and two privacy reviews, is the
outcome worth avoiding. The projection is also the harder half to get right, and it is
shared: the fields this issue needs for "token count by hour" and "savings from the
cost-saving plugins" are a strict subset of #1810's Tier 1, so nothing here needs a field
that layer would not already carry.
One specific trap worth inheriting rather than rediscovering, since it bites exactly the
metric this issue asks for. Every inference request re-sends the whole conversation, so
counting ToolResults rows overcounts by ~272x on a real archive (2,765,534 raw rows
against 10,183 distinct, deduped by ToolUseID). A naive "tool error rate" comes out at
~8 per LLM call; the true figure is 3.6%. #1740 adds the per-event counts that make this a
sum rather than a dedup pass. Any aggregate built here should read those, not the slices.
What is still open on this issue, and is not in #1810
Transport and delivery semantics — endpoint config, retry, batching, what happens when
the collector is unreachable for a week.
What leaves the machine, and consent.feature: export session events for post-processing — content-free per-event projection, NDJSON sink, archive-replayable #1810's Tier 1 is content-free by construction,
which is most of the privacy argument, but two fields still need a decision before an organisational collector: httpPath can carry a secret in a path segment (its own doc
says so — a bot token or webhook path lands there verbatim), and client is a spoofable
request header, so it must not become an identity key in an org-wide report.
Whether per-developer attribution is in scope at all, which is a policy question rather
than a technical one and is the part most likely to decide whether this gets adopted.
Happy to be corrected on the boundary if you had something different in mind for this issue
— the aggregate/per-event split is the version that avoids duplicate work, but you filed it
and may have intended a narrower or broader scope.
Activity
github-actions commentedon Nov 10, 2026
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. If this issue is still relevant, please comment or remove the stale label.
mrsabath commentedon Nov 11, 2026
Still relevant — removing the stale consideration, and recording a scope decision that
makes this smaller than when it was filed.
#1810 proposes the per-event export layer this issue can consume, rather than #898
building its own collection path. The split:
SessionEvent(~30 scalars: host, model,durationMs, the four token counts, status,client, tool/message counts), an NDJSON sink, and the ability to replay it out of the 30-day archive for backfillSo the work here becomes aggregate + transport + the organisational questions, and stops
including "get the data out of the proxy in a usable shape." That part is #1810.
Why this way round
Two exporters reading the same events, with two schemas and two privacy reviews, is the
outcome worth avoiding. The projection is also the harder half to get right, and it is
shared: the fields this issue needs for "token count by hour" and "savings from the
cost-saving plugins" are a strict subset of #1810's Tier 1, so nothing here needs a field
that layer would not already carry.
One specific trap worth inheriting rather than rediscovering, since it bites exactly the
metric this issue asks for. Every inference request re-sends the whole conversation, so
counting
ToolResultsrows overcounts by ~272x on a real archive (2,765,534 raw rowsagainst 10,183 distinct, deduped by
ToolUseID). A naive "tool error rate" comes out at~8 per LLM call; the true figure is 3.6%. #1740 adds the per-event counts that make this a
sum rather than a dedup pass. Any aggregate built here should read those, not the slices.
What is still open on this issue, and is not in #1810
7dandmonthas a single bucket, so even the error rate cannot be plotted over days. Whateverthis ships should not inherit that.
the collector is unreachable for a week.
which is most of the privacy argument, but two fields still need a decision before an
organisational collector:
httpPathcan carry a secret in a path segment (its own docsays so — a bot token or webhook path lands there verbatim), and
clientis a spoofablerequest header, so it must not become an identity key in an org-wide report.
than a technical one and is the part most likely to decide whether this gets adopted.
Happy to be corrected on the boundary if you had something different in mind for this issue
— the aggregate/per-event split is the version that avoids duplicate work, but you filed it
and may have intended a narrower or broader scope.
cc @esnible @jimcadden
docs: Compare the export against context-guru's metrics spec (§8.6)
docs: Tabulate all 32 context-guru metrics against the record (§8.6)
docs: Name Context Guru directly, and lead §8.6 with the summary
The export is spread across five issues and a merged PR, with no single
docs: Spec the session event export
docs: Spec the session event export
docs: Spec the session event export (#1854)
huang195 commentedon Nov 17, 2026
@boazdavid we had this issue opened for a long time. assigning it to you. thanks for picking it up!
docs(central): Design the central metrics stack on OpenShift
feat(central): Port the central stack config from context-guru
feat(central): Require a bearer token on both receivers
feat(central): Add the base manifests
feat(central): Add the OpenShift overlay
test(central): Add the smoke test
docs(central): Document the OpenShift central stack