{
  "configurations": [
    {
      "declarative_name": "java.common.service_peer_mapping",
      "declarative_schema": {
        "properties": {
          "peer": {
            "description": "Host name or IP address to match against.",
            "type": "string"
          },
          "service_name": {
            "description": "Peer service name to record for matching peers.",
            "type": "string"
          }
        },
        "required": [
          "peer",
          "service_name"
        ],
        "type": "object"
      },
      "declarative_type": "structured_list",
      "default": "",
      "description": "Used to specify a mapping from host names or IP addresses to peer services.",
      "name": "otel.instrumentation.common.peer-service-mapping",
      "type": "map"
    },
    {
      "declarative_name": "java.lettuce.connection_telemetry.enabled",
      "default": false,
      "description": "Enables connection telemetry spans for Redis connections.",
      "name": "otel.instrumentation.lettuce.connection-telemetry.enabled",
      "type": "boolean"
    },
    {
      "declarative_name": "java.lettuce.experimental_span_attributes/development",
      "default": false,
      "description": "Enables experimental span attribute `lettuce.command.cancelled`.",
      "name": "otel.instrumentation.lettuce.experimental-span-attributes",
      "type": "boolean"
    }
  ],
  "description": "This instrumentation enables database client spans and database client metrics for the Lettuce Redis client.",
  "display_name": "Lettuce",
  "has_javaagent": true,
  "javaagent_target_versions": [
    "biz.paluch.redis:lettuce:[4.0.Final,)"
  ],
  "library_link": "https://github.com/redis/lettuce",
  "name": "lettuce-4.0",
  "scope": {
    "name": "io.opentelemetry.lettuce-4.0"
  },
  "semantic_conventions": [
    "DATABASE_CLIENT_SPANS",
    "DATABASE_CLIENT_METRICS"
  ],
  "source_path": "instrumentation/lettuce/lettuce-4.0",
  "telemetry": [
    {
      "spans": [
        {
          "attributes": [
            {
              "name": "db.operation",
              "type": "STRING"
            },
            {
              "name": "db.system",
              "type": "STRING"
            },
            {
              "name": "server.address",
              "type": "STRING"
            },
            {
              "name": "server.port",
              "type": "LONG"
            }
          ],
          "span_kind": "CLIENT"
        }
      ],
      "when": "default"
    },
    {
      "spans": [
        {
          "attributes": [
            {
              "name": "db.operation",
              "type": "STRING"
            },
            {
              "name": "db.system",
              "type": "STRING"
            },
            {
              "name": "peer.service",
              "type": "STRING"
            },
            {
              "name": "server.address",
              "type": "STRING"
            },
            {
              "name": "server.port",
              "type": "LONG"
            }
          ],
          "span_kind": "CLIENT"
        }
      ],
      "when": "otel.instrumentation.lettuce.connection-telemetry.enabled=true"
    },
    {
      "metrics": [
        {
          "attributes": [
            {
              "name": "db.operation.name",
              "type": "STRING"
            },
            {
              "name": "db.system.name",
              "type": "STRING"
            },
            {
              "name": "server.address",
              "type": "STRING"
            },
            {
              "name": "server.port",
              "type": "LONG"
            }
          ],
          "data_type": "HISTOGRAM",
          "description": "Duration of database client operations.",
          "instrument": "histogram",
          "name": "db.client.operation.duration",
          "unit": "s"
        }
      ],
      "spans": [
        {
          "attributes": [
            {
              "name": "db.operation.batch.size",
              "type": "LONG"
            },
            {
              "name": "db.operation.name",
              "type": "STRING"
            },
            {
              "name": "db.system.name",
              "type": "STRING"
            },
            {
              "name": "error.type",
              "type": "STRING"
            },
            {
              "name": "server.address",
              "type": "STRING"
            },
            {
              "name": "server.port",
              "type": "LONG"
            },
            {
              "name": "service.peer.name",
              "type": "STRING"
            }
          ],
          "span_kind": "CLIENT"
        }
      ],
      "when": "otel.instrumentation.lettuce.connection-telemetry.enabled=true,otel.semconv-stability.opt-in=database,service.peer"
    },
    {
      "spans": [
        {
          "attributes": [
            {
              "name": "db.operation",
              "type": "STRING"
            },
            {
              "name": "db.system",
              "type": "STRING"
            },
            {
              "name": "lettuce.command.cancelled",
              "type": "BOOLEAN"
            },
            {
              "name": "server.address",
              "type": "STRING"
            },
            {
              "name": "server.port",
              "type": "LONG"
            }
          ],
          "span_kind": "CLIENT"
        }
      ],
      "when": "otel.instrumentation.lettuce.experimental-span-attributes=true"
    },
    {
      "metrics": [
        {
          "attributes": [
            {
              "name": "db.operation.name",
              "type": "STRING"
            },
            {
              "name": "db.system.name",
              "type": "STRING"
            },
            {
              "name": "server.address",
              "type": "STRING"
            },
            {
              "name": "server.port",
              "type": "LONG"
            }
          ],
          "data_type": "HISTOGRAM",
          "description": "Duration of database client operations.",
          "instrument": "histogram",
          "name": "db.client.operation.duration",
          "unit": "s"
        }
      ],
      "spans": [
        {
          "attributes": [
            {
              "name": "db.operation.batch.size",
              "type": "LONG"
            },
            {
              "name": "db.operation.name",
              "type": "STRING"
            },
            {
              "name": "db.system.name",
              "type": "STRING"
            },
            {
              "name": "error.type",
              "type": "STRING"
            },
            {
              "name": "server.address",
              "type": "STRING"
            },
            {
              "name": "server.port",
              "type": "LONG"
            }
          ],
          "span_kind": "CLIENT"
        }
      ],
      "when": "otel.semconv-stability.opt-in=database,service.peer"
    }
  ]
}