Repository navigation
fix(nitro): print client ingest events to stdout - #821
Merged
Merged
Conversation
The client ingest endpoint sent accepted events only to drains, so an app without a drain returned 204 and the browser log never appeared anywhere. Write each accepted event to the console after enrichers run, matching server events, then run the drains as before.
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Contributor
|
Thank you for following the naming conventions! 🙏 |
@evlog/cli
evlog
@evlog/nuxthub
@evlog/signals
@evlog/telemetry
commit: |
This was referenced Oct 10, 2026
This branch was successfully deployed
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.
Fixes #812 (Linear EVL-532).
Problem
The client ingest endpoint (
_evlog/ingest.post.ts) accepts browser log events, runs the enrich hooks and sends the event to drains. It never writes the event to the console, unlike server events, which go throughoutputWideEvent. An app that has no drain configured therefore answers204to every client log and the event goes nowhere.Fix
After enrichers have run, the route calls the existing
outputWideEvent(wideEvent), then runs the drains as before. This is the same orderemitWideEventuses for server events, so the console carries the same event the drains receive.silent: truestill suppresses the output, andpretty/stringifyare honored.Evidence
Regression test first:
packages/evlog/test/nuxt/ingest-output.test.ts, run against the code before the fix:After the fix:
The checks ran in the sandbox on this branch. The regression is a unit test that drives the route through h3 with
useNitroAppmocked; I did not run it inside a live Nuxt app, so that end-to-end path is unverified.Not in this PR
evlog doctorwarning for apps without a drain. Those can follow if wanted.ELI5
When a website sends a log to the server, the server accepted it but only forwarded it to a log service. If the app had no such service set up, the log was thrown away silently. Now the server also prints the log to its console, the same way it does for its own logs. Nothing else changes: the log still goes to the service when one is set up.