-
Notifications
You must be signed in to change notification settings - Fork 225
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
Instrument the @elastic/elasticsearch module #968
Comments
Kibana has now been instrumented using the node APM agent. Currently, Kibana uses a the old client but is migrating to this new The ES performance team are looking to use Kibana's instrumentation data to capture the requests made to Elasticsearch. Without this auto-instrumentation, we will need to instrument Kibana ourselves as the _search and _async_search endpoints (the primary ones of interest) are already using this new client. |
This adds automatic instrumentation of the new (for a while now) Elasticsearch client for node.js. The instrumentation of the legacy "elasticsearch" package has also changed slightly to commonalize: * "span.context.destination" is set on all Elasticsearch spans, not just a subset of query-like API endpoints. * For query-like API endpoints (e.g. `/_search`), the capturing of query details on "span.context.db.statement" has changed (a) to include *both* the query params and the request body if both exist (separated by `\n\n`) and (b) to *URL encode* the query params, rather than JSON encoding. * Add _sql and _eql to set of endpoints capturing the query. Also, fix 'error.exception.module' heuristic to correctly handle @-namespaced modules. Fixes: #968 Co-authored-by: Tomas Della Vedova <delvedor@users.noreply.github.com>
The new Elasticsearch client has been moved to the
@elastic
npm namespace, so its name is now@elastic/elasticsearch
.This is a complete rewrite of the client and I therefore assume the old instrumentation code doesn't work with it. So this is essentially a new instrumentation.
The text was updated successfully, but these errors were encountered: