Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(routing/http/server): adjust bucket sizes for http metrics #724

Merged
merged 5 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ The following emojis are used to highlight certain changes:
### Changed

- No longer using `github.com/jbenet/goprocess` to avoid requiring in dependents.
- `routing/http/server`: changed default Prometheus buckets for response size and duration to match real world data.

### 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