Git Product home page Git Product logo

Comments (6)

RustedBones avatar RustedBones commented on June 14, 2024

I think the issue comes from the histogram_quantile function. Seems in the doc it requires sum instead of average.

Can you curl the endpoint and paste the result you have for the akka_http_responses_duration_seconds_bucket metrics ? This will help for investigation.

from akka-http-metrics.

gunjdesai avatar gunjdesai commented on June 14, 2024

I did try using sum for the histogram_quantile function but it yields the same result.

The result of the metrics endpoint is as follows

# HELP akka_http_connections_active Active TCP connections
# TYPE akka_http_connections_active gauge
akka_http_connections_active 5.0
# HELP akka_http_requests_active Active HTTP requests
# TYPE akka_http_requests_active gauge
akka_http_requests_active 0.0
# HELP akka_http_responses_size_bytes HTTP response size
# TYPE akka_http_responses_size_bytes summary
akka_http_responses_size_bytes{quantile="0.75",} NaN
akka_http_responses_size_bytes{quantile="0.95",} NaN
akka_http_responses_size_bytes{quantile="0.98",} NaN
akka_http_responses_size_bytes{quantile="0.99",} NaN
akka_http_responses_size_bytes{quantile="0.999",} NaN
akka_http_responses_size_bytes_count 1.0
akka_http_responses_size_bytes_sum 81.0
# HELP akka_http_connections_total Total TCP connections
# TYPE akka_http_connections_total counter
akka_http_connections_total 218092.0
# HELP akka_http_responses_duration_seconds HTTP response duration
# TYPE akka_http_responses_duration_seconds histogram
akka_http_responses_duration_seconds_bucket{le="1.0",} 234400.0
akka_http_responses_duration_seconds_bucket{le="2.0",} 234400.0
akka_http_responses_duration_seconds_bucket{le="3.0",} 234400.0
akka_http_responses_duration_seconds_bucket{le="5.0",} 234400.0
akka_http_responses_duration_seconds_bucket{le="8.0",} 234400.0
akka_http_responses_duration_seconds_bucket{le="13.0",} 234400.0
akka_http_responses_duration_seconds_bucket{le="21.0",} 234400.0
akka_http_responses_duration_seconds_bucket{le="34.0",} 234400.0
akka_http_responses_duration_seconds_bucket{le="+Inf",} 234400.0
akka_http_responses_duration_seconds_count 234400.0
akka_http_responses_duration_seconds_sum 1.632999999999979
# HELP akka_http_responses_total HTTP responses
# TYPE akka_http_responses_total counter
akka_http_responses_total 234400.0
# HELP akka_http_requests_total Total HTTP requests
# TYPE akka_http_requests_total counter
akka_http_requests_total 234400.0
# HELP akka_http_requests_size_bytes HTTP request size
# TYPE akka_http_requests_size_bytes summary
akka_http_requests_size_bytes{quantile="0.5",} 0.0
akka_http_requests_size_bytes{quantile="0.75",} 0.0
akka_http_requests_size_bytes{quantile="0.9",} 0.0
akka_http_requests_size_bytes{quantile="0.95",} 0.0
akka_http_requests_size_bytes{quantile="0.99",} 0.0
akka_http_requests_size_bytes_count 234400.0
akka_http_requests_size_bytes_sum 425.0

from akka-http-metrics.

RustedBones avatar RustedBones commented on June 14, 2024

Your buckets are actually miss-configured for your usage:

Buckets(1, 2, 3, 5, 8, 13, 21, 34)

tells your smallest bucket is [0s, 1s[ which contains all of your requests.
You'll then not be able to precisely plot the quantiles.

If your timeout is 200ms, I would suggest to define your buckets more like

Buckets(
  0.01, 0.02, 0.03, 0.04, 0.05 0.06, 0.07, 0.08, 0.09, 0.1,
  0.11, 0.12, 0.13, 0.14, 0.15 0.16, 0.17, 0.18, 0.19, 0.2,
  0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1
)

from akka-http-metrics.

gunjdesai avatar gunjdesai commented on June 14, 2024

Oh ok, my bad. Let me try this out.

from akka-http-metrics.

RustedBones avatar RustedBones commented on June 14, 2024

No worries. The example given in the README is not really meant to be used as is.
Settings is already configured with more sensible defaults here.

Just overwrite what you need.

from akka-http-metrics.

gunjdesai avatar gunjdesai commented on June 14, 2024

Worked like a dream. Thank you so much for your instant help. Really appreciate it.

from akka-http-metrics.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.