
Product
Introducing Rust Support in Socket
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.
@travelerdev/nestjs-sentry-graphql
Advanced tools
Provides an injectable sentry.io client to provide enterprise logging of nestjs modules with GraphQL
Provides an injectable sentry.io client to provide enterprise logging of nestjs modules using GraphQL
@travelerdev/nestjs-sentry-graphql
is an extension of @travelerdev/nestjs-sentry
, which is
itself built upon the foundation developed by
@ntegral/nestjs-sentry
.
This package implements a module, SentryModule
which when imported into your nestjs project
provides a Sentry.io client to any class that injects it. This lets Sentry.io be worked into your
dependency injection workflow without having to do any extra work outside of the initial setup.
It also implements a class, GraphqlInterceptor
, which can intercept resolver errors into Sentry.
If you do not use graphql, you should consider using @travelerdev/nestjs-sentry
instead to avoid
unnecessary dependencies.
For details getting started instructions, see @travelerdev/nestjs-sentry
npm install --save @travelerdev/nestjs-sentry-graphql @nestjs/graphql
To get started with @travelerdev/nestjs-sentry-graphql
you should add an import of
SentryModule.forRoot
to your app's root module.
import { Module } from '@nestjs-common';
import { SentryModule } from '@travelerdev/nestjs-sentry-graphql';
@Module({
imports: [
SentryModule.forRoot({
dsn: '<< your sentry_io_dsn >>',
debug: true | false,
environment: 'dev' | 'production' | 'some_environment',
release: 'some_release', | null, // must first create a release in sentry.io dashboard
logLevels: ["debug"] //based on sentry.io loglevel //
}),
],
})
export class AppModule {}
There are other instantiation methods documented in @travelerdev/nestjs-sentry
's readme.
The GraphqlInterceptor in this package can be used at the App level to intercept resolver errors and pass them up to Sentry.
Using graphql interceptor globally:
import { Module } from '@nestjs/common';
import { APP_INTERCEPTOR } from '@nestjs/core';
import { GraphqlInterceptor } from '@travelerdev/nestjs-sentry-graphql';
@Module({
....
providers: [
{
provide: APP_INTERCEPTOR,
useFactory: () => new GraphqlInterceptor(),
},
],
})
export class AppModule {}
FAQs
Provides an injectable sentry.io client to provide enterprise logging of nestjs modules with GraphQL
The npm package @travelerdev/nestjs-sentry-graphql receives a total of 2,168 weekly downloads. As such, @travelerdev/nestjs-sentry-graphql popularity was classified as popular.
We found that @travelerdev/nestjs-sentry-graphql demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.
Product
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.