Metadata-Version: 2.4
Name: opentelemetry-instrumentation-oracledb
Version: 0.1.0
Summary: OpenTelemetry instrumentation for OracleDB
Project-URL: Homepage, https://github.com/herin049/opentelemetry-instrumentation-oracledb/tree/main
Project-URL: Repository, https://github.com/herin049/opentelemetry-instrumentation-oracledb
Author-email: Lukas Hering <lukasheringb@gmail.com>
License-Expression: Apache-2.0
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.9
Requires-Dist: opentelemetry-api>=1.37
Requires-Dist: opentelemetry-instrumentation-dbapi>=0.58b0
Requires-Dist: opentelemetry-instrumentation>=0.58b0
Requires-Dist: opentelemetry-sdk>=1.37
Requires-Dist: wrapt<3.0.0,>=1.0.0
Provides-Extra: instruments
Requires-Dist: oracledb>=2.0; extra == 'instruments'
Description-Content-Type: text/markdown

# OpenTelemetry Instrumentation for OracleDB

[![PyPI](https://img.shields.io/pypi/v/opentelemetry-instrumentation-oracledb)](https://pypi.org/project/opentelemetry-instrumentation-oracledb/)
[![Python Version](https://img.shields.io/pypi/pyversions/opentelemetry-instrumentation-oracledb)](https://pypi.org/project/opentelemetry-instrumentation-oracledb/)
[![License](https://img.shields.io/pypi/l/opentelemetry-instrumentation-oracledb)](https://github.com/herin049/opentelemetry-instrumentation-oracledb/blob/main/LICENSE)
[![GitHub](https://img.shields.io/github/stars/herin049/opentelemetry-instrumentation-oracledb)](https://github.com/herin049/opentelemetry-instrumentation-oracledb)

Automatic instrumentation for the [python-oracledb](https://python-oracledb.readthedocs.io/) driver ensuring Oracle Database operations are traced with OpenTelemetry.

## Installation

```bash
pip install opentelemetry-instrumentation-oracledb
```

## Usage

```python
import oracledb

from opentelemetry.instrumentation.oracledb import OracleDBInstrumentor

OracleDBInstrumentor().instrument()

connection = oracledb.connect(
    user="system",
    password="password",
    dsn="localhost:1521/FREEPDB1",
)

with connection.cursor() as cursor:
    cursor.execute("SELECT 1 FROM dual")
```

Existing synchronous connections can also be instrumented explicitly:

```python
connection = OracleDBInstrumentor().instrument_connection(connection)
```

The instrumentor can also be loaded automatically via the `opentelemetry_instrumentor` entry point using the `opentelemetry-instrument` CLI command.

```bash
opentelemetry-instrument python app.py
```

## References

- [OpenTelemetry](https://opentelemetry.io/)
- [OpenTelemetry Python](https://opentelemetry-python.readthedocs.io/)
- [python-oracledb](https://python-oracledb.readthedocs.io/)
- [Oracle Database](https://www.oracle.com/database/)

## License

Apache-2.0
