
Security News
Potemkin Understanding in LLMs: New Study Reveals Flaws in AI Benchmarks
New research reveals that LLMs often fake understanding, passing benchmarks but failing to apply concepts or stay internally consistent.
@sentry/bun
Advanced tools
The Sentry Bun SDK is in beta. Please help us improve the SDK by reporting any issues or giving us feedback.
To use this SDK, call init(options)
as early as possible in the main entry module. This will initialize the SDK and
hook into the environment. Note that you can turn off almost all side effects using the respective options.
// CJS Syntax
const Sentry = require('@sentry/bun');
// ESM Syntax
import * as Sentry from '@sentry/bun';
Sentry.init({
dsn: '__DSN__',
// ...
});
To set context information or send manual events, use the exported functions of @sentry/bun
. Note that these functions
will not perform any action before you have called init()
:
// Set user information, as well as tags and further extras
Sentry.setExtra('battery', 0.7);
Sentry.setTag('user_mode', 'admin');
Sentry.setUser({ id: '4711' });
// Add a breadcrumb for future events
Sentry.addBreadcrumb({
message: 'My Breadcrumb',
// ...
});
// Capture exceptions, messages or manual events
Sentry.captureMessage('Hello, world!');
Sentry.captureException(new Error('Good bye'));
Sentry.captureEvent({
message: 'Manual',
stacktrace: [
// ...
],
});
It's not possible to capture unhandled exceptions, unhandled promise rejections now - Bun is working on adding support
for it. Github Issue follow this issue. To report errors to Sentry, you
have to manually try-catch and call Sentry.captureException
in the catch block.
import * as Sentry from '@sentry/bun';
try {
throw new Error('test');
} catch (e) {
Sentry.captureException(e);
}
9.34.0
feat(nuxt): Add Cloudflare Nitro plugin (#15597)
A Nitro plugin for @sentry/nuxt
which initializes Sentry when deployed to Cloudflare (cloudflare-pages
preset).
Remove the previous server config file: sentry.server.config.ts
Add a plugin in server/plugins
(e.g. server/plugins/sentry-cloudflare-setup.ts
)
Add this code in your plugin file
// server/plugins/sentry-cloudflare-setup.ts (filename does not matter)
import { sentryCloudflareNitroPlugin } from '@sentry/nuxt/module/plugins';
export default defineNitroPlugin(
sentryCloudflareNitroPlugin({
dsn: 'https://dsn',
tracesSampleRate: 1.0,
}),
);
or with access to nitroApp
:
// server/plugins/sentry-cloudflare-setup.ts (filename does not matter)
import { sentryCloudflareNitroPlugin } from '@sentry/nuxt/module/plugins';
export default defineNitroPlugin(sentryCloudflareNitroPlugin((nitroApp: NitroApp) => {
// You can access nitroApp here if needed
return ({
dsn: 'https://dsn',
tracesSampleRate: 1.0,
})
}))
FAQs
Official Sentry SDK for bun
The npm package @sentry/bun receives a total of 30,826 weekly downloads. As such, @sentry/bun popularity was classified as popular.
We found that @sentry/bun demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 10 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
New research reveals that LLMs often fake understanding, passing benchmarks but failing to apply concepts or stay internally consistent.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.