diff --git a/examples/gateway/car/main.go b/examples/gateway/car/main.go index fdd80e8e2..b0884e1f2 100644 --- a/examples/gateway/car/main.go +++ b/examples/gateway/car/main.go @@ -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() @@ -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()) } diff --git a/examples/gateway/proxy/main.go b/examples/gateway/proxy/main.go index 4840f0927..793fee121 100644 --- a/examples/gateway/proxy/main.go +++ b/examples/gateway/proxy/main.go @@ -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() @@ -68,7 +68,9 @@ 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("Try loading an image: http://localhost:%d/ipfs/bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi", *port) + log.Printf("Try browsing Wikipedia snapshot: http://localhost:%d/ipfs/bafybeiaysi4s6lnjev27ln5icwm6tueaw2vdykrtjkwiphwekaywqhcjze", *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) } diff --git a/gateway/handler.go b/gateway/handler.go index 2f7f42a6c..a4716e2db 100644 --- a/gateway/handler.go +++ b/gateway/handler.go @@ -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( @@ -282,7 +282,7 @@ func newHandler(c Config, api API) *handler { unixfsGetMetric: newSummaryMetric( // TODO: remove? // (deprecated, use firstContentBlockGetMetric instead) "unixfs_get_latency_seconds", - "The time to receive the first UnixFS node on a GET from the gateway.", + "DEPRECATED: does not do what you think, use gw_first_content_block_get_latency_seconds instead.", ), } return i