Skip to content

feat(deno): Export logs API from Deno SDK#19313

Open
sergical wants to merge 4 commits intodevelopfrom
feat/deno-logs
Open

feat(deno): Export logs API from Deno SDK#19313
sergical wants to merge 4 commits intodevelopfrom
feat/deno-logs

Conversation

@sergical
Copy link
Member

@sergical sergical commented Feb 13, 2026

Summary

  • Re-export logger and consoleLoggingIntegration from @sentry/core in the Deno SDK
  • Add integration test verifying logger.info() produces a log envelope item with correct level and body

Test plan

  • yarn build:dev:filter @sentry/deno — builds successfully
  • cd packages/deno && yarn test — all 13 tests pass
  • eslint packages/deno/src/index.ts — no lint errors

🤖 Generated with Claude Code

Closes #19314 (added automatically)

Re-export `logger` and `consoleLoggingIntegration` from `@sentry/core`
so Deno users can use `Sentry.logger.info(...)` and capture console
calls as Sentry logs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Contributor

github-actions bot commented Feb 13, 2026

Codecov Results 📊


Generated by Codecov Action

@chargome chargome self-assigned this Feb 13, 2026
Copy link
Member

@chargome chargome left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing we will need to adapt is the flushing logic for logs for server exits. The node equivalent is process.on('beforeExit') in the node-core package

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

m: Please export the according Log and LogSeverityLevel types here too

sergical and others added 3 commits February 13, 2026 09:05
Export `Log` and `LogSeverityLevel` types from the Deno SDK. Add log
buffer flushing on server exit via `globalThis.addEventListener('unload')`
(Deno's equivalent of Node's `process.on('beforeExit')`), matching the
pattern in node-core's NodeClient. Also adds `server.address` attribute
to logs via `beforeCaptureLog` hook.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Deno tests run via Deno's native test runner, not vitest, so codecov
cannot see their coverage. Adding packages/deno/** to the codecov ignore
list prevents false coverage drops. Also gitignore deno.lock which is
generated when running deno test.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sergical sergical requested a review from chargome February 13, 2026 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(deno): Export logs API from Deno SDK

2 participants