Unlimited services in the new APM plans! Monitor unlimited services with the new APM plans!

Elasticsearch Client Instrumentation #

Since 2.1.7

Overview #

The Elasticsearch client instrumentation will automatically create spans for requests sent using the official Java REST client.

When using the high level client, all Spans created by the instrumentation will have a name that corresponds to the request type (e.g. ListTasksRequest will be translated to “elasticsearch.list.tasks”). When using the low level client, all Spans will have a name representing the operation (e.g. “elasticsearch.sync” or “elasticsearch.async”).

The Spans will also have the following tags:

  • elasticsearch.http.endpoint: endpoint (e.g “/_cluster/health”) that you’re calling.
  • elasticsearch.http.method: http request method of the request.

The instrumentation only supports the 7.x series of the Elasticsearch Java Rest client. If you are interested in support for the 6.x series, please open an issue on Github.

Manual Installation #

In case you are not using the Kamon Bundle, add the dependency below to your build.


libraryDependencies += "io.kamon" %% "kamon-elasticsearch" % "2.2.3"



    <dependency>
      <groupId>io.kamon</groupId>
      <artifactId>kamon-elasticsearch_2.13</artifactId>
      <version>2.2.3</version>
    </dependency>


implementation 'io.kamon:kamon-elasticsearch_2.13:2.2.3'

You must start your application with the instrumentation agent for this module to work properly.