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

Version metrics #40

Merged
merged 3 commits into from
Mar 27, 2019
Merged

Version metrics #40

merged 3 commits into from
Mar 27, 2019

Conversation

pboothe
Copy link
Contributor

@pboothe pboothe commented Mar 26, 2019

This change is Reviewable

@coveralls
Copy link
Collaborator

coveralls commented Mar 26, 2019

Pull Request Test Coverage Report for Build 368

  • 10 of 10 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.5%) to 71.48%

Totals Coverage Status
Change from base Build 366: 0.5%
Covered Lines: 396
Relevant Lines: 554

💛 - Coveralls

Copy link
Contributor

@stephen-soltesz stephen-soltesz left a comment

Choose a reason for hiding this comment

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

One specific change, looks good otherwise.

Reviewed 1 of 4 files at r1.
Reviewable status: 0 of 1 LGTMs obtained


prometheusx/prom.go, line 47 at r1 (raw file):

	number, err := strconv.ParseInt(commit, 16, 64)
	if err == nil {
		gitShortCommitMetric.Set(float64(number))

Please add the commit as a label also. In Grafana it will be possible to extract that label and turn it into a link. Indeed, if we have two commit labels from different versions we can even construct a URL to github the shows us the diff. I don't think I know how to achieve the same thing with the value alone.


prometheusx/prom.go, line 49 at r1 (raw file):

		gitShortCommitMetric.Set(float64(number))
	} else {
		gitShortCommitMetric.Set(0)

nit: is 0000000 a valid git commit short hash?

Copy link
Contributor Author

@pboothe pboothe left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 LGTMs obtained


prometheusx/prom.go, line 47 at r1 (raw file):

Previously, stephen-soltesz (Stephen Soltesz) wrote…

Please add the commit as a label also. In Grafana it will be possible to extract that label and turn it into a link. Indeed, if we have two commit labels from different versions we can even construct a URL to github the shows us the diff. I don't think I know how to achieve the same thing with the value alone.

Done.


prometheusx/prom.go, line 49 at r1 (raw file):

Previously, stephen-soltesz (Stephen Soltesz) wrote…

nit: is 0000000 a valid git commit short hash?

Yup, but very unlikely. If this bites us, please say "I told you so"

Copy link
Contributor

@stephen-soltesz stephen-soltesz left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: :shipit: complete! 1 of 1 LGTMs obtained

It should be a symlink toa central location, not a per-repo submodule.
@pboothe
Copy link
Contributor Author

pboothe commented Mar 27, 2019

Rebased because the master branch updated. All tests passed, no merge conflicts. Merging now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants