Commit 031f0b1
authored
Fix RecursionError by preventing duplicate instrumentation in urllib3
Added a guard (_instrumented flag) to prevent urllib3 instrumentation from running multiple times, which caused RecursionError (#4532). This ensures _instrument() exits early if already applied.1 parent 5279805 commit 031f0b1
File tree
1 file changed
+4
-1
lines changed- instrumentation/opentelemetry-instrumentation-urllib3/src/opentelemetry/instrumentation/urllib3
1 file changed
+4
-1
lines changedLines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
202 | | - | |
| 202 | + | |
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
217 | 220 | | |
218 | 221 | | |
219 | 222 | | |
| |||
0 commit comments