Skip to content

AsyncCursor.callproc() fails due to NewRelic AsyncCursorWrapper #1639

@lotfiGipsyKing

Description

@lotfiGipsyKing

Description

In our FastAPI application using oracledb library in async mode, calls to AsyncCursor.callproc() fails only when using the newrelic-admin run-program to run my app:

The line that raise the error:

await cursor.callproc(name=sql, parameters=params)

And the error i'am getting:

callproc() got an unexpected keyword argument 'name'

After investigation the root cause is :

  • NewRelic wraps the async Oracle cursor with AsyncCursorWrapper to instrument DB calls.

  • The wrapper changes the signature, replacing name with procname and altering expected arguments:

  • This causes keyword argument errors when calling callproc as usual.

Expected Behavior

The newrelic wrapper should keep the same function signature as oracledb.AsyncCursor.

Environment

python = "~3.13"
fastapi = "~0.125"
oracledb = "^3.4.1"
newrelic = "~11.2"

Metadata

Metadata

Assignees

Labels

bugIncorrect or flawed agent behavior.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions