File tree Expand file tree Collapse file tree 3 files changed +19
-5
lines changed
integrations/tracing/nest Expand file tree Collapse file tree 3 files changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -20,10 +20,26 @@ import {
2020 logger ,
2121 spanToJSON ,
2222} from '@sentry/core' ;
23- import type { ExpressRequest , FastifyRequest } from '@sentry/node' ;
2423import type { Observable } from 'rxjs' ;
2524import { isExpectedError } from './helpers' ;
2625
26+ // Partial extract of FastifyRequest interface
27+ // https://github.com/fastify/fastify/blob/87f9f20687c938828f1138f91682d568d2a31e53/types/request.d.ts#L41
28+ interface FastifyRequest {
29+ routeOptions ?: {
30+ method ?: string ;
31+ url ?: string ;
32+ } ;
33+ }
34+
35+ // Partial extract of ExpressRequest interface
36+ interface ExpressRequest {
37+ route ?: {
38+ path ?: string ;
39+ } ;
40+ method ?: string ;
41+ }
42+
2743/**
2844 * Note: We cannot use @ syntax to add the decorators, so we add them directly below the classes as function wrappers.
2945 */
Original file line number Diff line number Diff line change @@ -166,5 +166,3 @@ export type {
166166 User ,
167167 Span ,
168168} from '@sentry/core' ;
169-
170- export type { FastifyRequest , ExpressRequest } from './integrations/tracing/nest/types' ;
Original file line number Diff line number Diff line change 22
33// Partial extract of FastifyRequest interface
44// https://github.com/fastify/fastify/blob/87f9f20687c938828f1138f91682d568d2a31e53/types/request.d.ts#L41
5- export interface FastifyRequest {
5+ interface FastifyRequest {
66 routeOptions ?: {
77 method ?: string ;
88 url ?: string ;
99 } ;
1010}
1111
1212// Partial extract of ExpressRequest interface
13- export interface ExpressRequest {
13+ interface ExpressRequest {
1414 route ?: {
1515 path ?: string ;
1616 } ;
You can’t perform that action at this time.
0 commit comments