File tree 1 file changed +11
-6
lines changed
metapackages/auto-instrumentations-node/src
1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -135,12 +135,7 @@ export type InstrumentationConfigMap = {
135
135
export function getNodeAutoInstrumentations (
136
136
inputConfigs : InstrumentationConfigMap = { }
137
137
) : Instrumentation [ ] {
138
- for ( const name of Object . keys ( inputConfigs ) ) {
139
- if ( ! Object . prototype . hasOwnProperty . call ( InstrumentationMap , name ) ) {
140
- diag . error ( `Provided instrumentation name "${ name } " not found` ) ;
141
- continue ;
142
- }
143
- }
138
+ checkManuallyProvidedInstrumentationNames ( Object . keys ( inputConfigs ) ) ;
144
139
145
140
const instrumentations : Instrumentation [ ] = [ ] ;
146
141
@@ -167,6 +162,16 @@ export function getNodeAutoInstrumentations(
167
162
return instrumentations ;
168
163
}
169
164
165
+ function checkManuallyProvidedInstrumentationNames (
166
+ manuallyProvidedInstrumentationNames : string [ ]
167
+ ) {
168
+ for ( const name of manuallyProvidedInstrumentationNames ) {
169
+ if ( ! Object . prototype . hasOwnProperty . call ( InstrumentationMap , name ) ) {
170
+ diag . error ( `Provided instrumentation name "${ name } " not found` ) ;
171
+ }
172
+ }
173
+ }
174
+
170
175
export function getResourceDetectorsFromEnv ( ) : Array < Detector | DetectorSync > {
171
176
const resourceDetectors = new Map <
172
177
string ,
You can’t perform that action at this time.
0 commit comments