[8.7] Setup Node.js environment before instrumenting Kibana with APM. (#155063) (#155300)

# Backport

This will backport the following commits from `main` to `8.7`:
- [Setup Node.js environment before instrumenting Kibana with APM.
(#155063)](https://github.com/elastic/kibana/pull/155063)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Aleh
Zasypkin","email":"aleh.zasypkin@elastic.co"},"sourceCommit":{"committedDate":"2023-04-19T16:33:11Z","message":"Setup
Node.js environment before instrumenting Kibana with APM.
(#155063)","sha":"eb90e40da5f48fa8554b495ecd9b046f5f5978e3","branchLabelMapping":{"^v8.8.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["chore","release_note:skip","backport:all-open","v8.8.0"],"number":155063,"url":"https://github.com/elastic/kibana/pull/155063","mergeCommit":{"message":"Setup
Node.js environment before instrumenting Kibana with APM.
(#155063)","sha":"eb90e40da5f48fa8554b495ecd9b046f5f5978e3"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.8.0","labelRegex":"^v8.8.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/155063","number":155063,"mergeCommit":{"message":"Setup
Node.js environment before instrumenting Kibana with APM.
(#155063)","sha":"eb90e40da5f48fa8554b495ecd9b046f5f5978e3"}}]}]
BACKPORT-->

Co-authored-by: Aleh Zasypkin <aleh.zasypkin@elastic.co>
This commit is contained in:
Kibana Machine 2023-04-20 07:58:43 -04:00 committed by GitHub
parent d07697dc17
commit 4b993659b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 4 deletions

View file

@ -6,7 +6,6 @@
* Side Public License, v 1.
*/
require('@kbn/babel-register').install();
require('./apm')(process.env.ELASTIC_APM_SERVICE_NAME || 'kibana-proxy');
require('../setup_node_env');
require('./apm')(process.env.ELASTIC_APM_SERVICE_NAME || 'kibana-proxy');
require('./cli');

View file

@ -6,7 +6,7 @@
* Side Public License, v 1.
*/
require('./apm')();
require('../setup_node_env/dist');
require('./apm')();
require('../setup_node_env/root');
require('./cli');

View file

@ -17,7 +17,6 @@
"@kbn/config",
"@kbn/dev-utils",
"@kbn/apm-config-loader",
"@kbn/babel-register",
],
"exclude": [
"target/**/*",