With works as GetMetricWith, but panics where GetMetricWithLabels would have returned an error. Not returning an error allows shortcuts like myVec.With(prometheus.Labels{"code": "404", "method": "GET"}).Observe(42.21)
(labels Labels)
| 656 | // |
| 657 | // myVec.With(prometheus.Labels{"code": "404", "method": "GET"}).Observe(42.21) |
| 658 | func (v *SummaryVec) With(labels Labels) Observer { |
| 659 | s, err := v.GetMetricWith(labels) |
| 660 | if err != nil { |
| 661 | panic(err) |
| 662 | } |
| 663 | return s |
| 664 | } |
| 665 | |
| 666 | // CurryWith returns a vector curried with the provided labels, i.e. the |
| 667 | // returned vector has those labels pre-set for all labeled operations performed |