Skip to content

Commit

Permalink
Merge pull request #724 from ipfs:refine-buckets
Browse files Browse the repository at this point in the history
fix(routing/http/server): adjust bucket sizes for http metrics
  • Loading branch information
2color authored Nov 21, 2024
2 parents 13d0b32 + 55f0233 commit 138b596
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions routing/http/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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},
}),
})
Expand Down

0 comments on commit 138b596

Please sign in to comment.