MCPcopy Create free account
hub / github.com/cortexproject/cortex / alertSize

Function alertSize

pkg/alertmanager/alertmanager.go:835–847  ·  view source on GitHub ↗
(alert model.Alert)

Source from the content-addressed store, hash-verified

833}
834
835func alertSize(alert model.Alert) int {
836 size := 0
837 for l, v := range alert.Labels {
838 size += len(l)
839 size += len(v)
840 }
841 for l, v := range alert.Annotations {
842 size += len(l)
843 size += len(v)
844 }
845 size += len(alert.GeneratorURL)
846 return size
847}

Callers 5

PreStoreMethod · 0.85
PostStoreMethod · 0.85

Calls

no outgoing calls