mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
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. |
||
---|---|---|
.. | ||
src | ||
index.ts | ||
jest.config.js | ||
kibana.jsonc | ||
package.json | ||
README.md | ||
tsconfig.json |
@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.