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

Incorrect version reported on the /metrics endpoint #3645

Open
jnsgruk opened this issue Aug 18, 2023 · 8 comments
Open

Incorrect version reported on the /metrics endpoint #3645

jnsgruk opened this issue Aug 18, 2023 · 8 comments

Comments

@jnsgruk
Copy link
Contributor

jnsgruk commented Aug 18, 2023

Looking at Parca 0.18.0, the version reported by the CLI differs from the version reported in the metrics:

image

@jnsgruk
Copy link
Contributor Author

jnsgruk commented Aug 18, 2023

Reading a bit more about how this is populated from: Hmm, I'm not sure I know how to get around this: https://pkg.go.dev/github.com/rb-go/promcolls/buildinfo

I'm not sure there is a trivial way to fix this given how Parca is built.

@kakkoyun
Copy link
Member

Reading a bit more about how this is populated from: Hmm, I'm not sure I know how to get around this: https://pkg.go.dev/github.com/rb-go/promcolls/buildinfo

I'm not sure there is a trivial way to fix this given how Parca is built.

This is not a package we actually use 🤔

@jnsgruk
Copy link
Contributor Author

jnsgruk commented Aug 18, 2023

Ah, okay, I think I misunderstood intitally. Must've got my wires crossed in Googling...!

Looking back at this line it looks like it actually goes back to here.

Looks like there is an ongoing issue here: golang/go#29228

@kakkoyun
Copy link
Member

It is coming from client_golang:

func NewBuildInfoCollector() Collector {
	path, version, sum := "unknown", "unknown", "unknown"
	if bi, ok := debug.ReadBuildInfo(); ok {
		path = bi.Main.Path
		version = bi.Main.Version
		sum = bi.Main.Sum
	}
	c := &selfCollector{MustNewConstMetric(
		NewDesc(
			"go_build_info",
			"Build information about the main Go module.",
			nil, Labels{"path": path, "version": version, "checksum": sum},
		),
		GaugeValue, 1)}
	c.init(c.self)
	return c
}

@kakkoyun
Copy link
Member

Ok you beat me to it.

@kakkoyun
Copy link
Member

@jnsgruk If you have a workaround already, you can send a PR to client_golang until it is fixed in Go. I can review it (I'm a maintainer) and ensure it's shipped before the next release of client_golang (which should be in a couple of days).

@jnsgruk
Copy link
Contributor Author

jnsgruk commented Aug 18, 2023

I don't have a workaround at the moment. My window for fun ran out today ;-)

@kakkoyun
Copy link
Member

kakkoyun commented Aug 18, 2023

I'll try to take a look at it over the weekend in my fun time :D

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