Giter Site home page Giter Site logo

bitnomial / prometheus Goto Github PK

View Code? Open in Web Editor NEW
61.0 61.0 25.0 132 KB

Prometheus.io Haskell client.

Home Page: https://hackage.haskell.org/package/prometheus

License: BSD 3-Clause "New" or "Revised" License

Haskell 97.95% Emacs Lisp 2.05%
prometheus

prometheus's People

Contributors

4e6 avatar adinapoli avatar alios avatar b0d0nne11 avatar bergey avatar cdepillabout avatar chrisdone avatar erikd avatar lukehoersten avatar matobet avatar nhibberd avatar ramirez7 avatar shlevy avatar sorki avatar vmchale avatar wraithm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

prometheus's Issues

Allow non-Double Gauges

Currently using Prometheus Gauges to log a Word64 using fromIntegral and it gets reported as:

db_slot_height  2.3628703e7

This is a little suboptimal.

Would it be worth adding a Word64 gauge? If you can point me in the direction of what you want, I may even find time to do it myself.

Specify labels at the point of observation?

I was looking into Prometheus libraries and was attracted to this one by its type safety and restricted use of IO.

However, I can't figure out how to set labels at the point of observation, which is a particularly common use case. e.g. I'd like to record the method & status code of HTTP requests & responses alongside their latency.

This is something of a blocker for me. Are you open to accepting patches?

Please bump upper bound of text dependency on Hackage

Here in git you have:

               , text            >= 1.2  && < 2.1

but the version on Hackage has:

text >=1.2 && <1.3,

This can be fixed by a metadata update on Hackage.

I am currently using:

allow-newer: prometheus:text

in my cabal.project file

New version?

The latest version in git has a cabal file that says its version 2.1.0 (and which supports containers == 0.6.*), but the latest version on Hackage is 2.1.1 which does not support containers == 0.5.*.

Please release a new version

Current HEAD has more relaxed upper version bounds on bytestring, containers and transformers

If that can be fixed with a Hackage metadata revision then that would also be fine.

In my cabal.project file I currently have;

allow-newer:
  , prometheus:text

if impl(ghc >= 9.6)
  allow-newer:
    , prometheus:bytestring
    , prometheus:containers
    , prometheus:transformers

Question: metric persistance

Is there a solution for persisting metrics here? Is it needed? Specifically - if I restart my metrics server, how will that affect my counters? It seems they would be wiped.

Loosen http-client version bounds

New versions of http-client have been released that are compatible
with prometheus. Can the version bounds be widened to include these
new versions of http-client?

               , http-client    >= 0.4  && < 0.7

Should be sufficient.

Label values must be specified up-front (?)

Hi, I was comparing this library to prometheus-client and other prometheus libraries. One drawback, as far as I can tell from the API docs, is that all label values must be specified up-front. Is this correct? The documentation gives this as an example, which gives "success" or "failure" for the possible label values:

main :: IO ()
main = runRegistryT $ do
    -- Labels can be defined as lists or added to an empty label set
    connectSuccessGauge <- registerGauge "example_connections" (fromList [("login", "success")])
    connectFailureGauge <- registerGauge "example_connections" (addLabel "login" "failure" mempty)

This seems somewhat inflexible. For example, the Prometheus docs suggest having an http_requests_total with a label for the status code (https://prometheus.io/docs/practices/instrumentation/#use-labels). If you had to specify the status code up front, it seems like you'd have to auto-create values for 100โ€“599, which isn't ideal.

Other libraries don't have this restriction, e.g. https://github.com/prometheus/client_ruby#summary, for comparison

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.