flowchartsman commented on a change in pull request #604:
URL: https://github.com/apache/pulsar-client-go/pull/604#discussion_r697915049
##########
File path: pulsar/internal/metrics.go
##########
@@ -21,9 +21,8 @@ import (
"github.com/prometheus/client_golang/prometheus"
)
-var topicLabelNames = []string{"pulsar_tenant", "pulsar_namespace", "topic"}
-
type Metrics struct {
+ metricsLevel int
Review comment:
One option could be to make the consts be strings instead of integers,
and then have `internal` do a switch on these. Then at least the hard-coded
values would have more meaning than inscrutable integer values. Like
```
type MetricsCardinality string
const (
MetricsCardinalityNone MetricsCardinality = `none`
MetricsCardinalityTenant MetricsCardinality = `tenant`
MetricsCardinalityNamespace MetricsCardinality = `namespace`
MetricsCardinalityTopic MetricsCardinality = `topic`
)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]