mainframe.server¶
Attributes¶
Functions¶
|
Add request id to log message. |
|
|
|
Refresh queue metrics on a bounded interval independent of scrape traffic. |
|
Refresh performance metrics independently of scrape traffic. |
|
Load the state for the app. |
|
Get server metadata. |
|
Update the rules. |
Module Contents¶
- mainframe.server.add_correlation(_logger: logging.Logger, _method_name: str, event_dict: dict[str, Any]) dict[str, Any][source]¶
Add request id to log message.
- async mainframe.server.monitor_queue(monitor: mainframe.queue_monitor.QueueMonitor, refresh_seconds: int) None[source]¶
Refresh queue metrics on a bounded interval independent of scrape traffic.
- async mainframe.server.monitor_performance(monitor: mainframe.performance_monitor.PerformanceMonitor, refresh_seconds: int) None[source]¶
Refresh performance metrics independently of scrape traffic.
- async mainframe.server.lifespan(app_: fastapi.FastAPI) collections.abc.AsyncGenerator[None, None][source]¶
Load the state for the app.
- async mainframe.server.metadata() mainframe.models.schemas.ServerMetadata[source]¶
Get server metadata.