dminuoso / servant-prometheus

Automatically produce per-endpoint monitoring for servant apps
BSD 3-Clause "New" or "Revised" License
1 stars 3 forks source link

Make metric names more idiomatic #14

Open jessekempf opened 5 years ago

dminuoso commented 4 years ago

Thank you for the merge request.

Can you explan why you're hiding the metrics in an existential? The test suite currently fails to build, and it's not trivially fixable because we can't recover the existential from the GADT. At the very least we should either add a Typeable constraint, or maybe not use this existential.

[1 of 2] Compiling Servant.PrometheusSpec ( test/Servant/PrometheusSpec.hs, dist/build/spec/spec-tmp/Servant/PrometheusSpec.o )

test/Servant/PrometheusSpec.hs:50:37: error:
    Variable not in scope:
      metersResponses
        :: Meters
           -> prometheus-client-1.0.0:Prometheus.Metric.Vector.Vector
                [Char] prometheus-client-1.0.0:Prometheus.Metric.Counter.Counter
   |
50 |                 r <- getVectorWith (metersResponses v) getCounter
   |                                     ^^^^^^^^^^^^^^^

test/Servant/PrometheusSpec.hs:55:37: error:
    Variable not in scope:
      metersResponses
        :: Meters
           -> prometheus-client-1.0.0:Prometheus.Metric.Vector.Vector
                [Char] prometheus-client-1.0.0:Prometheus.Metric.Counter.Counter
   |
55 |                 r <- getVectorWith (metersResponses v) getCounter
   |                                     ^^^^^^^^^^^^^^^

test/Servant/PrometheusSpec.hs:60:37: error:
    Variable not in scope:
      metersResponses
        :: Meters
           -> prometheus-client-1.0.0:Prometheus.Metric.Vector.Vector
                [Char] prometheus-client-1.0.0:Prometheus.Metric.Counter.Counter
   |
60 |                 r <- getVectorWith (metersResponses v) getCounter
   |                                     ^^^^^^^^^^^^^^^

builder for '/nix/store/34f898sn047n9nl7jfgn60l37bwxbgr5-servant-prometheus-0.2.0.0.drv' failed with exit code 1
error: build of '/nix/store/34f898sn047n9nl7jfgn60l37bwxbgr5-servant-prometheus-0.2.0.0.drv' failed