{
  "configurations": [
    {
      "declarative_name": "general.stability_opt_in_list",
      "declarative_type": "string",
      "default": "",
      "description": "Opt-in to emit stable semantic conventions instead of the old experimental semantic conventions. Accepts a comma-separated list of semantic convention groups (e.g., `database`, `http`, `messaging`). Use `<group>/dup` to emit both old and new conventions simultaneously. Stable semantic conventions will become the default in version 3.0 of the agent.",
      "name": "otel.semconv-stability.opt-in",
      "type": "list"
    }
  ],
  "description": "This instrumentation enables database connection pool metrics for Tomcat JDBC. When no pool name is explicitly configured, the JDBC URL and connection properties are used to derive the pool name. With legacy database semantic conventions, the derived format is `server.address[:server.port][/db.namespace]`. With stable database semantic conventions, the first available value among `db.namespace`, the configured endpoint (`server.address[:server.port]`), and `db.system.name` is used. If none is available, `tomcat-jdbc` is used.",
  "display_name": "Tomcat JDBC",
  "has_javaagent": true,
  "javaagent_target_versions": [
    "org.apache.tomcat:tomcat-jdbc:[8.5.0,)"
  ],
  "library_link": "https://tomcat.apache.org/tomcat-8.5-doc/jdbc-pool.html",
  "name": "tomcat-jdbc-8.5",
  "scope": {
    "name": "io.opentelemetry.tomcat-jdbc",
    "schema_url": "https://opentelemetry.io/schemas/1.44.0"
  },
  "semantic_conventions": [
    "DATABASE_POOL_METRICS"
  ],
  "source_path": "instrumentation/tomcat/tomcat-jdbc-8.5",
  "telemetry": [
    {
      "metrics": [
        {
          "attributes": [
            {
              "name": "pool.name",
              "type": "STRING"
            }
          ],
          "data_type": "LONG_SUM",
          "description": "The maximum number of idle open connections allowed.",
          "instrument": "updowncounter",
          "name": "db.client.connections.idle.max",
          "unit": "{connections}"
        },
        {
          "attributes": [
            {
              "name": "pool.name",
              "type": "STRING"
            }
          ],
          "data_type": "LONG_SUM",
          "description": "The minimum number of idle open connections allowed.",
          "instrument": "updowncounter",
          "name": "db.client.connections.idle.min",
          "unit": "{connections}"
        },
        {
          "attributes": [
            {
              "name": "pool.name",
              "type": "STRING"
            }
          ],
          "data_type": "LONG_SUM",
          "description": "The maximum number of open connections allowed.",
          "instrument": "updowncounter",
          "name": "db.client.connections.max",
          "unit": "{connections}"
        },
        {
          "attributes": [
            {
              "name": "pool.name",
              "type": "STRING"
            }
          ],
          "data_type": "LONG_SUM",
          "description": "The number of pending requests for an open connection, cumulative for the entire pool.",
          "instrument": "updowncounter",
          "name": "db.client.connections.pending_requests",
          "unit": "{requests}"
        },
        {
          "attributes": [
            {
              "name": "pool.name",
              "type": "STRING"
            },
            {
              "name": "state",
              "type": "STRING"
            }
          ],
          "data_type": "LONG_SUM",
          "description": "The number of connections that are currently in state described by the state attribute.",
          "instrument": "updowncounter",
          "name": "db.client.connections.usage",
          "unit": "{connections}"
        }
      ],
      "when": "default"
    },
    {
      "metrics": [
        {
          "attributes": [
            {
              "name": "db.client.connection.pool.name",
              "type": "STRING"
            },
            {
              "name": "db.client.connection.state",
              "type": "STRING"
            },
            {
              "name": "db.namespace",
              "type": "STRING"
            },
            {
              "name": "db.system.name",
              "type": "STRING"
            },
            {
              "name": "server.address",
              "type": "STRING"
            },
            {
              "name": "server.port",
              "type": "LONG"
            }
          ],
          "data_type": "LONG_SUM",
          "description": "The number of connections that are currently in state described by the state attribute.",
          "instrument": "updowncounter",
          "name": "db.client.connection.count",
          "unit": "{connection}"
        },
        {
          "attributes": [
            {
              "name": "db.client.connection.pool.name",
              "type": "STRING"
            },
            {
              "name": "db.namespace",
              "type": "STRING"
            },
            {
              "name": "db.system.name",
              "type": "STRING"
            },
            {
              "name": "server.address",
              "type": "STRING"
            },
            {
              "name": "server.port",
              "type": "LONG"
            }
          ],
          "data_type": "LONG_SUM",
          "description": "The maximum number of idle open connections allowed.",
          "instrument": "updowncounter",
          "name": "db.client.connection.idle.max",
          "unit": "{connection}"
        },
        {
          "attributes": [
            {
              "name": "db.client.connection.pool.name",
              "type": "STRING"
            },
            {
              "name": "db.namespace",
              "type": "STRING"
            },
            {
              "name": "db.system.name",
              "type": "STRING"
            },
            {
              "name": "server.address",
              "type": "STRING"
            },
            {
              "name": "server.port",
              "type": "LONG"
            }
          ],
          "data_type": "LONG_SUM",
          "description": "The minimum number of idle open connections allowed.",
          "instrument": "updowncounter",
          "name": "db.client.connection.idle.min",
          "unit": "{connection}"
        },
        {
          "attributes": [
            {
              "name": "db.client.connection.pool.name",
              "type": "STRING"
            },
            {
              "name": "db.namespace",
              "type": "STRING"
            },
            {
              "name": "db.system.name",
              "type": "STRING"
            },
            {
              "name": "server.address",
              "type": "STRING"
            },
            {
              "name": "server.port",
              "type": "LONG"
            }
          ],
          "data_type": "LONG_SUM",
          "description": "The maximum number of open connections allowed.",
          "instrument": "updowncounter",
          "name": "db.client.connection.limit",
          "unit": "{connection}"
        },
        {
          "attributes": [
            {
              "name": "db.client.connection.pool.name",
              "type": "STRING"
            },
            {
              "name": "db.namespace",
              "type": "STRING"
            },
            {
              "name": "db.system.name",
              "type": "STRING"
            },
            {
              "name": "server.address",
              "type": "STRING"
            },
            {
              "name": "server.port",
              "type": "LONG"
            }
          ],
          "data_type": "LONG_SUM",
          "description": "The number of current pending requests for an open connection.",
          "instrument": "updowncounter",
          "name": "db.client.connection.pending_requests",
          "unit": "{request}"
        }
      ],
      "when": "otel.semconv-stability.opt-in=database"
    }
  ]
}