Skip to content

Commit

Permalink
fix(api): metrics convention (keephq#3247)
Browse files Browse the repository at this point in the history
  • Loading branch information
talboren authored Jan 31, 2025
1 parent 505fc5b commit c0e2aa8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions keep/api/routes/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ def get_metrics(
for label in labels:
label_value = chevron.render("{{ " + label + " }}", last_alert_dto)
label = label.replace(".", "_")
extra_labels += f' {label}="{label_value}"'
extra_labels += f',{label}="{label_value}"'

export += f'alerts_total{{incident_name="{incident_name}" incident_id="{incident.id}"{extra_labels}}} {incident.alerts_count}\n'
export += f'alerts_total{{incident_name="{incident_name}",incident_id="{incident.id}"{extra_labels}}} {incident.alerts_count}\n'

# Exporting stats about open incidents
export += "\n\n"
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "keep"
version = "0.35.9"
version = "0.35.10"
description = "Alerting. for developers, by developers."
authors = ["Keep Alerting LTD"]
packages = [{include = "keep"}]
Expand Down

0 comments on commit c0e2aa8

Please sign in to comment.