Closed ckreibich closed 2 months ago
The exposition format is now cleaner. Trailing fractional zeroes are pruned, and we don't include timestamps any more (which are optional in the exposition format's definition, and actually looks preferable to me)
Interesting. I guess we must have output the trailing zeroes and the timestamp as part of the Broker output, and prometheus-cpp doesn't do that.
This mainly expands the framework's documentation to give a bit more context on Prometheus, and moves the description of how to get telemetry out of Zeek up, before we give examples of the framework's use (which I think matters more for developers).
I noticed a few discrepancies while updating the code examples:
MetricOpts
says theunit
field is optional, but omitting it actually causes errors in the metrics registration functions (just search for unguarded access to$unit
—opts$unit
). I think that fix can wait for the first point release, particularly since existing code will still set the unit.This was a nice reminder that we'd catch such things earlier if we had a setup that automatically runs the documentation's code examples as btests, or some such.
The PR also updates the management framework side, though the changes here are much smaller.