Mark Hansen

Results 129 comments of Mark Hansen

Thanks for the quick review. I pushed a new version, hope you don't mind me marking the comments as resolved, please reopen if any further questions on them.

Could you elaborate? It seemed to me like whatever we pass to value, it’s converted to a float for output in floatToGoString. What constraints mean we have to keep ints...

Oh, is it so you can +1 your counter and have that work even when you run out of floating point precision to represent a +1 step? Yeah that’s important...

FYI keeping ints as ints isn't the behaviour today: it looks like the current openmetrics exposition.py always outputs ints as floats today (uses floatToGoString), see this test that inputs 17...

Had a go at preserving integer formatting in the openmetrics exposition.

Hi, sorry for delay, this is still on my radar, but I haven't had a lot of time lately -- still intending to finish this. On Thu, 21 May 2020...

It’d only break if someone was creating a metric but never turning it into a string. Probably unlikely, but maybe someone is holding them in memory and not outputting them?...

Having a quick look into this, looks like a common pinchpoint we could add this check would be the Sample constructor. But it's a namedtuple. In python3 there's typing.NamedTuple, but...

Could always write out the entire generated code body of the namedtuple and then change the constructor too! Not ideal for sure. On Thu, 19 Mar 2020 at 20:42, Mark...

Yeah add_metric would be quick... but looks like there are 8 implementations of add_metric which makes me feel a bit awkward. Good fallback option, trying to wrap the constructor now....