Repository navigation
fix(core): Flush client reports after event processing settles - #26619
Open
sentry-junior[bot] wants to merge 3 commits into
Open
sentry-junior[bot] wants to merge 3 commits into
sentry-junior[bot] wants to merge 3 commits into
Conversation
Contributor
size-limit report 📦Compared: 78ab38d (PR test merge using develop at 916e542) Against: 916e542 (develop) · base run #67226 ✅ Baseline matches: this diff contains only this PR's changes.
|
mydea
marked this pull request as ready for review
November 19, 2026 08:23
javascript-sdk-gitflow
Bot
requested review from
andreiborza,
isaacs and
timfish
November 19, 2026 08:24
Contributor
Optional E2E testsSome optional checks were not successful. They do not block the merge. 2 not successful, 58 successful. See the run.
Successful checks
|
sentry-junior
Bot
force-pushed
the
fix/flush-outcomes-after-processing
branch
from
November 19, 2026 08:37
8628d84 to
366072b
Compare
sentry-junior
Bot
changed the base branch from
develop
to
feat/deno-client-reports
November 19, 2026 08:38
sentry-junior
Bot
force-pushed
the
fix/flush-outcomes-after-processing
branch
from
November 19, 2026 08:44
ed5c566 to
98df180
Compare
mydea
force-pushed
the
fix/flush-outcomes-after-processing
branch
from
November 19, 2026 10:00
98df180 to
7e19be5
Compare
mydea
added a commit
that referenced
this pull request
Nov 20, 2026
## What `@sentry/deno` now sends client reports on an interval (`clientReportFlushInterval`, 60 seconds by default) and before the process exits. `init()` turns on `sendClientReports` by default, as `@sentry/node` does. Sending them on `flush()`/`close()` comes in #26619, stacked on this PR, which moves that into core `Client.flush` for every SDK. ## Why `DenoClient` recorded dropped events but never sent the outcomes, so Deno apps sent no client reports. This follows `NodeClient.startClientReportTracking`. The interval is unref'd, and `close()` removes it and the exit listener. This does not depend on #26595, which runs the Node integration suites with `@sentry/deno`. That PR excludes the client report suites in `NO_CLIENT_REPORTS`. Whichever PR merges second should remove that group. `tracing/ignoreSpans/continued-trace-http-client` should stay excluded because its `fetch` span differs. <!-- junior-request-attribution:start --> via @mydea. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:slack%3AD0CA8FXFXAS%3A1795075925.324589 --> -- [View Session](https://junior-prod.sentry.dev/conversations/slack%3AD0CA8FXFXAS%3A1795075925.324589) [[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AD0CA8FXFXAS%3A1795075925.324589/?project=4510944073809921) <!-- junior-session-footer:end --> --------- Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: Francesco Gringl-Novy <2411343+mydea@users.noreply.github.com>
Client.flush now sends client report outcomes after _isClientDoneProcessing, so drops recorded during async event processing are included in the flush instead of being lost on close(). The Node and Vercel Edge clients no longer flush outcomes up front. Fixes #26615 Co-Authored-By: Francesco Gringl-Novy <2411343+mydea@users.noreply.github.com>
…gnoreSpans tests Client reports are now sent after event processing settles, so on flush they arrive after the span envelope instead of before it. Co-Authored-By: Francesco Gringl-Novy <2411343+mydea@users.noreply.github.com>
Co-Authored-By: Francesco Gringl-Novy <2411343+mydea@users.noreply.github.com>
mydea
force-pushed
the
fix/flush-outcomes-after-processing
branch
from
November 20, 2026 09:14
7e19be5 to
e9cfa58
Compare
This branch has not been 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.
Stacked on #26604.
What
flush()andclose()now send client reports for events dropped while they were still processing, in every SDK. Before,captureException(err)followed byawait Sentry.close()withbeforeSendreturningnullsent no client report in Node, becausecontextLinesIntegrationprocesses the event asynchronously and the drop came after outcomes had already been flushed. For@sentry/deno, this is what makesflush()/close()send client reports at all.Why
Client.flushnow flushes outcomes after_isClientDoneProcessingand beforetransport.flush, so the Node and Vercel Edge overrides that flushed outcomes up front are gone. Onflush(), client reports now arrive after the span envelope instead of before it, so theignoreSpansintegration tests no longer depend on that order.Tradeoffs:
BrowserClienttoo (sendClientReportsdefaults totrue), so an explicitflush()/close()now also sends pending client reports, not onlyvisibilitychange. The synchronous outcome flush onvisibilitychangestays because the page may freeze beforeflush()'s timer-based wait finishes.transport.flushdrains it (network_error,ratelimit_backoff,queue_overflow) still miss that flush. Catching them needs a second outcome flush after the transport drains; that is left for a follow-up.Closes: #26615
via @mydea.
--
View Session [Sentry]