-
Notifications
You must be signed in to change notification settings - Fork 224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add support for APM Agent Configuration via Kibana #1197
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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>>.
['captureSpanStackTraces', 'CAPTURE_SPAN_STACK_TRACES', true], | ||
['captureBody', 'CAPTURE_BODY', 'off'], | ||
['centralConfig', 'CENTRAL_CONFIG', true], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docs LGTM
Depends on elastic/apm-nodejs-http-client#66
Closes #1125
Checklist