File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
packages/node/src/integrations/tracing/fastify/fastify-otel Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ import {
44
44
ATTR_HTTP_ROUTE ,
45
45
ATTR_SERVICE_NAME ,
46
46
} from '@opentelemetry/semantic-conventions' ;
47
+ import * as minimatch from 'minimatch' ;
47
48
48
49
// SENTRY VENDOR NOTE
49
50
// Instead of using the package.json file, we hard code the package name and version here.
@@ -97,18 +98,12 @@ export class FastifyOtelInstrumentation extends InstrumentationBase {
97
98
throw new TypeError ( 'ignorePaths must be a string or a function' ) ;
98
99
}
99
100
100
- let globMatcher = null ;
101
+ const globMatcher = minimatch . minimatch ;
101
102
102
103
this [ kIgnorePaths ] = routeOptions => {
103
104
if ( typeof ignorePaths === 'function' ) {
104
105
return ignorePaths ( routeOptions ) ;
105
106
} else {
106
- // Using minimatch to match the path until path.matchesGlob is out of experimental
107
- // path.matchesGlob uses minimatch internally
108
- if ( globMatcher == null ) {
109
- globMatcher = require ( 'minimatch' ) . minimatch ;
110
- }
111
-
112
107
return globMatcher ( routeOptions . url , ignorePaths ) ;
113
108
}
114
109
} ;
You can’t perform that action at this time.
0 commit comments