Releases: fimad/prometheus-haskell
prometheus-metrics-ghc-1.0.1.1
- Optimizations to measure GHC metrics with less polling.
prometheus-client-1.0.1
- Expose the
Buckettype.
prometheus-client-1.0.0.1
- Optimizations to improve memory usage.
prometheus-proc 0.1.2.0
- Support base-4.13 and GHC 8.8.
prometheus-client 1.0.0
Version 1.0.0 is a significant rewrite of some core parts of the API, as prometheus-effect has been deprecated in favour of this library.
Breaking Changes
New Metric API
The most substatial change regards the Metric interface. Unregistered counters are now wrapped in the Metric type (as before), but when registered, the Metric wrapper is removed. This change means that registered metrics are more lightweight (they are often just a newtype wrapper), but also helps users
distinguish between registered and unregistered metrics.
To adapt to this change, users should:
-
Store and pass registered metrics. Rather than passing
Metric Counter, preferregistering to obtain aCounterand pass that around. -
Top level registrations will no longer return
Metric. If you havehttpRequests :: Metric Counter httpRequests = unsafeRegisterIO $ counter (Info ...)
This should change to
httpRequests :: Counter httpRequests = unsafeRegister $ counter (Info ...)
Other Breaking Changes
-
Prometheus.exportMetricsAsTextnow returns a lazyByteStringrather than a strictByteString. This provides better streaming performance, and the underlyingByteStringis built using aBuilderfor improved performance. You can convert the lazyByteStringinto a strict one usingData.ByteString.Lazy.toStrict, but you should consider taking advantage of the lazy interface if possible. -
Prometheus.Infonow usesTextinstead ofString. It is recommended that you use theOverloadedStringsextension. -
The label interface has been changed to only support tuples of
Text. The tuple instances prevent any other tuple instances from being defined. This interface is in flux and may change again in the future. For now,OverloadedStringswill give you compatibility with the old interface.
Backwards Compatible Changes
- Many functions that were specialised to
IOhave been generalised to work inMonadIO.
Additions
Prometheus.countExceptionsto count the amount of exceptions a given monadic action throws.
0.2.0
0.1.1
prometheus-client
- Counters are now represented as floating point numbers instead of integers.
- New counter methods
addDurationToCounterandaddCounter.
prometheus-metrics-ghc
- Metrics that are always incrementing are now counters instead of gauges.
- Metric names have changed to be more inline with prometheus guidelines.