Commit 5430c75
feat(asgi): respect suppress_http_instrumentation in ASGI middleware (#4375)
Add is_http_instrumentation_enabled() check in OpenTelemetryMiddleware.__call__
so ASGI server spans are skipped when HTTP instrumentation is suppressed.
Every other HTTP instrumentor (client and server) already honors this flag.
ASGI was the only one that did not.
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>1 parent 4d266a0 commit 5430c75
File tree
3 files changed
+24
-2
lines changed- instrumentation/opentelemetry-instrumentation-asgi
- src/opentelemetry/instrumentation/asgi
- tests
3 files changed
+24
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| |||
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
258 | | - | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
259 | 262 | | |
260 | 263 | | |
261 | 264 | | |
| |||
745 | 748 | | |
746 | 749 | | |
747 | 750 | | |
748 | | - | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
749 | 755 | | |
750 | 756 | | |
751 | 757 | | |
| |||
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
1880 | 1881 | | |
1881 | 1882 | | |
1882 | 1883 | | |
| 1884 | + | |
| 1885 | + | |
| 1886 | + | |
| 1887 | + | |
| 1888 | + | |
| 1889 | + | |
| 1890 | + | |
| 1891 | + | |
| 1892 | + | |
| 1893 | + | |
| 1894 | + | |
| 1895 | + | |
| 1896 | + | |
1883 | 1897 | | |
1884 | 1898 | | |
1885 | 1899 | | |
| |||
0 commit comments