Module
Decorators for resilient ingestion/telemetry operations. These decorators should ONLY be used for fire-and-forget operations where failures should not crash the user’s application (e.g., trace ingestion, span logging). DO NOT use for resource management operations (CRUD) - those should raise exceptions so users get clear feedback about failures.async_warn_catch_exception
logger(Logger): The logger to use for warning messages. Defaults to module logger.exceptions(tuple[type[Exception], ...]): Tuple of exception types to catch. Defaults to INFRASTRUCTURE_EXCEPTIONS.
Callable: A decorator that wraps the async function with exception handling.
retry_on_transient_http_error
- 404: Record not found (eventual consistency)
- 408: Request timeout
- 422: Parent record not found yet
- 429: Rate limited
- 500+: Server errors
- 401: Unauthorized
- 403: Forbidden
- 400: Bad request
- Other client errors
func(Callable): An async function to wrap with retry logic.
Callable: The wrapped async function.
warn_catch_exception
logger(Logger): The logger to use for warning messages. Defaults to module logger.exceptions(tuple[type[Exception], ...]): Tuple of exception types to catch. Defaults to INFRASTRUCTURE_EXCEPTIONS.
Callable: A decorator that wraps the function with exception handling.