Skip to content

Commit

Permalink
Fix metric names
Browse files Browse the repository at this point in the history
  • Loading branch information
nid90 committed Dec 6, 2023
1 parent 94e4885 commit b0b0247
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/components/release_monitoring_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@ def session_stability

def errors_count
value = release_data.errors_count
{value:, is_healthy: release_data.metric_healthy?("errors")}
{value:, is_healthy: release_data.metric_healthy?("errors_count")}
end

def new_errors_count
value = release_data.new_errors_count
{value:, is_healthy: release_data.metric_healthy?("new_errors")}
{value:, is_healthy: release_data.metric_healthy?("new_errors_count")}
end

def adoption_chart_data
Expand Down
2 changes: 1 addition & 1 deletion app/models/release_health_metric.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def create_health_event(release_health_rule)
end

def metric_healthy?(metric_name)
raise ArgumentError "Invalid metric name" unless metric_name.in? METRIC_VALUES.keys
raise ArgumentError, "Invalid metric name" unless metric_name.in? METRIC_VALUES.keys

rule = release_health_rules.for_metric(metric_name).first
return unless rule
Expand Down

0 comments on commit b0b0247

Please sign in to comment.