Commit 67fb151
httpx: rewrite patching to use wrapt instead of subclassing client (open-telemetry#2909)
httpx: rewrote patching to use wrapt instead of subclassing client
Porting of httpx instrumentation to patch async transport methods instead of substituting the client. That is because the current approach will instrument httpx by instantianting another client with a custom transport class and this will race with code already subclassing. This one uses wrapt to patch the default httpx transport classes.
---------
Co-authored-by: Emídio Neto <[email protected]>1 parent e7719b5 commit 67fb151
File tree
4 files changed
+350
-130
lines changed- instrumentation/opentelemetry-instrumentation-httpx
- src/opentelemetry/instrumentation/httpx
- tests
4 files changed
+350
-130
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
0 commit comments