{
  "configurations": [
    {
      "declarative_name": "java.common.db.query_sanitization.enabled",
      "default": true,
      "description": "Enables query sanitization for database queries.",
      "name": "otel.instrumentation.common.db.query-sanitization.enabled",
      "type": "boolean"
    },
    {
      "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.jdbc_datasource.enabled",
      "default": false,
      "description": "Enables instrumentation of JDBC datasource connections.",
      "name": "otel.instrumentation.jdbc-datasource.enabled",
      "type": "boolean"
    },
    {
      "declarative_name": "java.jdbc.capture_query_parameters/development",
      "default": false,
      "description": "Sets whether the query parameters should be captured as span attributes named <code>db.query.parameter.&lt;key&gt;</code>. Enabling this option disables the statement sanitization.<p>WARNING: captured query parameters may contain sensitive information such as passwords, personally identifiable information or protected health info.",
      "name": "otel.instrumentation.jdbc.experimental.capture-query-parameters",
      "type": "boolean"
    },
    {
      "declarative_name": "java.jdbc.sqlcommenter/development.enabled",
      "default": false,
      "description": "Enables augmenting queries with a comment containing the tracing information. See [sqlcommenter](https://google.github.io/sqlcommenter/) for more info. WARNING: augmenting queries with tracing context will make query texts unique, which may have adverse impact on database performance. Consult with database experts before enabling.",
      "name": "otel.instrumentation.jdbc.experimental.sqlcommenter.enabled",
      "type": "boolean"
    },
    {
      "declarative_name": "java.jdbc.transaction/development.enabled",
      "default": false,
      "description": "Enables experimental instrumentation to create spans for COMMIT and ROLLBACK operations.",
      "name": "otel.instrumentation.jdbc.experimental.transaction.enabled",
      "type": "boolean"
    },
    {
      "declarative_name": "java.jdbc.query_sanitization.enabled",
      "default": true,
      "description": "Enables query sanitization for database queries. Takes precedence over otel.instrumentation.common.db.query-sanitization.enabled.",
      "name": "otel.instrumentation.jdbc.query-sanitization.enabled",
      "type": "boolean"
    }
  ],
  "description": "This instrumentation enables database client spans and database client metrics for JDBC operations. There is also a datasource instrumentation that creates spans for datasource connections (disabled by default). Note: The instrumentation unwraps pooled connections to cache metadata against the underlying physical connection; without proper unwrapping, repeated metadata extraction can cause performance degradation.",
  "display_name": "JDBC",
  "has_javaagent": true,
  "has_standalone_library": true,
  "javaagent_target_versions": [
    "Java 8+"
  ],
  "library_link": "https://docs.oracle.com/javase/8/docs/api/java/sql/package-summary.html",
  "markdown_hash": "d7f0013877c5",
  "name": "jdbc",
  "scope": {
    "name": "io.opentelemetry.jdbc"
  },
  "semantic_conventions": [
    "DATABASE_CLIENT_SPANS",
    "DATABASE_CLIENT_METRICS"
  ],
  "source_path": "instrumentation/jdbc",
  "telemetry": [
    {
      "spans": [
        {
          "attributes": [
            {
              "name": "db.connection_string",
              "type": "STRING"
            },
            {
              "name": "db.name",
              "type": "STRING"
            },
            {
              "name": "db.operation",
              "type": "STRING"
            },
            {
              "name": "db.sql.table",
              "type": "STRING"
            },
            {
              "name": "db.statement",
              "type": "STRING"
            },
            {
              "name": "db.system",
              "type": "STRING"
            },
            {
              "name": "db.user",
              "type": "STRING"
            },
            {
              "name": "peer.service",
              "type": "STRING"
            },
            {
              "name": "server.address",
              "type": "STRING"
            }
          ],
          "span_kind": "CLIENT"
        },
        {
          "attributes": [
            {
              "name": "code.function",
              "type": "STRING"
            },
            {
              "name": "code.namespace",
              "type": "STRING"
            },
            {
              "name": "db.connection_string",
              "type": "STRING"
            },
            {
              "name": "db.name",
              "type": "STRING"
            },
            {
              "name": "db.system",
              "type": "STRING"
            },
            {
              "name": "db.user",
              "type": "STRING"
            }
          ],
          "span_kind": "INTERNAL"
        }
      ],
      "when": "default"
    },
    {
      "metrics": [
        {
          "attributes": [
            {
              "name": "db.namespace",
              "type": "STRING"
            },
            {
              "name": "db.query.summary",
              "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.namespace",
              "type": "STRING"
            },
            {
              "name": "db.operation.batch.size",
              "type": "LONG"
            },
            {
              "name": "db.operation.name",
              "type": "STRING"
            },
            {
              "name": "db.query.summary",
              "type": "STRING"
            },
            {
              "name": "db.query.text",
              "type": "STRING"
            },
            {
              "name": "db.stored_procedure.name",
              "type": "STRING"
            },
            {
              "name": "db.system.name",
              "type": "STRING"
            },
            {
              "name": "error.type",
              "type": "STRING"
            },
            {
              "name": "server.address",
              "type": "STRING"
            },
            {
              "name": "service.peer.name",
              "type": "STRING"
            }
          ],
          "span_kind": "CLIENT"
        },
        {
          "attributes": [
            {
              "name": "code.function",
              "type": "STRING"
            },
            {
              "name": "code.namespace",
              "type": "STRING"
            },
            {
              "name": "db.namespace",
              "type": "STRING"
            },
            {
              "name": "db.system.name",
              "type": "STRING"
            }
          ],
          "span_kind": "INTERNAL"
        }
      ],
      "when": "otel.semconv-stability.opt-in=database,service.peer"
    }
  ]
}