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

Need to provide a registerer #48

Merged
merged 2 commits into from
Apr 8, 2022
Merged

Need to provide a registerer #48

merged 2 commits into from
Apr 8, 2022

Conversation

leizor
Copy link
Contributor

@leizor leizor commented Apr 8, 2022

This fixes the following panic when running:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0xa737a4]

goroutine 1 [running]:
github.com/grafana/influx2cortex/pkg/remotewrite.NewRecorder({0xbf0967, 0xc}, {0x0, 0x0})
	/go/src/github.com/grafana/influx2cortex/pkg/remotewrite/recorder.go:31 +0x2c4
github.com/grafana/influx2cortex/pkg/influx.NewProxy({{{0xbebbfa, 0x7}, 0x1f90, 0x0, 0x12a05f200, 0x6fc23ac00, 0x6fc23ac00, 0x6fc23ac00, 0xa00000, 0x2387, ...}, ...})
	/go/src/github.com/grafana/influx2cortex/pkg/influx/api.go:123 +0x47
main.main()
	/go/src/github.com/grafana/influx2cortex/cmd/influx2cortex/main.go:24 +0x298

@grafanabot
Copy link

Go coverage report:

Click to expand.
File %
github.com/grafana/influx2cortex/pkg/errorx/errors.go 67.3%
github.com/grafana/influx2cortex/pkg/errorx/http_translator.go 100.0%
github.com/grafana/influx2cortex/pkg/influx/api.go 82.2%
github.com/grafana/influx2cortex/pkg/influx/errors.go 100.0%
github.com/grafana/influx2cortex/pkg/influx/parser.go 84.1%
github.com/grafana/influx2cortex/pkg/influx/recorder.go 91.7%
github.com/grafana/influx2cortex/pkg/remotewrite/client.go 69.1%
github.com/grafana/influx2cortex/pkg/remotewrite/measured_client.go 88.9%
github.com/grafana/influx2cortex/pkg/remotewrite/recorder.go 100.0%
github.com/grafana/influx2cortex/pkg/route/registerer.go 100.0%
github.com/grafana/influx2cortex/pkg/server/middleware/http_auth.go 0.0%
github.com/grafana/influx2cortex/pkg/server/middleware/http_fake_auth.go 0.0%
github.com/grafana/influx2cortex/pkg/server/middleware/instrument.go 6.7%
github.com/grafana/influx2cortex/pkg/server/middleware/logging.go 69.7%
github.com/grafana/influx2cortex/pkg/server/middleware/middleware.go 0.0%
github.com/grafana/influx2cortex/pkg/server/middleware/request_limits.go 81.8%
github.com/grafana/influx2cortex/pkg/server/middleware/response.go 57.1%
github.com/grafana/influx2cortex/pkg/server/middleware/route_matcher.go 0.0%
github.com/grafana/influx2cortex/pkg/server/middleware/tracer.go 13.0%
github.com/grafana/influx2cortex/pkg/server/server.go 83.3%
github.com/grafana/influx2cortex/pkg/tenant/resolver.go 75.6%
github.com/grafana/influx2cortex/pkg/tenant/tenant.go 91.7%
github.com/grafana/influx2cortex/pkg/util/bytereplacer/byte_replacer.go 100.0%
github.com/grafana/influx2cortex/pkg/util/extract_forwarded.go 66.7%
github.com/grafana/influx2cortex/pkg/util/http.go 68.3%
github.com/grafana/influx2cortex/pkg/util/log/experimental.go 0.0%
github.com/grafana/influx2cortex/pkg/util/log/log.go 0.0%
github.com/grafana/influx2cortex/pkg/util/log/rate_limit.go 90.0%
github.com/grafana/influx2cortex/pkg/util/log/wrappers.go 0.0%
github.com/grafana/influx2cortex/pkg/util/push/push.go 60.0%
total 65.4%

Go lint report:

No issues found. 😎

Copy link
Contributor

@ywwg ywwg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oop yes sorry this became necessary after a refactor.

@ywwg
Copy link
Contributor

ywwg commented Apr 8, 2022

make sure to select "squash and merge" from the green button dropdown menu (it will remember that choice for the future)

@leizor leizor merged commit 619c414 into main Apr 8, 2022
@leizor leizor deleted the leizor/prom-registerer branch April 8, 2022 15:11
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

Successfully merging this pull request may close these issues.

None yet

3 participants