kibana/packages/kbn-apm-config-loader
Rory Hunter f90a89a839
Allow APM env to be set via the config file (#149266)
Part of #140818.

Kibana can read APM configuration from its own config or environment
variables. For the `environment` value, it can also use the `NODE_ENV`
value. However, `NODE_ENV` is often set, and due to the way the
configuration is merged, the env vars always override the config file.
In the case of the `environment`, this makes it easy to accidentally
clobber any `environment` that you set in the config file.

Tweak the config loading so that `NODE_ENV` is only used if the
`environment` isn't set in the config.
2023-01-20 10:02:11 +00:00
..
src Allow APM env to be set via the config file (#149266) 2023-01-20 10:02:11 +00:00
index.ts Updating APM labels from kibana.yml (#144036) 2022-10-27 11:57:57 +03:00
jest.config.js Elastic License 2.0 (#90099) 2021-02-03 18:12:39 -08:00
kibana.jsonc Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
package.json Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
README.md Add the @kbn/apm-config-loader package (#77855) 2020-09-28 15:30:59 +02:00
tsconfig.json Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00

@kbn/apm-config-loader

Configuration loader for the APM instrumentation script.

This module is only meant to be used by the APM instrumentation script (src/apm.js) to load the required configuration options from the kibana.yaml configuration file with default values.

Why not just use @kbn-config?

@kbn/config is the recommended way to load and read the kibana configuration file, however in the specific case of APM, we want to only need the minimal dependencies before loading elastic-apm-node to avoid losing instrumentation on the already loaded modules.