Backfill job that re-processes historical access logs to update recovery flags and re-aggregate daily usage data.
This Edge Function corrects historical data after fixes to the Router Worker recovery detection logic. It updates is_recovered flags in access logs and re-aggregates daily usage statistics for the specified number of past days.
is_recovered
POST /functions/v1/backfill-recovered-hits
Requires x-cron-secret header matching the CRON_SECRET environment variable.
x-cron-secret
CRON_SECRET
backfill_recovered_flags
sgtm_usage_aggregate_daily_window
sgtm_access_logs
sgtm_usage_daily
days_back
Backfill job that re-processes historical access logs to update recovery flags and re-aggregate daily usage data.
Overview
This Edge Function corrects historical data after fixes to the Router Worker recovery detection logic. It updates
is_recoveredflags in access logs and re-aggregates daily usage statistics for the specified number of past days.Endpoint
POST /functions/v1/backfill-recovered-hitsAuthentication
Requires
x-cron-secretheader matching theCRON_SECRETenvironment variable.Behavior
backfill_recovered_flagsRPC to updateis_recoveredflagssgtm_usage_aggregate_daily_windowRPCTables Touched
sgtm_access_logs(write via RPC)sgtm_usage_daily(write via RPC)Notes
days_backbody parameter