Skip to content

Commit 27f06e9

Browse files
committed
improve logic
Signed-off-by: emdneto <[email protected]>
1 parent 4574a49 commit 27f06e9

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
@@ -1005,7 +1005,7 @@ def instrument_client(
10051005
),
10061006
)
10071007
for transport in client._mounts.values():
1008-
if transport is not None:
1008+
if hasattr(transport, "handle_request"):
10091009
wrap_function_wrapper(
10101010
transport,
10111011
"handle_request",
@@ -1031,7 +1031,7 @@ def instrument_client(
10311031
),
10321032
)
10331033
for transport in client._mounts.values():
1034-
if transport is not None:
1034+
if hasattr(transport, "handle_async_request"):
10351035
wrap_function_wrapper(
10361036
transport,
10371037
"handle_async_request",

0 commit comments

Comments
 (0)