Skip to content
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

Switch to APM-based solution for the execution context tracing on the server-side #101627

Closed
mshustov opened this issue Jun 8, 2021 · 3 comments
Labels
Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc

Comments

@mshustov
Copy link
Contributor

mshustov commented Jun 8, 2021

Requires:

Once the APM nodejs client can work without the APM server running, Kibana can start using the APM-based solution for the server-side context tracing to leverage the transaction mechanism.
It will allow us to complement the data provided by the APM agent (time spent on every transaction, execution logs, etc.) for the users enabling APM on their clusters.

Since we are going to rely on the APM agent by default, we should adjust its default settings (by @trentm #97934 (comment))

Minimizing overhead: Using the APM agent for Kibana back-end async context
tracking like this will have some more overhead than a custom tracker that uses
Async Local Storage. There are somethings that could be done to minimize that:

Add support for explicitly disabling sending to APM server, which will save on time spent serializing those events.
turn off metrics, breakdown metrics, any stacktrace collection
tweak disableInstrumentations to limit it to just http, elasticsearch, hapi
Look into a Async Local Storage-based context manager for the APM agent. It should eventually grow one.

@mshustov mshustov added the Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc label Jun 8, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

@trentm
Copy link
Member

trentm commented Jun 8, 2021

tweak disableInstrumentations to limit it to just http, elasticsearch, hapi

FWIW, I don't know that this will make much of a difference. The elastic/apm-agent-nodejs#2028 work suggested that captureSpanStackTraces: false and transactionSampleRate were far and away the major important APM agent config changes to make (and are currently the defaults in Kibana's APM agent config).

@mshustov
Copy link
Contributor Author

closing as the initial implementation is going to use APM nodejs agent from the very beginning #101587

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Projects
None yet
Development

No branches or pull requests

3 participants