Add fingerprinting for entire payloads
What does this MR do?
This adds automatic fingerprinting for Alert Management Alerts.
This is a GitLab Premium feature.
How it works:
- When the user sends a payload through the API, and the user has a GitLab Premium or above license,
- We generate a fingerprint using the payload, excluding the
start_time
andhosts
params (as these are often changing) - If another alert is found with this fingerprint, we increment the alert count. This is the same logic as when a user provided fingerprint is provided in the payload(https://docs.gitlab.com/ee/user/project/integrations/generic_alerts.html#customizing-the-payload).
We do the following to ensure the payload fingerprint is calculated correctly:
- Convert any nested keys into inline keys
- Sort the inline keys, so ensure each duplicate hash generates the same SHA
- Check to see if the hash values are are present
As this is currently behind a FF, no changelog or docs are required for this MR.
FF removal issue: #224113 (closed)
Screenshots
Alert list |
---|
![]() |
Does this MR meet the acceptance criteria?
Conformity
- [-] Changelog entry feature flag
- [-] Documentation (if required) feature flag
-
Code review guidelines -
Merge request performance guidelines -
Style guides - [-] Database guides
-
Separation of EE specific content
Refs #214557 (closed)
Edited by Rémy Coutable