Skip to content

Commit e9d52ea

Browse files
committed
add jsdoc
1 parent 95f6c3c commit e9d52ea

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

packages/nestjs/src/microservices.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,24 @@ import { isExpectedError } from './helpers';
88
/**
99
* Global filter to handle exceptions and report them to Sentry in nestjs microservice applications.
1010
* Extends the standard SentryGlobalFilter with RPC exception handling.
11+
*
12+
* @example
13+
* ```
14+
* import { Module } from '@nestjs/common';
15+
* import { APP_FILTER } from '@nestjs/core';
16+
* import { SentryRpcFilter } from '@sentry/nestjs/microservices';
17+
*
18+
* @Module({
19+
* providers: [
20+
* // For microservice applications this filter replaces SentryGlobalFilter
21+
* {
22+
* provide: APP_FILTER,
23+
* useClass: SentryRpcFilter,
24+
* },
25+
* ],
26+
* })
27+
* export class AppModule {}
28+
* ```
1129
*/
1230
class SentryRpcFilter extends SentryGlobalFilter {
1331
private readonly _rpcLogger: Logger;

0 commit comments

Comments
 (0)