Commit 0bc2c922 authored by Vitali Tatarintev's avatar Vitali Tatarintev

Remove payload_key_for method

Remove `PrometheusAlertEvent.payload_key_for` and
`SelfManagedPrometheusAlertEvent.payload_key_for` methods
in favor of `Gitlab::Alerting::Alert#gitlab_fingerprint`
parent 153df2a5
......@@ -34,10 +34,4 @@ class PrometheusAlertEvent < ApplicationRecord
def self.status_value_for(name)
state_machines[:status].states[name].value
end
def self.payload_key_for(gitlab_alert_id, started_at)
plain = [gitlab_alert_id, started_at].join('/')
Digest::SHA1.hexdigest(plain)
end
end
......@@ -15,10 +15,4 @@ class SelfManagedPrometheusAlertEvent < ApplicationRecord
yield event if block_given?
end
end
def self.payload_key_for(started_at, alert_name, query_expression)
plain = [started_at, alert_name, query_expression].join('/')
Digest::SHA1.hexdigest(plain)
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment