refactor(backend): external logging metrics, required mode, health checks
- Add external_logging_init_failures counter - Add external_log_required flag, raise if init fails and required - Health endpoint: add external_logging status check - Blocklist service: enrich with metadata fields, update import logic - Health check task: add runtime_state dependency, fix return typing - Metrics: add Histogram for request latencies - Frontend: align BlocklistImportLogSection props - Docs: update deployment guide, remove stale tasks Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -450,6 +450,16 @@ class Settings(BaseSettings):
|
||||
"Logs are sent earlier if the batch size is reached."
|
||||
),
|
||||
)
|
||||
external_log_required: bool = Field(
|
||||
default=False,
|
||||
description=(
|
||||
"When enabled and external logging is configured, startup aborts if the "
|
||||
"external log handler fails to initialize. When disabled (default), a failed "
|
||||
"handler is treated as a warning and the application continues without external "
|
||||
"logging. Set to true in production environments where logs must reach the "
|
||||
"monitoring system."
|
||||
),
|
||||
)
|
||||
datadog_api_key: str | None = Field(
|
||||
default=None,
|
||||
description=(
|
||||
|
||||
Reference in New Issue
Block a user