Skip to content

Commit

Permalink
fix: alert checked prometheus counter (#25356)
Browse files Browse the repository at this point in the history
  • Loading branch information
anirudhpillai authored Oct 3, 2024
1 parent 4d40e83 commit 1769b26
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frontend/src/lib/components/Alerts/views/Alerts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export function Alerts({ alertId }: AlertsProps): JSX.Element {
to={urls.insightView(insight.short_id)}
title={
<Tooltip title={insight.name}>
<div>{insight.name ?? insight.derived_name}</div>
<div>{insight.name || insight.derived_name}</div>
</Tooltip>
}
/>
Expand Down
4 changes: 2 additions & 2 deletions posthog/tasks/alerts/checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class TrendResult(TypedDict):
ALERT_CHECKED_COUNTER = Counter(
"alerts_checked",
"Number of alerts we tried to check",
labelnames=["interval"],
labelnames=["calculation_interval"],
)


Expand Down Expand Up @@ -215,7 +215,7 @@ def check_alert(alert_id: str) -> None:
logger.warning("Alert not found or not enabled", alert_id=alert_id)
return

ALERT_CHECKED_COUNTER.labels(interval=alert.calculation_interval).inc()
ALERT_CHECKED_COUNTER.labels(calculation_interval=alert.calculation_interval).inc()

now = datetime.now(UTC)
if alert.next_check_at and alert.next_check_at > now:
Expand Down

0 comments on commit 1769b26

Please sign in to comment.