Repository navigation
Commit 6eebd83
test(observability): assert log record fires in the no-active-span path
The test previously passed even if _emit_event became a no-op because its
only assertion was "no exception raised." Strengthen it with caplog: capture
at WARNING level on the test logger and assert that exactly one record fires
with the correct level, message, and event attribute. This confirms the
log-only fallback path actually emitted (not silently swallowed) when OTel
is installed but no tracer is active.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent d4ae14d commit 6eebd83
1 file changed
Lines changed: 19 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
123 | 125 | | |
124 | 126 | | |
125 | | - | |
| 127 | + | |
| 128 | + | |
126 | 129 | | |
127 | 130 | | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
136 | 145 | | |
137 | 146 | | |
138 | 147 | | |
| |||
0 commit comments