You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an instrumentation issue with an application that uses Authlib to connect with an external API. I'm using the Async variant of Authlib, which uses httpx rather than requests.
This appears to be a problem with the upstream opentelemetry project (already reported in open-telemetry/opentelemetry-python-contrib#2364), but I thought I'd report here for your awareness and searchability, as I encountered it through logfire.instrument_httpx() - please feel free to close.
I'm able to work around this for now by disabling the instrumentation. If there are any options to disable instrumentation, temporarily or for specific classes, that could be helpful.
I see the following exception when running under logfire:
File "/app/myapp/services/some_api.py", line 23, in from_credentials
client = AsyncOAuth2Client(
^^^^^^^^^^^^^^^^^^
File "/app/.venv/lib/python3.12/site-packages/authlib/integrations/httpx_client/oauth2_client.py", line 65, in __init__
httpx.AsyncClient.__init__(self, **client_kwargs)
File "/app/.venv/lib/python3.12/site-packages/opentelemetry/instrumentation/httpx/__init__.py", line 678, in __init__
super().__init__(*args, **kwargs)
^^^^^^^^^^^^^^^^
TypeError: super(type, obj): obj must be an instance or subtype of type
This happens because Authlib inherits from httpx.AsyncClient:
There's a more complete code-sample in the opentelemetry issue, although in my case I'm not using HTTPXClientInstrumentor directly, just logfire.instrument_httpx.
Description
I have an instrumentation issue with an application that uses Authlib to connect with an external API. I'm using the Async variant of Authlib, which uses httpx rather than requests.
This appears to be a problem with the upstream opentelemetry project (already reported in open-telemetry/opentelemetry-python-contrib#2364), but I thought I'd report here for your awareness and searchability, as I encountered it through
logfire.instrument_httpx()
- please feel free to close.I'm able to work around this for now by disabling the instrumentation. If there are any options to disable instrumentation, temporarily or for specific classes, that could be helpful.
I see the following exception when running under logfire:
This happens because Authlib inherits from httpx.AsyncClient:
There's a more complete code-sample in the opentelemetry issue, although in my case I'm not using HTTPXClientInstrumentor directly, just
logfire.instrument_httpx
.To replicate locally, my environment has:
Python, Logfire & OS Versions, related packages (not required)
The text was updated successfully, but these errors were encountered: