File tree Expand file tree Collapse file tree 2 files changed +4
-9
lines changed
packages/esbuild-plugin-node/src Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -26,11 +26,7 @@ import { getNodeAutoInstrumentations } from '@opentelemetry/auto-instrumentation
2626function getModuleDefinitions (
2727 instrumentation : Instrumentation
2828) : InstrumentationModuleDefinition [ ] {
29- if (
30- // 'getModuleDefinitions' in instrumentation &&
31- // typeof instrumentation.getModuleDefinitions === 'function'
32- instrumentation instanceof InstrumentationBase
33- ) {
29+ if ( instrumentation instanceof InstrumentationBase ) {
3430 return instrumentation . getModuleDefinitions ( ) ?? [ ] ;
3531 }
3632
@@ -71,7 +67,6 @@ export function getOtelPackageToInstrumentationConfig() {
7167 {
7268 oTelInstrumentationPackage :
7369 instrumentation . instrumentationName as keyof EsbuildInstrumentationConfigMap ,
74- // TODO: Do we need to worry about minification/obfuscation messing with this class name?
7570 oTelInstrumentationClass : instrumentation . constructor . name ,
7671 configGenerator,
7772 } ;
Original file line number Diff line number Diff line change @@ -42,9 +42,9 @@ export interface ModuleParams {
4242}
4343
4444type _RemoveFunctions < T > = {
45- // TODO: Mabye:
46- // [P in keyof T as T[P] extends (...args: unknown[]) => unknown ? never : P]: T[P];
47- [ P in keyof T as T [ P ] extends ( ... args : any ) => any ? never : P ] : T [ P ] ;
45+ [ P in keyof T as T [ P ] extends ( ... args : unknown [ ] ) => unknown
46+ ? never
47+ : P ] : T [ P ] ;
4848} ;
4949
5050// _RemoveFunctions does not work on optional fields, so first make the type required then apply Partial to the result
You can’t perform that action at this time.
0 commit comments