# Oracle Instrument the application that calls Oracle to measure query latency and errors within a request trace. JDBC instrumentation or manual SDK spans can export over OTLP to Corridora. These spans do not describe every query executed on the server. Collector Contrib 0.160.0 includes an `oracledb` receiver. Oracle server scraping needs a separate, version-specific permissions and configuration assessment; this guide covers the application route and does not supply a server scraper recipe. A receiver being present in a distribution does not establish support for every Oracle version, managed offering, or database configuration. ## Instrument the calling application For Java or Kotlin using JDBC, start with the [Java agent](../languages/java.md) or [Kotlin guide](../languages/kotlin.md). Attach the agent before the database client starts, retain the application's service name, and exercise an existing read-only operation. Confirm a database client span appears beneath the request. For a client without verified automatic instrumentation, use a manual span around the database operation. The following Python example uses `python-oracledb`. First complete the [Python SDK and OTLP setup](../languages/python.md); importing the API alone does not configure an exporter. ```sh python -m pip install oracledb ``` Provide `ORACLE_APP_USER`, `ORACLE_APP_PASSWORD`, and `ORACLE_APP_DSN` through your application's secret/configuration mechanism. The DSN must select the intended service and your deployment's encrypted connection configuration. Retain its certificate/wallet configuration; do not replace it with an unsecured example connection just for instrumentation. Run this code **after** the SDK has been initialized: ```python import os import oracledb from opentelemetry import trace from opentelemetry.trace import SpanKind tracer = trace.get_tracer("example.oracle") with oracledb.connect( user=os.environ["ORACLE_APP_USER"], password=os.environ["ORACLE_APP_PASSWORD"], dsn=os.environ["ORACLE_APP_DSN"], ) as connection: with tracer.start_as_current_span( "oracle.select", kind=SpanKind.CLIENT, attributes={"db.system.name": "oracle", "db.operation.name": "SELECT"}, ): with connection.cursor() as cursor: cursor.execute("SELECT 1 FROM dual") assert cursor.fetchone() == (1,) ``` Use either automatic or manual instrumentation for the same call unless you intentionally want an additional business-operation span. Avoid duplicate database spans, SQL bind values, passwords, and full connection strings in attributes. A short-lived smoke program must flush/shut down its SDK exporter. ## Permissions and server signals Use the normal application's narrowly scoped account for application requests. The smoke query needs a working session; it does not justify granting DBA, catalog-wide access, or access to unrelated application tables. For server metrics, have the database owner assess the pinned `oracledb` receiver's specific query permissions and supported Oracle environment before deployment. Use a distinct monitoring account and an isolated `metrics/oracle` pipeline if you enable it. Never apply the database server's `service.name` to the shared application OTLP pipeline. See [common setup](../../common.md) for safe merging. Oracle alert/audit files are a separate log source. Give a file collector read access only to the approved files, review their contents, and follow the [other service collection pattern](other-services.md). Neither client spans nor metrics scraping automatically forwards Oracle audit or alert logs. ## Verify Run `SELECT 1 FROM dual` through the instrumented application and confirm it returns one row. In Corridora, select the application's service and recent time range, then find `oracle.select` or the JDBC span created by your agent. Inspect its duration, parent request, and status without expecting raw SQL parameters. If the query fails before the span begins, check the DSN, service name, TLS/wallet, and application login first. If it succeeds but no span arrives, check SDK initialization, exporter shutdown, sampling, and [verification](../../verification.md). Server metrics require their own successful scrape and cannot be inferred from a successful client span. Source basis: Collector Contrib distribution manifest 0.160.0; OpenTelemetry Java supported libraries and Python instrumentation; python-oracledb 3.4 connection handling documentation. Reviewed 2026-09-28.