Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sentry/angular

Package Overview
Dependencies
Maintainers
11
Versions
382
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sentry/angular

Official Sentry SDK for Angular

  • 8.17.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
104K
decreased by-28.3%
Maintainers
11
Weekly downloads
 
Created

What is @sentry/angular?

@sentry/angular is a package that provides error tracking and performance monitoring for Angular applications. It helps developers capture and report errors, track performance issues, and gain insights into the health of their applications.

What are @sentry/angular's main functionalities?

Error Tracking

This feature allows you to capture and report errors in your Angular application. By initializing Sentry with your DSN and implementing a custom ErrorHandler, you can automatically send error reports to Sentry.

import * as Sentry from '@sentry/angular';
import { ErrorHandler } from '@angular/core';

Sentry.init({
  dsn: 'your-dsn-url',
});

export class SentryErrorHandler implements ErrorHandler {
  handleError(error) {
    Sentry.captureException(error);
    throw error;
  }
}

Performance Monitoring

This feature allows you to monitor the performance of your Angular application. By configuring Sentry with the BrowserTracing integration and setting a sample rate, you can track performance metrics and identify bottlenecks.

import * as Sentry from '@sentry/angular';

Sentry.init({
  dsn: 'your-dsn-url',
  integrations: [
    new Sentry.BrowserTracing({
      tracingOrigins: ['localhost', 'https://yourserver.io'],
      routingInstrumentation: Sentry.routingInstrumentation,
    }),
  ],
  tracesSampleRate: 1.0,
});

User Feedback

This feature allows you to collect user feedback when an error occurs. By calling the showReportDialog method with the event ID, you can prompt users to provide additional information about the error.

import * as Sentry from '@sentry/angular';

Sentry.init({
  dsn: 'your-dsn-url',
});

function captureUserFeedback(eventId) {
  Sentry.showReportDialog({
    eventId: eventId,
  });
}

Other packages similar to @sentry/angular

FAQs

Package last updated on 10 Jul 2024

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc