Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Promtool check metrics reports error in metric name #66

Open
rcbop opened this issue Jun 23, 2022 · 0 comments
Open

Promtool check metrics reports error in metric name #66

rcbop opened this issue Jun 23, 2022 · 0 comments
Assignees

Comments

@rcbop
Copy link

rcbop commented Jun 23, 2022

Description

Promtool is complaining about non-conformity with OpenMetrics standards.

curl -sS http://api:8081/metrics | promtool check metrics
gorm_dbstats_wait_count non-histogram and non-summary metrics should not have "_count" suffix

Meanwhile, I used the following workaround to disable this collector:

// workaround for
// prom tool is complaining about this particular field:
dbStatsValue := reflect.ValueOf(*dbStatsPrometheus.DBStats)
field := dbStatsValue.FieldByName("WaitCount")
fmt.Println(field, field.String())
prometheus.Unregister(field.Interface().(prometheus.Gauge))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants