ethercrow / opentelemetry-haskell

The OpenTelemetry Haskell Client https://opentelemetry.io
Other
65 stars 6 forks source link

Implement the Metrics part of OpenTelemetry API #12

Closed ethercrow closed 4 years ago

ethercrow commented 4 years ago

Currently only the Trace part is implemented.

ethercrow commented 4 years ago

I think it would be nice to start with a Int Gauge because we already have some internal ones like thread count and heap size.

The API can be:

registerIntGauge :: ByteString -> IO IntGauge -- creates a gauge with a unique id and the given name, outputs both to eventlog
setIntGauge :: Int -> IntGauge -> IO () -- outputs the gauge id and the provided value to the eventlog
mpardalos commented 4 years ago

I think Gauges have been removed now. Here is the new spec for instruments. I think the closest to the old Gauge right now is ValueRecorder?

I have been working on support for these here:

The reason for the 3 different recording functions (which all do the same) and the Instruments being a GADT is the specification here.

ethercrow commented 4 years ago

Indeed it seems that ValueRecorder is a serious business speak for a Gauge. This is fine.