deadtrickster / prometheus.erl

Prometheus.io client in Erlang
MIT License
340 stars 115 forks source link

Built-in collectors fail promtool linting #135

Open mpalmer opened 2 years ago

mpalmer commented 2 years ago

With a stock install of prometheus.ex exporting the default Erlang metrics, the following linting failures are reported:

$ wget -O - -q http://localhost:9548/metrics | promtool check metrics
erlang_vm_statistics_context_switches counter metrics should have "_total" suffix
erlang_vm_statistics_garbage_collection_bytes_reclaimed counter metrics should have "_total" suffix
erlang_vm_memory_atom_bytes_total non-counter metrics should not have "_total" suffix
erlang_vm_statistics_garbage_collection_number_of_gcs counter metrics should have "_total" suffix
erlang_vm_statistics_garbage_collection_words_reclaimed counter metrics should have "_total" suffix
erlang_vm_statistics_runtime_milliseconds counter metrics should have "_total" suffix
erlang_vm_statistics_wallclock_time_milliseconds counter metrics should have "_total" suffix
erlang_vm_memory_bytes_total non-counter metrics should not have "_total" suffix
erlang_vm_memory_processes_bytes_total non-counter metrics should not have "_total" suffix
erlang_vm_memory_system_bytes_total non-counter metrics should not have "_total" suffix
erlang_vm_statistics_run_queues_length_total non-counter metrics should not have "_total" suffix
erlang_vm_atom_count non-histogram and non-summary metrics should not have "_count" suffix
erlang_vm_port_count non-histogram and non-summary metrics should not have "_count" suffix
erlang_vm_process_count non-histogram and non-summary metrics should not have "_count" suffix
erlang_vm_statistics_runtime_milliseconds use base unit "seconds" instead of "milliseconds"
erlang_vm_statistics_wallclock_time_milliseconds use base unit "seconds" instead of "milliseconds"

Allowing people to adjust their base units if they like is nice, but IMAO the out-of-the-box defaults should be promtool compliant.