Socket
Socket
Sign inDemoInstall

@sentry/core

Package Overview
Dependencies
2
Maintainers
11
Versions
476
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @sentry/core

Base implementation for all Sentry JavaScript SDKs


Version published
Maintainers
11
Created

Package description

What is @sentry/core?

The @sentry/core package is part of the Sentry SDK for JavaScript, which is designed for real-time monitoring and tracking of application health, errors, and performance issues. It provides the core functionalities needed for initializing and configuring Sentry in your application, handling exceptions, and capturing messages and events.

What are @sentry/core's main functionalities?

Initialization and Configuration

This feature allows you to initialize Sentry in your application with your project's DSN (Data Source Name). It is the first step in integrating Sentry into your project for error tracking and performance monitoring.

Sentry.init({ dsn: 'YOUR_DSN_HERE' });

Capturing Exceptions

This feature enables you to capture exceptions in your code and send them to Sentry for monitoring and analysis. It helps in identifying and debugging errors in your application.

try { myFunction(); } catch (e) { Sentry.captureException(e); }

Capturing Messages

This feature allows you to capture custom messages or log messages in Sentry. It can be used for tracking custom events or information that is not necessarily an error.

Sentry.captureMessage('Something went wrong');

Other packages similar to @sentry/core

Changelog

Source

7.100.0

Important Changes

Deprecations

This release includes some deprecations. For more details please look at our migration guide.

The deprecation most likely to affect you is the one of BrowserTracing. Instead of new BrowserTracing(), you should now use browserTracingIntegration(), which will also handle framework-specific instrumentation out of the box for you - no need to pass a custom routingInstrumentation anymore. For @sentry/react, we expose dedicated integrations for the different react-router versions:

  • reactRouterV6BrowserTracingIntegration()
  • reactRouterV5BrowserTracingIntegration()
  • reactRouterV4BrowserTracingIntegration()
  • reactRouterV3BrowserTracingIntegration()

See the migration guide for details.

  • feat(angular): Export custom browserTracingIntegration() (#10353)
  • feat(browser): Deprecate BrowserTracing integration (#10493)
  • feat(browser): Export browserProfilingIntegration (#10438)
  • feat(bun): Export bunServerIntegration() (#10439)
  • feat(nextjs): Add browserTracingIntegration (#10397)
  • feat(react): Add reactRouterV3BrowserTracingIntegration for react router v3 (#10489)
  • feat(react): Add reactRouterV4/V5BrowserTracingIntegration for react router v4 & v5 (#10488)
  • feat(react): Add reactRouterV6BrowserTracingIntegration for react router v6 & v6.4 (#10491)
  • feat(remix): Add custom browserTracingIntegration (#10442)
  • feat(node): Expose functional integrations to replace classes (#10356)
  • feat(vercel-edge): Replace WinterCGFetch with winterCGFetchIntegration (#10436)
  • feat: Deprecate non-callback based continueTrace (#10301)
  • feat(vue): Deprecate new VueIntegration() (#10440)
  • feat(vue): Implement vue browserTracingIntegration() (#10477)
  • feat(sveltekit): Add custom browserTracingIntegration() (#10450)
Profiling Node

@sentry/profiling-node has been ported into the monorepo. Future development for it will happen here!

  • pkg(profiling-node): port profiling-node repo to monorepo (#10151)

Other Changes

  • feat: Export setHttpStatus from all packages (#10475)
  • feat(bundles): Add pluggable integrations on CDN to Sentry namespace (#10452)
  • feat(core): Pass name & attributes to tracesSampler (#10426)
  • feat(feedback): Add system-ui to start of font family (#10464)
  • feat(node-experimental): Add koa integration (#10451)
  • feat(node-experimental): Update opentelemetry packages (#10456)
  • feat(node-experimental): Update tracing integrations to functional style (#10443)
  • feat(replay): Bump rrweb to 2.10.0 (#10445)
  • feat(replay): Enforce masking of credit card fields (#10472)
  • feat(utils): Add propagationContextFromHeaders (#10313)
  • fix: Make startSpan, startSpanManual and startInactiveSpan pick up the scopes at time of creation instead of termination (#10492)
  • fix(feedback): Fix logo color when colorScheme is "system" (#10465)
  • fix(nextjs): Do not report redirects and notFound calls as errors in server actions (#10474)
  • fix(nextjs): Fix navigation tracing on app router (#10502)
  • fix(nextjs): Apply server action data to correct isolation scope (#10514)
  • fix(node): Use normal require call to import Undici (#10388)
  • ref(nextjs): Remove internally used deprecated APIs (#10453)
  • ref(vue): use startInactiveSpan in tracing mixin (#10406)

Readme

Source

Sentry

Sentry JavaScript SDK Core

npm version npm dm npm dt

General

This package contains interface definitions, base classes and utilities for building Sentry JavaScript SDKs, like @sentry/node or @sentry/browser.

Please consider all classes and exported functions and interfaces internal.

FAQs

Last updated on 06 Feb 2024

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc