Giter Club home page Giter Club logo

Comments (4)

winmillwill avatar winmillwill commented on July 21, 2024 1

I see from your example that is affecting you on how is being visualized, right? In what other sense affects you those Prometheus rules numbers?

I don't think these numbers (the ones in the PrometheusRule resources) affect the visualization per se ... I think that's down to the dashboard json not specifying a precision ... though it could be that it's an issue with grafana rounding because of all the trailing 9's.

As you say, it probably isn't having any other effect: the computation that prometheus does with these values is most likely the same either way. I guess I see this as an opportunity to remove a source of confusion, because the only computation we ever want to do is 1 - {{objectiveAsDecimal}} ... and I think we can just pass that term into the promql queries and let prometheus do the math. For my use case, I will probably be running the CLI in a CI/CD pipeline or storing the output in a repo. In either case, developers will review the diff of the PrometheusRules yaml and end up going "but that's not what I wanted". Again, I agree that it probably doesn't matter in terms of prometheus and grafana working as expected ... I just don't want to have the same conversation with N different teams as I help them adopt SLO's.

The dashboard you are referring to is the default dashboard? what version of Grafana are you using?

Yes, the one at grafana.com. I'm using grafana version 7.5.7.

To be clear I'm seeing a panel like this:
Screen Shot 2021-07-27 at 21 00 49

... and I'd like it to say 99.99% instead of 100.0%

from sloth.

slok avatar slok commented on July 21, 2024

Hi @winmillwill!

From my side I don't see a problem with those numbers because they happen under the hood, it is an implementation detail, how they are being represented on a dashboard is another thing and I'm with you.

I see from your example that is affecting you on how is being visualized, right? In what other sense affects you those Prometheus rules numbers?

The dashboard you are referring to is the default dashboard? what version of Grafana are you using?

from sloth.

slok avatar slok commented on July 21, 2024

Yesterday I checked and as you said, Grafana rounds automatically after 2 decimals, it happens the same with percentages and ratios, so the problem is not the 0.99900000000... (I did the same tests with 0.9999, 99.99...).

I was thinking about putting explicitly 3 decimals, however, I also don't like to have a 99 represented as 99.000, So I need to research a bit more of how to solve this in the best way, any way, this doesn't affect Sloth's Prometheus implementation in this sense.

from sloth.

slok avatar slok commented on July 21, 2024

After merging #172 and changing Sloth's dashboard with the 4th revision this issue is fixed.

Before:

Screenshot_20211005_074818

After:

Screenshot_20211005_074842

from sloth.

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.