feat: add support for APM Agent Configuration via Kibana#1197
feat: add support for APM Agent Configuration via Kibana#1197Qard merged 11 commits intoelastic:masterfrom
Conversation
|
The diff might look a bit daunting, but this is mainly due to a refactoring I had to do to ensure the The issue was that the properties There's a lot of related refactoring that can be done in the |
There was a problem hiding this comment.
I'm thinking we should also update here: https://github.com/elastic/apm-agent-nodejs/blame/837a63aca1ee7dbf10420690d748d5439d23c89c/docs/setup.asciidoc#L52
Add centralConfig as the # 1 option and link to this documentation. What do you think?
There are four ways to configure the Node.js agent. In order of precedence (higher overwrites lower):
1. APM Agent configuration via Kibana. Enabled with <<central-config>>.
2. Environment variables.
3. If calling the `apm.start()` function,
you can supply a <<agent-configuration-object,configurations object>> as the first argument.
4. Via the <<agent-configuration-file,agent configuration file>>.| ['captureExceptions', 'CAPTURE_EXCEPTIONS', true], | ||
| ['captureSpanStackTraces', 'CAPTURE_SPAN_STACK_TRACES', true], | ||
| ['captureBody', 'CAPTURE_BODY', 'off'], | ||
| ['centralConfig', 'CENTRAL_CONFIG', true], |
There was a problem hiding this comment.
This is one of two lines that I added (the diff is a little hard to read as I reordered the array to be alphabetically sorted)
| ['kubernetesPodName', 'KUBERNETES_POD_NAME'], | ||
| ['kubernetesPodUID', 'KUBERNETES_POD_UID'], | ||
| ['logLevel', 'LOG_LEVEL', 'info'], | ||
| ['metricsInterval', 'METRICS_INTERVAL', 30], |
There was a problem hiding this comment.
This is one of two lines that I added (the diff is a little hard to read as I reordered the array to be alphabetically sorted)
Depends on elastic/apm-nodejs-http-client#66
Closes #1125
Checklist