Repository navigation
feat(ui): a screen for connecting telemetry (#232) - #239
Merged
Merged
Conversation
Member
Author
|
Review fixes pushed as
Four new tests cover the first, second (https case), and last two. Verified against a local instance: rotated through the UI, and the issued token was accepted at the OTLP endpoint while the previous one was rejected 401.
|
Member
Author
|
Second round of review fixes pushed as
One thing I could not do: I wrote a test for the in-flight-GET race and it passed with and without
|
Signed in as an administrator, nothing in the product said where to send
telemetry or how to authenticate. The endpoint and token were shown once during
first-run setup and were unreachable afterwards, so anyone who liked what they
saw could not take the next step and point their own collector at it.
The capability was already there — GET /api/settings/ingest and the admin-gated
rotate endpoint have existed all along, with an audit event. What was missing
was any way to reach them.
Connect telemetry states the endpoint and the header, then gives the collector
block with this instance's own endpoint already in it and the token left as
${FANOUT_INGEST_TOKEN}, because a secret pasted into a config file is a secret
in version control. The token section says what is true — only the hash is
stored, so an existing token cannot be shown — and offers rotation behind a
confirmation that names the consequence: any collector still sending with the
old token is rejected until it is updated. The new token is revealed once.
A viewer sees the connection details and the configuration, since every role
can read ingest metadata; only an administrator sees the rotate control. An
instance with no token yet says it is rejecting telemetry and offers to issue
one, rather than showing an empty card.
Reported in #232 (P1 item 6).
Claude-Session: https://claude.ai/code/session_017ovmTezqzvxVP8P9MGDQNk
Review findings on the connect-telemetry screen, all of them cases where the
page stated something that was not so.
Rotating did not refresh the settings it had just changed. On a workspace with
no token, issuing one left the paragraph above still reading "this workspace
has no token yet, so it is rejecting telemetry", and Done returned the admin to
a filled "Issue token" button — one press away from destroying the token they
had just pasted into a collector. The response already carries the refreshed
settings; they are written back to the cache, without the plaintext, which
belongs in no cache.
Both documentation links were 404s. The docs site is in this repository under
site/, and Starlight serves that collection from the site root, so there is no
/docs prefix: the header goes to fanout.run and the ingest link to
fanout.run/start/send-telemetry, the page that carries the same collector
snippet this screen generates.
The collector block could be invalid YAML and disagreed with the documentation.
An advertised IPv6 endpoint arrives as "[2001:db8::1]:4317", which unquoted is a
flow sequence, so the endpoint is quoted. The token is referenced as
${env:FANOUT_INGEST_TOKEN}, the form the docs use and the only one that is
unambiguous when a distribution sets its own default config scheme, and the
header keeps the capitalization the field above shows.
The TLS hint was backwards. tls_configured means Fanout holds the certificate
itself, not that TLS is terminated at the edge; an advertised https endpoint
also means TLS. The exporter now gets tls.insecure only when neither is true,
and the hint says a proxy in front of Fanout may still be terminating TLS
rather than asserting plaintext.
A failed load showed a spinner beside the words "unavailable", which reads as
still working. It is an alert with a retry now. A rotation that fails leaves
its error standing over the dialog until it is reopened; Cancel and Done clear
it, and Done also drops the plaintext from the mutation cache, which otherwise
held it for the life of the tab. A rotation whose response never arrives says
so, and says the token may have been issued anyway, instead of showing the
browser's "Failed to fetch".
Four new tests: issuing stops the page offering to issue again, an https
endpoint omits tls.insecure, a failed rotation is explained and forgotten on
reopen, and a failed load offers a retry.
Claude-Session: https://claude.ai/code/session_017ovmTezqzvxVP8P9MGDQNk
Second round of review findings on the connect-telemetry screen. The environment variable in the generated block was FANOUT_INGEST_TOKEN while the documentation and the README both say INGEST_TOKEN. Following the docs and then pasting this block gave the collector an empty bearer and a 401. One name now: INGEST_TOKEN. The documentation's own collector block has the opposite problem — the otlp exporter uses TLS by default and the snippet never says so, which fails against any instance that is not behind a TLS terminator. It says so now, and points at this screen for a block with the reader's own endpoint in it. An endpoint on port 443 is treated as TLS. An operator pointing at a terminating proxy usually writes the port and not the scheme, and the page was handing them tls.insecure against a TLS port — a gRPC error that explains nothing. The plaintext token really does leave the tab now. Resetting the mutation dropped its observer but left the result in the mutation cache for another five minutes, reachable from the devtools in one step; gcTime zero takes it with the reset. A test asserts the cache no longer contains it, and fails without that option. A rotation cancels an in-flight settings load before it writes. A GET that was already on its way resolves after the POST and can write the pre-rotation answer over the refreshed one — the failure this page was just fixed for. The documentation link went to the marketing page rather than where an operator starts reading. A failed background refetch no longer replaces a page that has already loaded with a full-screen alert. Claude-Session: https://claude.ai/code/session_017ovmTezqzvxVP8P9MGDQNk
vishr
force-pushed
the
feat/connect-telemetry
branch
from
September 7, 2026 15:32
78096ec to
164022d
Compare
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.
What changed
A screen for connecting telemetry, reachable from the account menu. Closes P1 item 6 from #232.
Signed in as an administrator on the demo, nothing in the product said where to send telemetry or how to authenticate. The endpoint and token are shown once during first-run setup and are unreachable afterwards, so anyone who liked what they saw could not take the next step and point their own collector at it.
The capability was already there —
GET /api/settings/ingestand the admin-gatedPOST /api/settings/ingest/rotate-tokenhave existed all along, the latter writing aningest_key.rotatedaudit event. What was missing was any way to reach them.The page
Bearer <your token>rather than implying a token can be revealed: only the hash is stored, and the hint says so.${FANOUT_INGEST_TOKEN}, because a secret pasted into a config file is a secret in version control.tls.insecureappears only when the instance serves plaintext.Roles. Every role can read ingest metadata, so a viewer gets the endpoint and the configuration and is told an administrator handles rotation. Only an admin sees the control.
Empty state. An instance with no token says it is rejecting telemetry and offers to issue one, rather than showing a card with nothing in it.
Two other changes to the shell
The account menu carried outbound links to GitHub and the vendor site and no way to reach the workspace's own settings — the one thing an operator came there for was the one thing missing. It is account actions only now: identity, Connect telemetry, Sign out.
Documentation had no link anywhere in the product, and
fanout.runappears nowhere in this repository. Following how developer products place it — Anthropic's console keeps Docs in the top chrome beside the avatar, Rise puts a contextual "Learn more" beside the credential — there is now a book icon in the header, reachable from any page, and one contextual line at the foot of this page pointing at the ingest documentation. Both URLs live inui/links.ts.Needs your confirmation:
https://fanout.run/docsand/docs/ingestare placeholders — nothing in the repo names the real paths. Also, no link to the source repository survives in the application; for an Apache-2.0 product that may be wrong, and it is one line to restore.Verification
just checkjust test-racewhen auth, API, ingest, query, MCP, or agent paths changed — no Go paths changedFive tests cover the states: the collector block carrying the instance's endpoint and an env-var token, the confirmation appearing without rotating anything, the one-time reveal after rotation, a viewer seeing no rotate control, and the no-token instance saying it is rejecting telemetry. Rotation was also exercised against a local instance, which is how a bug was caught before review: the reveal read
tokenfrom the response where the API returnsingest_token, so it silently never appeared.