module System.Metrics.Prometheus.Metric where
import System.Metrics.Prometheus.Metric.Counter (Counter,
CounterSample)
import System.Metrics.Prometheus.Metric.Gauge (Gauge, GaugeSample)
import System.Metrics.Prometheus.Metric.Histogram (Histogram,
HistogramSample)
import System.Metrics.Prometheus.Metric.Summary (SummarySample)
data Metric
= CounterMetric Counter
| GaugeMetric Gauge
| HistogramMetric Histogram
data MetricSample
= CounterMetricSample CounterSample
| GaugeMetricSample GaugeSample
| HistogramMetricSample HistogramSample
| SummaryMetricSample SummarySample
metricSample :: (CounterSample -> a) -> (GaugeSample -> a)
-> (HistogramSample -> a) -> (SummarySample -> a)
-> MetricSample -> a
metricSample :: (CounterSample -> a)
-> (GaugeSample -> a)
-> (HistogramSample -> a)
-> (SummarySample -> a)
-> MetricSample
-> a
metricSample CounterSample -> a
f GaugeSample -> a
_ HistogramSample -> a
_ SummarySample -> a
_ (CounterMetricSample CounterSample
s) = CounterSample -> a
f CounterSample
s
metricSample CounterSample -> a
_ GaugeSample -> a
f HistogramSample -> a
_ SummarySample -> a
_ (GaugeMetricSample GaugeSample
s) = GaugeSample -> a
f GaugeSample
s
metricSample CounterSample -> a
_ GaugeSample -> a
_ HistogramSample -> a
f SummarySample -> a
_ (HistogramMetricSample HistogramSample
s) = HistogramSample -> a
f HistogramSample
s
metricSample CounterSample -> a
_ GaugeSample -> a
_ HistogramSample -> a
_ SummarySample -> a
f (SummaryMetricSample SummarySample
s) = SummarySample -> a
f SummarySample
s