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

exporter: link to actual metricsPath #99

Merged
merged 2 commits into from
May 4, 2020
Merged

Conversation

greut
Copy link
Contributor

@greut greut commented May 1, 2020

Proposed changes

The HTML on the / path show an hardcoded value for the metrics path. This fixes it.

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING guide
  • I have proven my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have ensured the README is up to date
  • I have rebased my branch onto master
  • I will ensure my PR is targeting the master branch and pulling from my branch on my own fork

Signed-off-by: Yoan Blanc <yoan@dosimple.ch>
@pleshakov pleshakov added the enhancement Pull requests for new features/feature enhancements label May 1, 2020
Copy link
Contributor

@pleshakov pleshakov left a comment

Choose a reason for hiding this comment

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

Hi @greut

Thanks for the PR!

I left a small comment. Otherwise, looks good!

exporter.go Outdated
<head><title>NGINX Exporter</title></head>
<body>
_, err := fmt.Fprintf(w, `<!DOCTYPE html>
<meta charset="utf-8">
Copy link
Contributor

Choose a reason for hiding this comment

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

not sure if meta is neccesary, because the exporter already includes the charset in the response header:

$ curl http://localhost:9113/ -I
HTTP/1.1 200 OK
. . .
Content-Type: text/html; charset=utf-8

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, I've removed it.

Copy link
Member

@lucacome lucacome left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Yoan Blanc <yoan@dosimple.ch>
@pleshakov pleshakov merged commit 837d51e into nginxinc:master May 4, 2020
@pleshakov
Copy link
Contributor

@greut thanks!

@greut greut deleted the modern-html branch May 4, 2020 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Pull requests for new features/feature enhancements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants