diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ed1fb078..6d32d0b6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,12 +16,12 @@ The following emojis are used to highlight certain changes: ### Added -- `routing/http/server`: added Prometheus instrumentation to http delegated routing endpoints. -- `routing/http/server`: added configurable routing timeout (`DefaultRoutingTimeout` being 30s) to prevent indefinite hangs during content/peer routing. Set custom duration via `WithRoutingTimeout`. +- `routing/http/server`: added built-in Prometheus instrumentation to http delegated `/routing/v1/` endpoints, with custom buckets for response size and duration to match real world data observed at [the `delegated-ipfs.dev` instance](https://docs.ipfs.tech/concepts/public-utilities/#delegated-routing). [#718](https://github.com/ipfs/boxo/pull/718) [#724](https://github.com/ipfs/boxo/pull/724) +- `routing/http/server`: added configurable routing timeout (`DefaultRoutingTimeout` being 30s) to prevent indefinite hangs during content/peer routing. Set custom duration via `WithRoutingTimeout`. [#720](https://github.com/ipfs/boxo/pull/720) ### Changed -- No longer using `github.com/jbenet/goprocess` to avoid requiring in dependents. +- No longer using `github.com/jbenet/goprocess` to avoid requiring in dependents. [#710](https://github.com/ipfs/boxo/pull/710) ### Removed diff --git a/routing/http/server/server.go b/routing/http/server/server.go index f6d0f1993..fd964cbab 100644 --- a/routing/http/server/server.go +++ b/routing/http/server/server.go @@ -158,9 +158,9 @@ func Handler(svc ContentRouter, opts ...Option) http.Handler { // Create middleware with prometheus recorder mdlw := middleware.New(middleware.Config{ Recorder: metrics.NewRecorder(metrics.Config{ - Registry: server.promRegistry, - Prefix: "delegated_routing_server", - + Registry: server.promRegistry, + Prefix: "delegated_routing_server", + SizeBuckets: prometheus.ExponentialBuckets(100, 4, 8), // [100 400 1600 6400 25600 102400 409600 1.6384e+06] DurationBuckets: []float64{0.1, 0.5, 1, 2, 5, 8, 10, 20, 30}, }), })