{
  "configurations": [
    {
      "declarative_name": "general.semconv_stability.opt_in",
      "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 pools metrics for Apache DBCP.\nThe instrumentation uses `MBeanRegistration` methods for lifecycle detection, therefore it only activates if the `BasicDataSource` is registered to an `MBeanServer`. If using Spring Boot, this happens automatically as all Spring beans that support JMX registration are automatically registered by default.",
  "display_name": "Apache DBCP",
  "has_javaagent": true,
  "has_standalone_library": true,
  "javaagent_target_versions": [
    "org.apache.commons:commons-dbcp2:[2,)"
  ],
  "library_link": "https://commons.apache.org/proper/commons-dbcp/",
  "markdown_hash": "e74b2ed35478",
  "name": "apache-dbcp-2.0",
  "scope": {
    "name": "io.opentelemetry.apache-dbcp-2.0"
  },
  "semantic_conventions": [
    "DATABASE_POOL_METRICS"
  ],
  "source_path": "instrumentation/apache-dbcp-2.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"
    }
  ]
}