(limit: int)
| 175 | |
| 176 | |
| 177 | def _recent_errors_payload(limit: int) -> list[dict[str, Any]]: |
| 178 | traces = _trace_store() |
| 179 | if traces.count > 0: |
| 180 | return traces.recent(limit=limit, errors_only=True) |
| 181 | return [ |
| 182 | trace for trace in _legacy_recent_traces(limit) |
| 183 | if trace.get("error_code") or int(trace.get("status_code", 0) or 0) >= 400 |
| 184 | ] |
| 185 | |
| 186 | |
| 187 | def _telemetry_status_payload() -> dict[str, Any]: |
no test coverage detected