Skip to content

Commit

Permalink
Change links on front page to be relative (#981)
Browse files Browse the repository at this point in the history
When the endpoint of the exporter is mapped to a subpath by a
reverse proxy, absolute links would break. Relative links continue
to work.

Signed-off-by: Martin Bickel <[email protected]>
Co-authored-by: Karina Calma <[email protected]>
  • Loading branch information
MaBiConti and karina-calma authored Aug 29, 2024
1 parent 9f22e9d commit b29d4b8
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ public DefaultHandler() {
"<body>\n" +
"<h1>Prometheus Java Client</h1>\n" +
"<h2>Metrics Path</h2>\n" +
"The metrics path is <a href=\"/metrics\">/metrics</a>.\n" +
"The metrics path is <a href=\"metrics\">/metrics</a>.\n" +
"<h2>Name Filter</h2>\n" +
"If you want to scrape only specific metrics, use the <tt>name[]</tt> parameter like this:\n" +
"<ul>\n" +
"<li><a href=\"/metrics?name[]=my_metric\">/metrics?name[]=my_metric</a></li>\n" +
"<li><a href=\"metrics?name[]=my_metric\">/metrics?name[]=my_metric</a></li>\n" +
"</ul>\n" +
"You can also use multiple <tt>name[]</tt> parameters to query multiple metrics:\n" +
"<ul>\n" +
"<li><a href=\"/metrics?name[]=my_metric_a&name=my_metrics_b\">/metrics?name[]=my_metric_a&amp;name=[]=my_metric_b</a></li>\n" +
"<li><a href=\"metrics?name[]=my_metric_a&name=my_metrics_b\">/metrics?name[]=my_metric_a&amp;name=[]=my_metric_b</a></li>\n" +
"</ul>\n" +
"The <tt>name[]</tt> parameter can be used by the Prometheus server for scraping. Add the following snippet to your scrape job configuration in <tt>prometheus.yaml</tt>:\n" +
"<pre>\n" +
Expand All @@ -45,9 +45,9 @@ public DefaultHandler() {
"in which case the default is Prometheus protobuf.\n" +
"The Prometheus Java metrics library supports a <tt>debug</tt> query parameter for viewing the different formats in a Web browser:\n" +
"<ul>\n" +
"<li><a href=\"/metrics?debug=openmetrics\">/metrics?debug=openmetrics</a>: View OpenMetrics text format.</li>\n" +
"<li><a href=\"/metrics?debug=text\">/metrics?debug=text</a>: View Prometheus text format (this is the default when accessing the <a href=\"/metrics\">/metrics</a> endpoint with a Web browser).</li>\n" +
"<li><a href=\"/metrics?debug=prometheus-protobuf\">/metrics?debug=prometheus-protobuf</a>: View a text representation of the Prometheus protobuf format.</li>\n" +
"<li><a href=\"metrics?debug=openmetrics\">/metrics?debug=openmetrics</a>: View OpenMetrics text format.</li>\n" +
"<li><a href=\"metrics?debug=text\">/metrics?debug=text</a>: View Prometheus text format (this is the default when accessing the <a href=\"metrics\">/metrics</a> endpoint with a Web browser).</li>\n" +
"<li><a href=\"metrics?debug=prometheus-protobuf\">/metrics?debug=prometheus-protobuf</a>: View a text representation of the Prometheus protobuf format.</li>\n" +
"</ul>\n" +
"Note that the <tt>debug</tt> parameter is only for viewing different formats in a Web browser, it should not be used by the Prometheus server for scraping. The Prometheus server uses the <tt>Accept</tt> header for indicating which format it accepts.\n" +
"</body>\n" +
Expand Down

0 comments on commit b29d4b8

Please sign in to comment.