-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Add GroupFingerprint to webhook notifications #2170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
We already have |
|
While |
|
In 3269bc3 (before the large refactor in #1929 ) GroupKey was changed from uint64 to a string, however for custom integrations like Pagerduty ( A fixed length |
|
I think this is a good idea, in my case, I also calcute a groupFingerprint in my db. |
|
It seems like there's a demand for it... |
|
I'd suggest that anyone who needs a short fingerprint calculate it themselves, but in general to use the full labelset as a key. This would cause confusion with GroupKey - which sounds confusingly similar. In this particular case, is sounds like the existing GroupKey might actually be what you want. We've had issues with collisions on these in client libraries and PromQL. So it's not something we should expose to users, and should be looking to remove from any public-facing APIs we currently have, as they'll likely run into the same issues we have over the years. |
Signed-off-by: Paul Traylor <paul.traylor@linecorp.com>
Signed-off-by: Paul Traylor <kungfudiscomonkey@gmail.com>
Done |
|
Based on @brian-brazil feedback, I conclude that it's not safe to include GroupFingerprint in the webhook payload. Sorry that you spent some time on this @kfdm. |
|
I feel like I need to respectfully disagree a bit. While there is maybe a small concern for collisions, I think having a fingerprint helps simplify a majority of lookups downstream and from my perspective, there is no additional burden on alertmanager by including a fingerprint. As for the argument of "whoever who needs a fingerprint, should calculate it themselves", then I am curious the reason for having a fingerprint in the alert labelset, or even the groupkey, if the assumption is that downstream should calculate everything. |
|
I consider almost all of common/model to be legacy code, and that the fingerprint in particular to have been unwise given all the problems it has causes us over the years. FNV-1 is not a good hash. Accordingly I think we should be looking to remove uses of them across the code base, and adding it to public APIs would go against that. More generally, avoid fingerprints when you can use guaranteed unique values instead.
The groupkey cannot be calculated by downstream, which is why it's there: as a unique identifier for a given route's group. |
|
Hi @kfdm , I'm trying to remove some clutter, so closing this PR. Sorry it was declined. Kind regards, Solomon Jacobs |
When dealing with downstream alert systems, it's useful to have a single fingerprint to use as a lookup. Similar to the
Fingerprintfield on individual alert messages, fingerprinting the group allows downstream alert systems to recognize the same Fingerprint.A
GroupFingerprintbased off ofGroupLabelsshould be generally stable, sincegroup_byis controlled by the Alertmanager configuration, whileCommonLabelscould potentially change based on alerts firing and being resolved.