fix: normalize legacy flag names in telemetry and make doctor's logs check follow the drain wiring - #549
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: db6e40a The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
3 Skipped Deployments
|
Contributor
|
Thank you for following the naming conventions! 🙏 |
commit: |
…iring a local sink The fs drain is optional: it creates its directory lazily on first write, so a wired drain is a sink before any event, and a project without one needs no local sink at all. doctor now reads the drain wiring (drain plugin or the Next factory) and the EVLOG_FS_DIR env instead of warning whenever .evlog/logs is missing.
HugoRCD
approved these changes
Aug 9, 2026
This was referenced Aug 9, 2026
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.
Two telemetry findings from production CLI data, fixed end to end.
1.
--no-headersplit across two flag keysOld CLI versions (
@evlog/cli< 0.5.0) recorded raw citty args, so the flags breakdown talliedno-headerandnoHeaderseparately, and the_positional bucket leaked through. The client sanitizer (@evlog/telemetry) has emitted a single normalized key since 0.5.0, but historical rows stay in the database as they were reported.Flag keys are now normalized in the adoption breakdown (
getAdoptionForFilter), which both the dashboard and thetelemetry-adoptionMCP tool use: kebab-case keys are camel-cased like the client does,_is dropped, and rows that collapse onto the same key/value merge their counts. This covers historical and new rows.apps/telemetry/shared/utils/adoption-shape.ts:normalizeFlagKey/normalizeFlagRowsapps/telemetry/server/utils/telemetry-queries.ts: flags breakdown goes throughnormalizeFlagRows2.
doctornever detects a logs sinkThe
logscheck passed only when.evlog/logsexisted, and the fs drain creates it lazily on first write, so every fresh setup reported "no local sink yet". The check is now driven by the drain wiring, not the filesystem:.evlog/logs) is still reported with its file count;server/plugins/evlog-drain*.tsor any plugin underserver/plugins) and the Next factory (lib/evlog.ts/src/lib/evlog.ts), or theEVLOG_FS_DIR/NUXT_EVLOG_FS_DIRenv;logscheck at all — the fs drain is optional, and doctor no longer warns about a sink nothing expects. Thecli.LOGS_SINK_MISSINGcatalog code is gone with the warning.Tests
packages/cli/test/doctor.test.ts: wired drain → sink present before the first event; no drain wiring → check omitted (both failing regression first); env-configured drain dir; empty physical sink still present; debug findings no longer emitcli.LOGS_SINK_MISSINGapps/telemetry/test/adoption-shape.test.ts: normalization merges the two spellings and drops_Checks
pnpm run lint: 22/22 tasks passpnpm run typecheck: 27/27 tasks passpnpm run test: 22/22 tasks passCloses #547