Reflection Metrics — Event Reference¶
Core events - type_hints.resolved - payload: {subject: str, status: "ok" | "partial"} - type_hints.first_fail - payload: {subject: str, priority: list[str]} - type_hints.retry_fail - payload: {subject: str, error: str} - type_hints.strict_error - payload: {subject: str, slot: str, token: str, attempted: list[str]} - import.resolve - payload: {module: str, success: bool} - scan.module - payload: {module: str, classes: int, functions: int} - invoke.call - payload: {qualname: str, success: bool} - invoke.construct - payload: {qualname: str, success: bool}
Diagnostic events (optional) - Some providers may emit additional diagnostic events when resolving or augmenting hints. These are subject to change and intended for debugging: - type_hints.tokens - type_hints.import_attempt - type_hints.sibling_attempt - type_hints.sibling_reuse - get_type_hints_retry_error - type_hints.unresolved - payload: {subject: str, slots: list[str], tokens: list[str], attempted: list[str]} - Note: in tolerant mode this is typically followed by type_hints.resolved with status "partial".
Reliability and performance - Metrics calls are best-effort and must not raise. - Adapters should swallow exceptions; call sites also protect emissions in hot paths.