GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — feat(deno): Align deno with node & run integration suites with @sentry/deno by sentry-junior[bot] · Pull Request #26595 · getsentry/sentry-javascript Conversation
|
size-limit report 📦Compared: ceeb934 (PR test merge using develop at b361c10) Against: b361c10 (develop) · base run #67257 ✅ Baseline matches: this diff contains only this PR's changes.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| // `alias-sentry-deno.ts`. The suites below fail only because of that. | ||
|
|
||
| // The scenario uses an `@sentry/node` export that `@sentry/deno` does not have, such as | ||
| // `httpIntegration`, `nativeNodeFetchIntegration`, `setupExpressErrorHandler`, |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
actually let's fix some of these instead of excluding them:
I guess httpIntegration and nativeNodeFetchIntegration make sense to skip!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Updated in e379224:
setupExpressErrorHandler / setupHapiErrorHandler: @sentry/deno now re-exports setupExpressErrorHandler and expressErrorHandler from @sentry/server-utils, like Bun. The deprecated setupHapiErrorHandler wrapper moved from @sentry/node to @sentry/server-utils, like setupFastifyErrorHandler, and Node and Deno both re-export it. Node's API and deprecation are unchanged. express/handle-error and tracing/hapi now run on Deno and pass.NodeClient: two suites use it.
public-api/logs now uses Sentry.init({ defaultIntegrations: false, ... }) with the custom scope instead of new NodeClient(...). That lets it run with @sentry/bun, so I removed its Bun exclude too. It stays excluded on Deno, for a different reason: the logger of @sentry/node takes printf-style parameters (logger.info('test info with %d', [1])), and the logger of @sentry/core in @sentry/deno does not.tracing/tracer-start-active-span-error drives client.tracer, the OTel tracer that only NodeClient has. It stays excluded, in its own commented group.cron (instrumentCron, instrumentNodeCron, instrumentNodeSchedule), pinoIntegration, createSentryWinstonTransport and BullMQTelemetry only import @sentry/core and @sentry/server-utils, plus node:util for the logs. So they should work on Deno once they move to @sentry/server-utils. I suggest that as a separate follow-up PR; this one keeps them excluded.httpIntegration and nativeNodeFetchIntegration stay excluded, as you said.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| 'suites/public-api/onUnhandledRejectionIntegration/test.ts', | ||
| ]; | ||
|
|
||
| // `@sentry/deno` does not send client reports: unlike `NodeClient`, `DenoClient` never flushes the |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
can we fix this? (in a separate pr)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Opened #26604. DenoClient now sends client reports on flush(), on an unref'd interval and before exit, and init() enables sendClientReports by default. I ran it locally together with this PR: with NO_CLIENT_REPORTS removed, all of those suites pass on Deno except tracing/ignoreSpans/continued-trace-http-client, where the ignored fetch span differs. Whichever PR merges second should remove the group.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Optional E2E testsSome optional checks were not successful. They do not block the merge. 2 not successful, 56 successful. See the run.
Successful checks
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| // The test expects data that a default integration of `@sentry/node` adds and `@sentry/deno` does | ||
| // not have: process sessions, child process breadcrumbs, the `modules` of the event, the | ||
| // `node_system_error` context, and the context attributes of `nodeContextIntegration` on spans. | ||
| const NO_NODE_DEFAULT_INTEGRATION = [ |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
do these not exist on deno, or are they just not defaults?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
They don't exist on Deno: processSessionIntegration, childProcessIntegration, modulesIntegration, systemErrorIntegration and nodeContextIntegration are defined only in packages/node/src/integrations/ and exported only from @sentry/node. @sentry/deno has its own denoContextIntegration, which sets other context data, and nothing for the rest.
They import only @sentry/core, @sentry/server-utils and node: builtins (child_process via diagnostics channel, fs, os, path, util), so moving them to server-utils for Deno looks possible. I haven't checked whether Deno publishes the child_process channel or how modules would resolve without node_modules.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| // The `fetchIntegration` of `@sentry/deno` creates other spans and breadcrumbs than `@sentry/node`: | ||
| // the span origin is `auto.http.fetch`, not `auto.http.node_fetch`, the spans have fewer | ||
| // attributes, and the breadcrumb category is `fetch`, not `http`. | ||
| const FETCH_INTEGRATION_DIFFERS = [ |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
can you create an issue tracking the differences here, we should eventually align those imho
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Opened #26608 with the span attribute and breadcrumb differences, taken from local runs of these four suites on Node and Deno.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…6605) ## What `Sentry.cron` (`instrumentCron`, `instrumentNodeCron`, `instrumentNodeSchedule`), `pinoIntegration`, `createSentryWinstonTransport` and `BullMQTelemetry` move from `@sentry/node` to `@sentry/server-utils`, and `@sentry/deno` now exports them. `@sentry/node` re-exports them unchanged: same names, types, deprecations and defaults. Bun, AWS Lambda and Google Cloud Functions still get them through `@sentry/node`. Node doesn't enable any of them by default, so Deno doesn't either. ## Why The code only depends on `@sentry/core`, `@sentry/conventions`, diagnostics channels and OTel types, so nothing about it is Node-specific. The Winston transport now calls `_INTERNAL_captureLog` from core directly instead of going through Node's `logs/capture` helper, which only forwarded to it. Node's `logger` still uses that helper, so it stays. #26595 runs the shared Node integration suites with `@sentry/deno` and excludes these suites because Deno doesn't export them. They can be un-excluded there, or in a follow-up once both PRs land. The `_INTERNAL_isReadAlikeByNodeCron3` and `_INTERNAL_CronDialect` server-utils exports are removed. Only the moved cron code used them. Cloudflare re-exports server-utils integrations the same way, and `cron` and `BullMQTelemetry` could likely be exported there too. That's left for a follow-up. <!-- junior-request-attribution:start --> via @mydea. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:agent%3Ab2ab9e4a9f9fc9cac6b32725256a6c56 --> -- [View Session](https://junior-prod.sentry.dev/conversations/agent%3Ab2ab9e4a9f9fc9cac6b32725256a6c56) [[Sentry]](https://sentry.sentry.io/explore/conversations/agent%3Ab2ab9e4a9f9fc9cac6b32725256a6c56/?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 <[email protected]>
217e127 to
2e28a5c
Compare
Map `@sentry/node` to `@sentry/deno` in the Node suite files, so the Deno CI job tests the Deno SDK instead of `@sentry/node` on Deno. ES modules get the mapping from import map scopes, and CommonJS scenarios from a `Module._resolveFilename` preload, because Deno does not apply import maps to `require()`. Co-Authored-By: Francesco Gringl-Novy <[email protected]>
Re-export `setupExpressErrorHandler` and `expressErrorHandler` from `@sentry/server-utils`, and move Node's deprecated `setupHapiErrorHandler` wrapper to `@sentry/server-utils` so both SDKs share it. The Express and Hapi error handler suites now run on Deno. `public-api/logs` no longer constructs a `NodeClient`, so it now runs with `@sentry/bun`. It stays excluded on Deno, whose `logger` does not take printf-style parameters. Co-Authored-By: Francesco Gringl-Novy <[email protected]>
`Sentry.init()` reads the release from CI env vars, which `new NodeClient()` did not, so CI logs got a `sentry.release` attribute. Co-Authored-By: Francesco Gringl-Novy <[email protected]>
Co-Authored-By: Francesco Gringl-Novy <[email protected]>
|
rebase on develop and double check the list, make sure nothing can since be removed there too |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
2e28a5c to
a6c2f31
Compare
## 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 <[email protected]>
There was an error while loading. Please reload this page.
|
@mydea Rebased on develop (80a2ca4) and re-ran every excluded suite on Deno 2.8.3. 8a1ab5399e removes the ones that pass now:
Still excluded, regrouped by their actual cause now that the export exists:
Everything else still fails for the reason in its group, including |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
8a1ab53 to
a6c2f31
Compare
There was an error while loading. Please reload this page.
… spans (getsentry#26638) ## What `http.client` spans from fetch (all runtimes) and from browser XHR now have `sentry.kind: 'client'`, `url.path` and `url.scheme`, like the spans of `@sentry/node`. Fetch breadcrumbs of the server runtimes (Deno, Bun, Cloudflare, Vercel Edge) also get `http.request.method` next to `method`. The shared Node fetch suites now expect the span origin and breadcrumb category of the SDK under test, so they also run on Deno. ## Why This is the additive part of getsentry#26608, so nothing breaks. The origin (`auto.http.fetch`) and breadcrumb category (`fetch`) stay, because changing them would be breaking. The three attributes are correct in the browser too, and the fetch code is shared, so they're set everywhere instead of behind a server-only flag. XHR spans get them as well so fetch and XHR spans stay consistent. `url.path` and `url.scheme` are only set for URLs with a host, so data URLs don't get them. `http.request.method_original`, `network.peer.*` and `user_agent.original` are not added: a patched global `fetch` sees neither the connection nor the default headers, and gets the method already uppercased. Open questions: - `url.full` keeps the `#fragment` on these runtimes, where undici drops it. Should we drop it too? - Bun's fetch excludes are untouched, since getsentry#26612 reworks that list. - Browser bundles grow by a few bytes. Stacked on getsentry#26595. Refs: getsentry#26608 <!-- junior-request-attribution:start --> via @mydea. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:slack%3AD0CA8FXFXAS%3A1795090204.972289 --> -- [View Session](https://junior-prod.sentry.dev/conversations/slack%3AD0CA8FXFXAS%3A1795090204.972289) [[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AD0CA8FXFXAS%3A1795090204.972289/?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 <[email protected]>
…sentry#26640) ## What Removes the Deno `orchestrion-*` suites for amqplib, anthropic, express, generic-pool, google-genai, hapi, kafkajs, langchain, langgraph, lru-memoizer, mongo, mongoose, mysql2, openai and vercel-ai, and the synthetic `orchestrion:pg:query` test. Also removes the "included in default integrations" test from the remaining suites. ## Why Since getsentry#26595, the Node integration suites for these packages run on Deno against `@sentry/deno` with the real packages. The synthetic suites publish to the channel by hand, so they duplicate those suites with weaker checks. The default integrations tests only assert a name in a list, and the channel tests next to them already fail when an integration is missing. The suites for fastify, koa, mysql, postgresjs, graphql, tedious, aws and firebase stay until their Node suites run on Deno. Stacked on getsentry#26638. <!-- junior-request-attribution:start --> via @mydea. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:slack%3AD0CA8FXFXAS%3A1795090204.972289 --> -- [View Session](https://junior-prod.sentry.dev/conversations/slack%3AD0CA8FXFXAS%3A1795090204.972289) [[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AD0CA8FXFXAS%3A1795090204.972289/?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 <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.