Skip to content

Commit

Permalink
Merge pull request #33 from camopy/master
Browse files Browse the repository at this point in the history
Fixes summaryHandler metric.vec always nil
  • Loading branch information
penglongli authored Nov 11, 2024
2 parents 6a46af9 + 7de8766 commit 9ad010a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ginmetrics/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ func summaryHandler(metric *Metric) error {
if len(metric.Objectives) == 0 {
return errors.Errorf("metric '%s' is summary type, cannot lose objectives param.", metric.Name)
}
prometheus.NewSummaryVec(
metric.vec = prometheus.NewSummaryVec(
prometheus.SummaryOpts{Name: metric.Name, Help: metric.Description, Objectives: metric.Objectives},
metric.Labels,
)
Expand Down

0 comments on commit 9ad010a

Please sign in to comment.