Skip to content

Floating point support for gauges? #57

@billygout

Description

@billygout

I note that our Gauge() function takes an int64 value, and thus cannot represent floating-point values, and I have an application which uses floating point values to represent a fraction between 0 and 1. I also note that at least one other library takes a float64 for the gauges value (see: https://github.com/DataDog/datadog-go/blob/v5.0.2/statsd/statsd.go#L504). So, I'm curious if you would consider the addition of a new function with the following signature, or the like:
func (s *Client) FloatGauge(stat string, value float32, rate float32, tags ...Tag) error

If so, I might be able to PR it.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions