GetMetricWith returns the Summary for the given Labels map (the label names must match those of the variable labels in Desc). If that label map is accessed for the first time, a new Summary is created. Implications of creating a Summary without using it and keeping the Summary for later use are the
(labels Labels)
| 631 | // GetMetricWithLabelValues(...string). See there for pros and cons of the two |
| 632 | // methods. |
| 633 | func (v *SummaryVec) GetMetricWith(labels Labels) (Observer, error) { |
| 634 | metric, err := v.MetricVec.GetMetricWith(labels) |
| 635 | if metric != nil { |
| 636 | return metric.(Observer), err |
| 637 | } |
| 638 | return nil, err |
| 639 | } |
| 640 | |
| 641 | // WithLabelValues works as GetMetricWithLabelValues, but panics where |
| 642 | // GetMetricWithLabelValues would have returned an error. Not returning an |