Implementations like tally, prom, go-kit, influx and expvar support float64 gauges, but jaeger-lib casts the int64 to a float64 value. Is there a reason for this?
Update Gauge to use float64 instead of int64 in jaeger-lib 3.0; alternatively jaeger-lib can declare new types GaugeV2, FactoryV2, etc and create an adaptor.
Requirement
We would like to emit gauge updates with floating numbers (e.g. probabilities)
Problem
The gauge interface in jaeger-lib only supports
int64
https://github.com/jaegertracing/jaeger-lib/blob/78a0e7f3cd0c2ab3f747af150d98f534879f09f3/metrics/gauge.go#L18-L21
Implementations like tally, prom, go-kit, influx and expvar support
float64
gauges, butjaeger-lib
casts theint64
to afloat64
value. Is there a reason for this?https://github.com/jaegertracing/jaeger-lib/blob/78a0e7f3cd0c2ab3f747af150d98f534879f09f3/metrics/prometheus/factory.go#L230-L232
https://github.com/jaegertracing/jaeger-lib/blob/78a0e7f3cd0c2ab3f747af150d98f534879f09f3/metrics/tally/metrics.go#L49-L51
https://github.com/jaegertracing/jaeger-lib/blob/78a0e7f3cd0c2ab3f747af150d98f534879f09f3/metrics/go-kit/metrics.go#L49-L51
Proposal
Update
Gauge
to usefloat64
instead ofint64
injaeger-lib
3.0; alternativelyjaeger-lib
can declare new typesGaugeV2
,FactoryV2
, etc and create an adaptor.