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

Make NewInstrumentationMiddleware buckets configurable #3948

Merged
merged 2 commits into from
Mar 22, 2021

Conversation

metalmatze
Copy link
Contributor

  • I added CHANGELOG entry for this change.
  • Change is not relevant to the end user.

Changes

Set Thanos Receive specific histogram buckets for http_duration_seconds_bucket so that we can measure Receiver latency properly. Highest bucket being 5s.

It was always 99ms during my benchmarks...
Which is unsurprising when most requests fall within the buckets [0.01, 0.1]

Verification

I can see proper p99 latencies between 10ms and 100ms now. :)

Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>
Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>
Copy link
Member

@squat squat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@@ -150,7 +150,9 @@ func NewHandler(logger log.Logger, o *Options) *Handler {

ins := extpromhttp.NewNopInstrumentationMiddleware()
if o.Registry != nil {
ins = extpromhttp.NewInstrumentationMiddleware(o.Registry)
ins = extpromhttp.NewInstrumentationMiddleware(o.Registry,
[]float64{0.001, 0.005, 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1, 0.25, 0.5, 0.75, 1, 2, 3, 4, 5},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Member

@kakkoyun kakkoyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing 💯

@kakkoyun kakkoyun merged commit d173bcb into thanos-io:main Mar 22, 2021
@metalmatze metalmatze deleted the instrumentation-buckets branch March 22, 2021 14:49
clyang82 pushed a commit to stolostron/thanos that referenced this pull request Apr 27, 2021
* Make NewInstrumentationMiddleware buckets configurable

Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>

* Add Changelog entry for thanos-io#3948

Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants