Skip to content

feat: add opentelemetry-instrumentation-oracledb package - #4989

Open
herin049 wants to merge 3 commits into
open-telemetry:mainfrom
herin049:feat/oracledb-instrumentation
Open

feat: add opentelemetry-instrumentation-oracledb package#4989
herin049 wants to merge 3 commits into
open-telemetry:mainfrom
herin049:feat/oracledb-instrumentation

Conversation

@herin049

Copy link
Copy Markdown
Contributor

Description

Adds support for instrumenting the OracleDB Python client. This package is being relocated from herin049/opentelemetry-instrumentation-oracledb

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

uv run tox -e py314-test-instrumentation-oracledb-latest

Does This PR Require a Core Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Aug 24, 2026

Copy link
Copy Markdown

Pull request dashboard status

Waiting on reviewers · refreshed 2026-08-24 01:45 UTC

Review the latest changes.

Status above doesn't look right?
  • Just replied or pushed? Anything around or after the refresh time above may not be picked up yet — give it a few minutes.
  • Anything look wrong? Report it with what you expected; it helps us improve the dashboard.

@pmcollins pmcollins left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this. LGTM but for one use case.


def __getattr__(self, name: str) -> Any:
return getattr(self.__wrapped__, name)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I integration tested this instrumentation locally against an Oracle db, and everything I tested worked fine except for using with instead of async with on an async cursor. This works without instrumentation but with an instrumented cursor raises a type error:

async def use_cursor_context_manager() -> None:
    async with oracledb.connect_async(...) as connection:
        with connection.cursor():
            pass

asyncio.run(use_cursor_context_manager())

Looks like adding support for synchronous __enter__ and __exit__ here should fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants