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

FORWARDER_PROM_NAMESPACE must be validated #508

Closed
mmatczuk opened this issue Nov 7, 2023 · 0 comments · Fixed by #519
Closed

FORWARDER_PROM_NAMESPACE must be validated #508

mmatczuk opened this issue Nov 7, 2023 · 0 comments · Fixed by #519
Labels
bug Something isn't working
Milestone

Comments

@mmatczuk
Copy link
Contributor

mmatczuk commented Nov 7, 2023

Using custom prom namespace can lead to panic

forwarder-e2e-upstream-proxy-1  | panic: descriptor Desc{fqName: "upstream-proxy_http_requests_total", help: "Total number of HTTP requests processed.", constLabels: {}, variableLabels: [{code <nil>} {method <nil>} {host <nil>} {source <nil>}]} is invalid: "upstream-proxy_http_requests_total" is not a valid metric name
forwarder-e2e-upstream-proxy-1  | 
forwarder-e2e-upstream-proxy-1  | 
forwarder-e2e-upstream-proxy-1  | goroutine 1 [running]:
forwarder-e2e-upstream-proxy-1  | github.com/prometheus/client_golang/prometheus.(*Registry).MustRegister(0x40002b0620?, {0x40002b5450?, 0x1, 0x0?})
forwarder-e2e-upstream-proxy-1  |       /Users/michal/go/pkg/mod/github.com/prometheus/[email protected]/prometheus/registry.go:405 +0x84
forwarder-e2e-upstream-proxy-1  | github.com/prometheus/client_golang/prometheus/promauto.Factory.NewCounterVec({{0xa41320?, 0x40002b80f0?}}, {{0x40002b0620, 0xe}, {0x0, 0x0}, {0x90f564, 0x13}, {0x922bf0, 0x28}, ...}, ...)
forwarder-e2e-upstream-proxy-1  |       /Users/michal/go/pkg/mod/github.com/prometheus/[email protected]/prometheus/promauto/auto.go:276 +0x178
forwarder-e2e-upstream-proxy-1  | github.com/saucelabs/forwarder/middleware.NewPrometheus({0xa41320?, 0x40002b80f0?}, {0x40002b0620, 0xe})
forwarder-e2e-upstream-proxy-1  |       /Users/michal/Sauce-CONNECT-5/forwarder/middleware/prometheus.go:58 +0x1cc
forwarder-e2e-upstream-proxy-1  | github.com/saucelabs/forwarder.(*HTTPProxy).middlewareStack(0x40002ce380)
forwarder-e2e-upstream-proxy-1  |       /Users/michal/Sauce-CONNECT-5/forwarder/http_proxy.go:361 +0x4ec
forwarder-e2e-upstream-proxy-1  | github.com/saucelabs/forwarder.(*HTTPProxy).configureProxy(0x40002ce380)
forwarder-e2e-upstream-proxy-1  |       /Users/michal/Sauce-CONNECT-5/forwarder/http_proxy.go:287 +0xb5c
forwarder-e2e-upstream-proxy-1  | github.com/saucelabs/forwarder.newHTTPProxy(0x40002de000, {0x0, 0x0}, 0x0, {0xa3a3e0, 0x40002bc500}, {0xa412f0?, 0x40002ab650})
forwarder-e2e-upstream-proxy-1  |       /Users/michal/Sauce-CONNECT-5/forwarder/http_proxy.go:203 +0x2f8
forwarder-e2e-upstream-proxy-1  | github.com/saucelabs/forwarder.NewHTTPProxy(0x8b4860?, {0x0?, 0x0?}, 0x906276?, {0xa3a3e0?, 0x40002bc500?}, {0xa412f0?, 0x40002ab650?})
forwarder-e2e-upstream-proxy-1  |       /Users/michal/Sauce-CONNECT-5/forwarder/http_proxy.go:146 +0x34
forwarder-e2e-upstream-proxy-1  | github.com/saucelabs/forwarder/cmd/forwarder/run.(*command).runE(0x40002a8300, 0x40002da300, {0x0?, 0x0?, 0x0?})
forwarder-e2e-upstream-proxy-1  |       /Users/michal/Sauce-CONNECT-5/forwarder/cmd/forwarder/run/run.go:169 +0xcf8
forwarder-e2e-upstream-proxy-1  | github.com/spf13/cobra.(*Command).execute(0x40002da300, {0x117c080, 0x0, 0x0})
forwarder-e2e-upstream-proxy-1  |       /Users/michal/go/pkg/mod/github.com/spf13/[email protected]/command.go:940 +0x658
forwarder-e2e-upstream-proxy-1  | github.com/spf13/cobra.(*Command).ExecuteC(0x40002da000)
forwarder-e2e-upstream-proxy-1  |       /Users/michal/go/pkg/mod/github.com/spf13/[email protected]/command.go:1068 +0x320
forwarder-e2e-upstream-proxy-1  | github.com/spf13/cobra.(*Command).Execute(...)
forwarder-e2e-upstream-proxy-1  |       /Users/michal/go/pkg/mod/github.com/spf13/[email protected]/command.go:992
forwarder-e2e-upstream-proxy-1  | main.main()
forwarder-e2e-upstream-proxy-1  |       /Users/michal/Sauce-CONNECT-5/forwarder/cmd/forwarder/main.go:14 +0x20
@mmatczuk mmatczuk added the bug Something isn't working label Nov 7, 2023
@mmatczuk mmatczuk added this to the v1.1 milestone Nov 7, 2023
@Choraden Choraden linked a pull request Nov 10, 2023 that will close this issue
Choraden added a commit that referenced this issue Nov 13, 2023
mmatczuk pushed a commit that referenced this issue Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant