File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 1- import 'reflect-metadata' ;
21import type { MonitorConfig } from '@sentry/core' ;
32import { captureException , isThenable } from '@sentry/core' ;
43import * as Sentry from '@sentry/node' ;
@@ -111,10 +110,18 @@ function copyFunctionNameAndMetadata({
111110 } ) ;
112111
113112 // copy metadata
113+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
114+ // @ts -ignore - reflect-metadata of nestjs adds these methods to Reflect
114115 if ( typeof Reflect !== 'undefined' && typeof Reflect . getMetadataKeys === 'function' ) {
116+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
117+ // @ts -ignore - reflect-metadata of nestjs adds these methods to Reflect
115118 const originalMetaData = Reflect . getMetadataKeys ( originalMethod ) ;
116119 for ( const key of originalMetaData ) {
120+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
121+ // @ts -ignore - reflect-metadata of nestjs adds these methods to Reflect
117122 const value = Reflect . getMetadata ( key , originalMethod ) ;
123+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
124+ // @ts -ignore - reflect-metadata of nestjs adds these methods to Reflect
118125 Reflect . defineMetadata ( key , value , descriptor . value ) ;
119126 }
120127 }
Original file line number Diff line number Diff line change 1- import 'reflect-metadata' ;
21import type { InstrumentationConfig } from '@opentelemetry/instrumentation' ;
32import {
43 InstrumentationBase ,
@@ -84,7 +83,11 @@ export class SentryNestEventInstrumentation extends InstrumentationBase {
8483 descriptor . value = async function ( ...args : unknown [ ] ) {
8584 // When multiple @OnEvent decorators are used on a single method, we need to get all event names
8685 // from the reflector metadata as there is no information during execution which event triggered it
86+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
87+ // @ts -ignore - reflect-metadata of nestjs adds these methods to Reflect
8788 if ( Reflect . getMetadataKeys ( descriptor . value ) . includes ( 'EVENT_LISTENER_METADATA' ) ) {
89+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
90+ // @ts -ignore - reflect-metadata of nestjs adds these methods to Reflect
8891 const eventData = Reflect . getMetadata ( 'EVENT_LISTENER_METADATA' , descriptor . value ) ;
8992 if ( Array . isArray ( eventData ) ) {
9093 eventName = eventData
You can’t perform that action at this time.
0 commit comments