You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the endpoint of the exporter is mapped to a subpath by a
reverse proxy, absolute links would break. Relative links continue
to work.
Co-authored-by: Karina Calma <karina_calma@infobest.ro>
Signed-off-by: Martin Bickel <martin.bickel@continental.com>
Copy file name to clipboardExpand all lines: prometheus-metrics-exporter-httpserver/src/main/java/io/prometheus/metrics/exporter/httpserver/DefaultHandler.java
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -21,15 +21,15 @@ public DefaultHandler() {
21
21
"<body>\n" +
22
22
"<h1>Prometheus Java Client</h1>\n" +
23
23
"<h2>Metrics Path</h2>\n" +
24
-
"The metrics path is <a href=\"/metrics\">/metrics</a>.\n" +
24
+
"The metrics path is <a href=\"metrics\">/metrics</a>.\n" +
25
25
"<h2>Name Filter</h2>\n" +
26
26
"If you want to scrape only specific metrics, use the <tt>name[]</tt> parameter like this:\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" +
35
35
"<pre>\n" +
@@ -45,9 +45,9 @@ public DefaultHandler() {
45
45
"in which case the default is Prometheus protobuf.\n" +
46
46
"The Prometheus Java metrics library supports a <tt>debug</tt> query parameter for viewing the different formats in a Web browser:\n" +
47
47
"<ul>\n" +
48
-
"<li><a href=\"/metrics?debug=openmetrics\">/metrics?debug=openmetrics</a>: View OpenMetrics text format.</li>\n" +
49
-
"<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" +
50
-
"<li><a href=\"/metrics?debug=prometheus-protobuf\">/metrics?debug=prometheus-protobuf</a>: View a text representation of the Prometheus protobuf format.</li>\n" +
48
+
"<li><a href=\"metrics?debug=openmetrics\">/metrics?debug=openmetrics</a>: View OpenMetrics text format.</li>\n" +
49
+
"<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" +
50
+
"<li><a href=\"metrics?debug=prometheus-protobuf\">/metrics?debug=prometheus-protobuf</a>: View a text representation of the Prometheus protobuf format.</li>\n" +
51
51
"</ul>\n" +
52
52
"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" +
0 commit comments