beam-telemetry / telemetry_metrics_prometheus_core

Core Prometheus Telemetry.Metrics Reporter package for telemetry_metrics_prometheus
Apache License 2.0
35 stars 30 forks source link

Where are time units actually used? #2

Closed isaacsanders closed 5 years ago

isaacsanders commented 5 years ago

I have scoured this repo, and it is not used.

isaacsanders commented 5 years ago

I had been under the impression that Telemetry.Metrics did nothing, but it seems to do the conversion. Thanks

bryannaegele commented 5 years ago

Yep, it actually does stuff!

Metrics generates a utility function under the hood that automatically does time conversions when they're in the definition so that every reporter didn't have to reimplement that code. We only do that for time conversions though, so if you ever need to do memory size conversions, that requires a custom function, e.g. kilobytes to bytes.