Skip to content

Commit

Permalink
Ensure httpx.get etc. get instrumented
Browse files Browse the repository at this point in the history
  • Loading branch information
dmontagu committed Oct 20, 2023
1 parent 3478831 commit fa69a65
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -527,11 +527,11 @@ def _instrument(self, **kwargs):
tracer_provider = kwargs.get("tracer_provider")
_InstrumentedClient._tracer_provider = tracer_provider
_InstrumentedAsyncClient._tracer_provider = tracer_provider
httpx.Client = _InstrumentedClient
httpx.Client = httpx._api.Client = _InstrumentedClient
httpx.AsyncClient = _InstrumentedAsyncClient

def _uninstrument(self, **kwargs):
httpx.Client = self._original_client
httpx.Client = httpx._api.Client = self._original_client
httpx.AsyncClient = self._original_async_client
_InstrumentedClient._tracer_provider = None
_InstrumentedClient._request_hook = None
Expand Down

0 comments on commit fa69a65

Please sign in to comment.