Skip to content

Promtool check metrics reports error in metric name #66

@rcbop

Description

@rcbop

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))

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions