[APM] Fix Synthtrace script (#133620)

This commit is contained in:
Søren Louv-Jansen 2022-06-08 18:24:04 +02:00 committed by GitHub
parent 56f2c1cc9e
commit 702aa29e56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 123 additions and 108 deletions

View file

@ -6,5 +6,11 @@
* Side Public License, v 1.
*/
require('../src/setup_node_env/node_version_validator');
require('@elastic/apm-synthtrace/bin/synthtrace');
require('../src/setup_node_env');
// We have to import directly from package since scenarios and worker.js are imported dynamically,
// If we import the package (require('@elastic/apm-synthtrace')) the program will be executed on the compiled files, and thus we need to
// compile scenarios with `yarn kbn bootstrap` every time scenario changes.
// eslint-disable-next-line @kbn/imports/uniform_imports
require('../packages/elastic-apm-synthtrace/src/index').runSynthtrace();