{
  "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 DBCP.\nThe auto-instrumentation registers metrics when the connection pool is initialized (`BasicDataSource.startPoolMaintenance()`) or when `BasicDataSource.preRegister(...)` is invoked during MBean registration, whichever comes first, and unregisters them when the `BasicDataSource` is closed. JMX registration is not required. When a JMX `ObjectName` is available, its `name` property is used as the pool name; if the property is absent, the full `ObjectName` is used. Otherwise, the JDBC URL and connection properties are used to derive `server.address[:server.port][/db.namespace]`. If neither server address nor database namespace is available, `tomcat-dbcp` is used. A pool registered as an MBean after it has already started switches from the derived name to the `ObjectName`-based name.",
  "display_name": "Tomcat DBCP",
  "has_javaagent": true,
  "javaagent_target_versions": [
    "org.apache.tomcat:tomcat-dbcp:[8.0.3,)"
  ],
  "library_link": "https://tomcat.apache.org/tomcat-8.5-doc/api/org/apache/tomcat/dbcp/dbcp2/BasicDataSource.html",
  "name": "tomcat-dbcp-8.0",
  "scope": {
    "name": "io.opentelemetry.tomcat-dbcp-8.0"
  },
  "semantic_conventions": [
    "DATABASE_POOL_METRICS"
  ],
  "source_path": "instrumentation/tomcat/tomcat-dbcp-8.0",
  "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"
            },
            {
              "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"
            }
          ],
          "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"
            }
          ],
          "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"
            }
          ],
          "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"
            }
          ],
          "data_type": "LONG_SUM",
          "description": "The maximum number of open connections allowed.",
          "instrument": "updowncounter",
          "name": "db.client.connection.max",
          "unit": "{connection}"
        }
      ],
      "when": "otel.semconv-stability.opt-in=database"
    }
  ]
}