Commit fbdd32e
committed
feat(asgi): respect suppress_http_instrumentation in ASGI middleware
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.1 parent a428585 commit fbdd32e
3 files changed
Lines changed: 24 additions & 2 deletions
File tree
- instrumentation/opentelemetry-instrumentation-asgi
- src/opentelemetry/instrumentation/asgi
- tests
| 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