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

conflict with default metrics name "http_request_duration_seconds" used in go-http-metrics/middleware #14

Open
fabrizio-fal opened this issue May 13, 2022 · 0 comments

Comments

@fabrizio-fal
Copy link

There is a conflict with the library "go-http-metrics/middleware" used for gin server request metrics. please add the possibility to change the name or add a custom prefix.

below the error:

panic: a previously registered descriptor with the same fully-qualified name as Desc{fqName: "http_request_duration_seconds", help: "The latency of the HTTP requests.", constLabels:
{}, variableLabels: [service handler method code]} has different label names or a different help string

goroutine 1 [running]:
github.com/prometheus/client_golang/prometheus.(*Registry).MustRegister(0xc00048d500, {0xc0000121e0, 0x3, 0x0})
go/pkg/mod/github.com/prometheus/[email protected]/prometheus/registry.go:403 +0x7f
github.com/slok/go-http-metrics/metrics/prometheus.NewRecorder({{0x0, 0x0}, {0x1da5680, 0xb, 0xb}, {0xc00000e080, 0x8, 0x8}, {0x17f44f0, 0xc00009c050}, ...})
/go/pkg/mod/github.com/slok/[email protected]/metrics/prometheus/prometheus.go:101 +0x5a9

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

1 participant