{
  "configurations": [
    {
      "declarative_name": "java.elasticsearch.experimental_span_attributes/development",
      "default": false,
      "description": "Enable the capture of `elasticsearch.action`, `elasticsearch.id`, `elasticsearch.request`, `elasticsearch.request.indices`, `elasticsearch.request.write.type`, `elasticsearch.request.write.version`, `elasticsearch.response.status`, `elasticsearch.shard.replication.failed`, `elasticsearch.shard.replication.successful`, `elasticsearch.shard.replication.total`, `elasticsearch.type`, and `elasticsearch.version` experimental span attributes.",
      "name": "otel.instrumentation.elasticsearch.experimental-span-attributes",
      "type": "boolean"
    }
  ],
  "description": "This instrumentation enables database client spans and database client metrics for Elasticsearch transport client requests. Each call produces a span named after the Elasticsearch action, enriched with transport-specific attributes.",
  "display_name": "Elasticsearch Transport Client",
  "has_javaagent": true,
  "javaagent_target_versions": [
    "org.elasticsearch.client:transport:[6.0.0,)",
    "org.elasticsearch:elasticsearch:[6.0.0,8.0.0)"
  ],
  "library_link": "https://www.elastic.co/guide/en/elasticsearch/client/java-api/",
  "name": "elasticsearch-transport-6.0",
  "scope": {
    "name": "io.opentelemetry.elasticsearch-transport-6.0"
  },
  "semantic_conventions": [
    "DATABASE_CLIENT_SPANS",
    "DATABASE_CLIENT_METRICS"
  ],
  "source_path": "instrumentation/elasticsearch/elasticsearch-transport-6.0",
  "telemetry": [
    {
      "spans": [
        {
          "attributes": [
            {
              "name": "db.operation",
              "type": "STRING"
            },
            {
              "name": "db.system",
              "type": "STRING"
            },
            {
              "name": "network.peer.address",
              "type": "STRING"
            },
            {
              "name": "network.peer.port",
              "type": "LONG"
            },
            {
              "name": "network.type",
              "type": "STRING"
            }
          ],
          "span_kind": "CLIENT"
        }
      ],
      "when": "default"
    },
    {
      "spans": [
        {
          "attributes": [
            {
              "name": "db.operation",
              "type": "STRING"
            },
            {
              "name": "db.system",
              "type": "STRING"
            },
            {
              "name": "elasticsearch.action",
              "type": "STRING"
            },
            {
              "name": "elasticsearch.id",
              "type": "STRING"
            },
            {
              "name": "elasticsearch.request",
              "type": "STRING"
            },
            {
              "name": "elasticsearch.request.indices",
              "type": "STRING"
            },
            {
              "name": "elasticsearch.request.write.type",
              "type": "STRING"
            },
            {
              "name": "elasticsearch.request.write.version",
              "type": "LONG"
            },
            {
              "name": "elasticsearch.response.status",
              "type": "LONG"
            },
            {
              "name": "elasticsearch.shard.replication.failed",
              "type": "LONG"
            },
            {
              "name": "elasticsearch.shard.replication.successful",
              "type": "LONG"
            },
            {
              "name": "elasticsearch.shard.replication.total",
              "type": "LONG"
            },
            {
              "name": "elasticsearch.type",
              "type": "STRING"
            },
            {
              "name": "elasticsearch.version",
              "type": "LONG"
            },
            {
              "name": "network.peer.address",
              "type": "STRING"
            },
            {
              "name": "network.peer.port",
              "type": "LONG"
            },
            {
              "name": "network.type",
              "type": "STRING"
            }
          ],
          "span_kind": "CLIENT"
        }
      ],
      "when": "otel.instrumentation.elasticsearch.experimental-span-attributes=true"
    },
    {
      "metrics": [
        {
          "attributes": [
            {
              "name": "db.operation.name",
              "type": "STRING"
            },
            {
              "name": "db.system.name",
              "type": "STRING"
            }
          ],
          "data_type": "HISTOGRAM",
          "description": "Duration of database client operations.",
          "instrument": "histogram",
          "name": "db.client.operation.duration",
          "unit": "s"
        }
      ],
      "spans": [
        {
          "attributes": [
            {
              "name": "db.operation.name",
              "type": "STRING"
            },
            {
              "name": "db.system.name",
              "type": "STRING"
            },
            {
              "name": "error.type",
              "type": "STRING"
            },
            {
              "name": "network.peer.address",
              "type": "STRING"
            },
            {
              "name": "network.peer.port",
              "type": "LONG"
            }
          ],
          "span_kind": "CLIENT"
        }
      ],
      "when": "otel.semconv-stability.opt-in=database"
    }
  ]
}