Skip to content

Commit fa69a65

Browse files
committed
Ensure httpx.get etc. get instrumented
1 parent 3478831 commit fa69a65

File tree

1 file changed

+2
-2
lines changed
  • instrumentation/opentelemetry-instrumentation-httpx/src/opentelemetry/instrumentation/httpx

1 file changed

+2
-2
lines changed

instrumentation/opentelemetry-instrumentation-httpx/src/opentelemetry/instrumentation/httpx/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -527,11 +527,11 @@ def _instrument(self, **kwargs):
527527
tracer_provider = kwargs.get("tracer_provider")
528528
_InstrumentedClient._tracer_provider = tracer_provider
529529
_InstrumentedAsyncClient._tracer_provider = tracer_provider
530-
httpx.Client = _InstrumentedClient
530+
httpx.Client = httpx._api.Client = _InstrumentedClient
531531
httpx.AsyncClient = _InstrumentedAsyncClient
532532

533533
def _uninstrument(self, **kwargs):
534-
httpx.Client = self._original_client
534+
httpx.Client = httpx._api.Client = self._original_client
535535
httpx.AsyncClient = self._original_async_client
536536
_InstrumentedClient._tracer_provider = None
537537
_InstrumentedClient._request_hook = None

0 commit comments

Comments
 (0)