Open-source status page, incident response and uptime monitoring
TypeScript alertingincident-managementmcpmcp-servermonitoringmonitoring-as-codeobservabilityon-callopen-sourcesrestatus-pagestatuspagesynthetic-monitoringterraformtinybirdtursouptimeuptime-checkeruptime-monitor
fix: dashboard missing Regions info for private location http monitors (#2507)
Max123bca462e1a
diff --git a/apps/workflows/src/checker/private-location.ts b/apps/workflows/src/checker/private-location.tsindex 923ac7034..38a2dc7e1 100644--- a/apps/workflows/src/checker/private-location.ts+++ b/apps/workflows/src/checker/private-location.ts@@ -43,9 +43,25 @@ export async function updateStatusPrivate(c: Context<Env>) {latency,} = result.data;+ const event = c.get("event");const monitorIdNumber = Number(monitorId);const privateLocationIdNumber = Number(privateLocationId);+ // Set event data for OTel/Axiom structured logging (matches cloud checker pattern)+ // Note: Private location pings are ingested to Tinybird separately via Go code in+ // apps/private-location/internal/tinybird/client.go, not through this event object+ if (event) {+ event.status_update = {+ status: status,+ message: message,+ region: privateLocationId, // Private location ID as region string+ status_code: statusCode,+ cron_timestamp: cronTimestamp,+ latency_ms: latency,+ monitorId: monitorIdNumber,+ };+ }+try {const monitor = await db.select()@@ -154,6 +170,9 @@ export async function updateStatusPrivate(c: Context<Env>) {const regions = [attachment.name];+ let triggeredNotifications: { notificationId: number; provider: string }[] =+ [];+switch (status) {case "error":await checkerAudit.publishAuditLog({@@ -168,7 +187,7 @@ export async function updateStatusPrivate(c: Context<Env>) {latency,},});- await triggerNotifications({+ triggeredNotifications = await triggerNotifications({monitorId,statusCode,message,@@ -190,7 +209,7 @@ export async function updateStatusPrivate(c: Context<Env>) {latency,},});- await triggerNotifications({+ triggeredNotifications = await triggerNotifications({monitorId,statusCode,message,@@ -212,7 +231,7 @@ export async function updateStatusPrivate(c: Context<Env>) {latency,},});- await triggerNotifications({+ triggeredNotifications = await triggerNotifications({monitorId,statusCode,message,@@ -224,6 +243,14 @@ export async function updateStatusPrivate(c: Context<Env>) {break;}+ // Add notification outcome to event for OTel logging+ if (event?.status_update) {+ (event.status_update as Record<string, unknown>).notificationTriggered =+ triggeredNotifications.length > 0;+ (event.status_update as Record<string, unknown>).notifications =+ triggeredNotifications;+ }+return c.json({ success: true }, 200);} catch (error) {logger.error("Failed to update private location status", {diff --git a/packages/tinybird/endpoints/endpoint__http_metrics_regions_14d__v0.pipe b/packages/tinybird/endpoints/endpoint__http_metrics_regions_14d__v0.pipeindex 1a50f28c0..b3e70b58d 100644--- a/packages/tinybird/endpoints/endpoint__http_metrics_regions_14d__v0.pipe+++ b/packages/tinybird/endpoints/endpoint__http_metrics_regions_14d__v0.pipe@@ -13,7 +13,7 @@ SQL >round(quantile(0.90)(latency)) as p90Latency,round(quantile(0.95)(latency)) as p95Latency,round(quantile(0.99)(latency)) as p99Latency- FROM mv__http_14d__v0+ FROM mv__http_14d__v1WHEREmonitorId = {{ String(monitorId, '1', required=True) }}{% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}diff --git a/packages/tinybird/endpoints/endpoint__http_metrics_regions_1d__v0.pipe b/packages/tinybird/endpoints/endpoint__http_metrics_regions_1d__v0.pipeindex b7eb47955..a65352bb9 100644--- a/packages/tinybird/endpoints/endpoint__http_metrics_regions_1d__v0.pipe+++ b/packages/tinybird/endpoints/endpoint__http_metrics_regions_1d__v0.pipe@@ -13,7 +13,7 @@ SQL >round(quantile(0.90)(latency)) as p90Latency,round(quantile(0.95)(latency)) as p95Latency,round(quantile(0.99)(latency)) as p99Latency- FROM mv__http_1d__v0+ FROM mv__http_1d__v1WHEREmonitorId = {{ String(monitorId, '1', required=True) }}{% if regions %} AND region IN {{ Array(regions, 'String', 'ams,fra') }} {% end %}