New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@sentry/nestjs

Package Overview
Dependencies
Maintainers
0
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sentry/nestjs

Official Sentry SDK for NestJS

  • 9.3.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
195K
increased by0.42%
Maintainers
0
Weekly downloads
 
Created

What is @sentry/nestjs?

@sentry/nestjs is a package that provides integration of Sentry with NestJS applications. It allows developers to easily add error tracking and performance monitoring to their NestJS applications, helping them to identify and fix issues more efficiently.

What are @sentry/nestjs's main functionalities?

Error Tracking

This feature allows you to integrate Sentry's error tracking capabilities into your NestJS application. By providing your DSN (Data Source Name), you can automatically capture and report errors to Sentry.

import { Module } from '@nestjs/common';
import { SentryModule } from '@ntegral/nestjs-sentry';

@Module({
  imports: [
    SentryModule.forRoot({
      dsn: 'your-dsn-url',
    }),
  ],
})
export class AppModule {}

Performance Monitoring

This feature allows you to monitor the performance of your NestJS application by capturing the duration of requests and sending this information to Sentry. This can help in identifying performance bottlenecks.

import { Injectable, NestInterceptor, ExecutionContext, CallHandler } from '@nestjs/common';
import { Observable } from 'rxjs';
import { tap } from 'rxjs/operators';
import * as Sentry from '@sentry/node';

@Injectable()
export class SentryInterceptor implements NestInterceptor {
  intercept(context: ExecutionContext, next: CallHandler): Observable<any> {
    const now = Date.now();
    return next
      .handle()
      .pipe(
        tap(() => Sentry.captureMessage(`Request took ${Date.now() - now}ms`))
      );
  }
}

Other packages similar to @sentry/nestjs

FAQs

Package last updated on 28 Feb 2025

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