
Security News
New CNAPulse Dashboard Tracks CNA Activity and Disclosure Trends
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.
@sentry/browser
Advanced tools
To use this SDK, call Sentry.init(options)
as early as possible after loading the page. This will initialize the SDK
and hook into the environment. Note that you can turn off almost all side effects using the respective options.
import * as Sentry from '@sentry/browser';
Sentry.init({
dsn: '__DSN__',
// ...
});
To set context information or send manual events, use the exported functions of @sentry/browser
. Note that these
functions will not perform any action before you have called Sentry.init()
:
import * as Sentry from '@sentry/browser';
// 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: [
// ...
],
});
10.15.0
feat(cloudflare): Add honoIntegration with error-filtering function (#17743)
This release adds a honoIntegration
to @sentry/cloudflare
, which exposes a shouldHandleError
function that lets you define which errors in onError
should be captured.
By default, Sentry captures exceptions with error.status >= 500 || error.status <= 299
.
The integration is added by default, and it's possible to modify this behavior like this:
integrations: [
honoIntegration({
shouldHandleError: (err) => true; // always capture exceptions in onError
})
]
feat(node): Add instrumentation for hono handler (#17428)
This PR enhances the Hono integration by adding comprehensive handler instrumentation, error handling capabilities.
feat(aws): Enable Lambda extension by default when using the Lamba layer (#17684)
feat(browser): Add setActiveSpanInBrowser
to set an active span in the browser (#17714)
This PR adds a feature to the browser SDKs only: Making an inactive span active. We do this to enable use cases where having a span only being active in the callback is not practical.
0
and undefined
resource timing values (#17751)@typescript-eslint/no-unnecessary-type-assertion
rule (#17728)es2020
everywhere (#17709)Work in this release was contributed by @Karibash. Thank you for your contribution!
Bugsnag provides similar error tracking and monitoring capabilities as Sentry. It offers real-time error reporting and can be used to monitor application stability. Bugsnag also provides features for error diagnostics and supports multiple platforms.
Raygun is another error monitoring service that offers crash reporting with detailed diagnostics. It supports real-time error tracking and performance monitoring, and it can be used to identify and diagnose software errors and performance issues.
Rollbar offers real-time error tracking and is similar to Sentry in its capabilities. It includes features like telemetry, person tracking, and version tracking. Rollbar provides a comprehensive dashboard for monitoring and analyzing errors.
FAQs
Official Sentry SDK for browsers
The npm package @sentry/browser receives a total of 7,325,406 weekly downloads. As such, @sentry/browser popularity was classified as popular.
We found that @sentry/browser 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
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.
Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.
Product
Add real-time Socket webhook events to your workflows to automatically receive pull request scan results and security alerts in real time.