Module

server.debug.frames

Traceback frame extraction and framework collapsing.

Functions

_is_app_frame 1 bool
True if the frame is from the application (not stdlib/site-packages).
def _is_app_frame(filename: str) -> bool
Parameters
Name Type Description
filename str
Returns
bool
_extract_frames 1 list[dict[str, Any]]
Walk a traceback and extract frame info with source context and locals.
def _extract_frames(tb: types.TracebackType | None) -> list[dict[str, Any]]
Parameters
Name Type Description
tb types.TracebackType | None
Returns
list[dict[str, Any]]
_collapse_framework_frames 2 list[dict[str, Any]]
Collapse consecutive non-app (framework) frames into a summary. Reduces traceb…
def _collapse_framework_frames(frames: list[dict[str, Any]], min_collapse: int = 3) -> list[dict[str, Any]]

Collapse consecutive non-app (framework) frames into a summary.

Reduces traceback noise from middleware, ASGI adapters, etc. Returns a mix of frame dicts and collapsed-group dicts.

Parameters
Name Type Description
frames list[dict[str, Any]]
min_collapse int Default:3
Returns
list[dict[str, Any]]