Skip to content

Commit 0823147

Browse files
committed
inject instrumentation code via perfecto instead
1 parent fe6a369 commit 0823147

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

Extension/src/instrumentation.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -45,21 +45,6 @@ export function isInstrumentationEnabled(): boolean {
4545
return !!(global as any).instrumentation;
4646
}
4747

48-
// if the instrumentation code is not globally loaded *yet*, then load it now.
49-
if (!isInstrumentationEnabled()) {
50-
// pull the launch settings from the environment if the variable has been set.
51-
if (services.launchSettings === undefined) {
52-
services.launchSettings = process.env.PERFECTO_LAUNCH_SETTINGS ? JSON.parse(process.env.PERFECTO_LAUNCH_SETTINGS) as Record<string, any> : { tests: [], collector: undefined };
53-
}
54-
55-
// this loads the bootstrap module (global-instrumentation-support) which adds some global functions.
56-
if (services.launchSettings?.bootstrapModule) {
57-
// work around for webpack to load the bootstrap module.
58-
/* eslint no-eval: "off" */
59-
eval(`require`)(services.launchSettings.bootstrapModule);
60-
}
61-
}
62-
6348
// If the instrumentation object was *actually* loaded then we can set the services from the global object.
6449
// Having this separate ensures that this module is wired up to the global object.
6550
// It's not included in the previous block because if something else loads the instrumentation code first

0 commit comments

Comments
 (0)