Skip to content

Commit a2eb0ac

Browse files
committed
Rename MetricsCollectorOpts to PrometheusMetricsOpts for consistency
1 parent f137953 commit a2eb0ac

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

metrics.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ const PrometheusMetricsLabelQuery = "query"
1818
// DefaultQueryDurationBuckets is default buckets into which observations of executing SQL queries are counted.
1919
var DefaultQueryDurationBuckets = []float64{0.001, 0.01, 0.1, 0.25, 0.5, 1, 2.5, 5, 10}
2020

21-
// MetricsCollectorOpts represents an options for PrometheusMetrics.
22-
type MetricsCollectorOpts struct {
21+
// PrometheusMetricsOpts represents an options for PrometheusMetrics.
22+
type PrometheusMetricsOpts struct {
2323
// Namespace is a namespace for metrics. It will be prepended to all metric names.
2424
Namespace string
2525

@@ -44,11 +44,11 @@ type PrometheusMetrics struct {
4444

4545
// NewPrometheusMetrics creates a new metrics collector.
4646
func NewPrometheusMetrics() *PrometheusMetrics {
47-
return NewPrometheusMetricsWithOpts(MetricsCollectorOpts{})
47+
return NewPrometheusMetricsWithOpts(PrometheusMetricsOpts{})
4848
}
4949

5050
// NewPrometheusMetricsWithOpts is a more configurable version of creating PrometheusMetrics.
51-
func NewPrometheusMetricsWithOpts(opts MetricsCollectorOpts) *PrometheusMetrics {
51+
func NewPrometheusMetricsWithOpts(opts PrometheusMetricsOpts) *PrometheusMetrics {
5252
queryDurationBuckets := opts.QueryDurationBuckets
5353
if queryDurationBuckets == nil {
5454
queryDurationBuckets = DefaultQueryDurationBuckets

0 commit comments

Comments
 (0)