File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ func (h handler[T]) extractLabelsWithValues(labelProvider T) prometheus.Labels {
117117
118118// extractLabelValues extracts label string values from a given labelProviderMarker (SingleLabelProvider or StructLabelProvider)
119119func (h handler [T ]) extractLabelValues (labelProvider T ) []string {
120- m := h .extractLabels (labelProvider )
120+ m := h .extractLabelsWithValues (labelProvider )
121121
122122 labelValues := make ([]string , 0 , len (m ))
123123 for _ , v := range m {
Original file line number Diff line number Diff line change @@ -55,18 +55,17 @@ func ExampleNewCounterVecT_multiple_labels_manual() {
5555}
5656
5757func ExampleNewCounterVecT_promauto_migrated () {
58-
5958 // Examples on how to migrate from promauto to promsafe
6059 // When promauto was using a custom factory with custom registry
6160
62- var myReg = prometheus .NewRegistry ()
61+ myReg : = prometheus .NewRegistry ()
6362
6463 counterOpts := prometheus.CounterOpts {
6564 Name : "items_counted_detailed_auto" ,
6665 }
6766
6867 // Old unsafe code
69- //promauto.With(myReg).NewCounterVec(counterOpts, []string{"event_type", "source"})
68+ // promauto.With(myReg).NewCounterVec(counterOpts, []string{"event_type", "source"})
7069 // becomes:
7170
7271 type TicketReservationAttemptsLabels struct {
You can’t perform that action at this time.
0 commit comments