This documentation has an index for AI agents at /llms.txt. A Markdown version of this page is available at https://explorer.opentelemetry.io/java-agent/instrumentation/elasticsearch-api-client-7.16.md.

Elasticsearch API Client

OpenTelemetry Java agent instrumentation

This instrumentation enriches Elasticsearch database client spans generated by the elasticsearch-rest-7.0 instrumentation by adding db.operation.parameter.id and db.operation.parameter.index attributes, or the deprecated db.elasticsearch.path_parts.id and db.elasticsearch.path_parts.index attributes when the old database semantic conventions are in use. It does not emit any telemetry on its own. Versions 7.17.20 and later on the 7.x line, and versions 8.10 and later, have native OpenTelemetry support.

  • Name: elasticsearch-api-client-7.16
  • Scope: io.opentelemetry.elasticsearch-api-client-7.16
  • Target versions: co.elastic.clients:elasticsearch-java:[7.16,7.17.20), co.elastic.clients:elasticsearch-java:[8.0.0,8.10)
  • Library: https://www.elastic.co/docs/reference/elasticsearch/clients/java

Telemetry

When default

Spans

Span kindAttributes
CLIENTdb.elasticsearch.path_parts.id (STRING), db.elasticsearch.path_parts.index (STRING), db.operation (STRING), db.system (STRING), http.request.method (STRING), server.address (STRING), server.port (LONG), url.full (STRING)

When otel.semconv-stability.opt-in=database

Metrics

MetricInstrumentTypeUnitDescription
db.client.operation.durationhistogramHISTOGRAMsDuration of database client operations.
MetricAttributes
db.client.operation.durationdb.operation.name (STRING), db.system.name (STRING), server.address (STRING), server.port (LONG)

Spans

Span kindAttributes
CLIENTdb.operation.name (STRING), db.operation.parameter.id (STRING), db.operation.parameter.index (STRING), db.system.name (STRING), http.request.method (STRING), server.address (STRING), server.port (LONG), url.full (STRING)

Data

  • JSON (latest): /data/javaagent/instrumentations/elasticsearch-api-client-7.16/latest.json
  • JSON (pinned): /data/javaagent/instrumentations/elasticsearch-api-client-7.16/elasticsearch-api-client-7.16-644e3bdc97dd.json
  • Explore: /java-agent/instrumentation/elasticsearch-api-client-7.16