Skip to content

Commit

Permalink
docs: improved metrics descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
lidel authored Feb 8, 2023
1 parent 8fcb67e commit 54be207
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions examples/gateway/car/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func main() {
},
}

// Creates a mus to serve the prometheus metrics alongside the gateway. This
// Creates a mux to serve the prometheus metrics alongside the gateway. This
// step is optional and only required if you need or want to access the metrics.
// You may also decide to expose the metrics on a different path, or port.
mux := http.NewServeMux()
Expand All @@ -70,7 +70,7 @@ func main() {
handler = gateway.WithHostname(mux, gwAPI, publicGateways, noDNSLink)

log.Printf("Listening on http://localhost:%d", *port)
log.Printf("Prometheus metrics available on http://127.0.0.1:%d/debug/metrics/prometheus", *port)
log.Printf("Metrics available at http://127.0.0.1:%d/debug/metrics/prometheus", *port)
for _, cid := range roots {
log.Printf("Hosting CAR root at http://localhost:%d/ipfs/%s", *port, cid.String())
}
Expand Down
4 changes: 2 additions & 2 deletions examples/gateway/proxy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func main() {
},
}

// Creates a mus to serve the prometheus metrics alongside the gateway. This
// Creates a mux to serve the prometheus metrics alongside the gateway. This
// step is optional and only required if you need or want to access the metrics.
// You may also decide to expose the metrics on a different path, or port.
mux := http.NewServeMux()
Expand All @@ -68,7 +68,7 @@ func main() {
handler = gateway.WithHostname(mux, gwAPI, publicGateways, noDNSLink)

log.Printf("Listening on http://localhost:%d", *port)
log.Printf("Prometheus metrics available on http://127.0.0.1:%d/debug/metrics/prometheus", *port)
log.Printf("Metrics available at http://127.0.0.1:%d/debug/metrics/prometheus", *port)
if err := http.ListenAndServe(":"+strconv.Itoa(*port), handler); err != nil {
log.Fatal(err)
}
Expand Down
2 changes: 1 addition & 1 deletion gateway/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ func newHandler(c Config, api API) *handler {
// Generic: time it takes to execute a successful gateway request (all request types)
getMetric: newHistogramMetric(
"gw_get_duration_seconds",
"The time to GET a successful gateway request (all request types).",
"The time to GET a successful response to a request (all content types).",
),
// UnixFS: time it takes to return a file
unixfsFileGetMetric: newHistogramMetric(
Expand Down

0 comments on commit 54be207

Please sign in to comment.