I there.
Trying to figure out if this library could replace telemetry_metrics_prometheus due its metrics generation resource consumption I'm facing a non expected behavior.
The following configuration:
distribution(
[:repo, :query, :decode_time, :seconds],
description: "The time spent decoding the data received from the database.",
event_name: [:whatever, :repo, :query],
measurement: :decode_time,
reporter_options: [peep_bucket_calculator: Whatever.Bucket],
unit: {:native, :second}
)
defmodule Whatever.Bucket do
use Peep.Buckets.Custom,
buckets: [0.000001, 0.000005, 0.00001, 0.00005, 0.0001, 0.0005, 0.001, 0.005, 0.01, 0.05, 0.1, 0.5, 1, 2, 3, 4, 5]
end
Produces the following Prometheus data:
# HELP repo_query_decode_time_seconds The time spent decoding the data received from the database.
# TYPE repo_query_decode_time_seconds histogram
repo_query_decode_time_seconds_bucket{le="1.0e-6"} 2957
repo_query_decode_time_seconds_bucket{le="5.0e-6"} 10746
repo_query_decode_time_seconds_bucket{le="1.0e-5"} 11002
repo_query_decode_time_seconds_bucket{le="5.0e-5"} 11067
repo_query_decode_time_seconds_bucket{le="0.0001"} 11068
repo_query_decode_time_seconds_bucket{le="0.0005"} 11069
repo_query_decode_time_seconds_bucket{le="0.001"} 11069
repo_query_decode_time_seconds_bucket{le="0.005"} 11069
repo_query_decode_time_seconds_bucket{le="0.01"} 11069
repo_query_decode_time_seconds_bucket{le="0.05"} 11069
repo_query_decode_time_seconds_bucket{le="0.1"} 11069
repo_query_decode_time_seconds_bucket{le="0.5"} 11069
repo_query_decode_time_seconds_bucket{le="1.0"} 11069
repo_query_decode_time_seconds_bucket{le="2.0"} 11069
repo_query_decode_time_seconds_bucket{le="3.0"} 11069
repo_query_decode_time_seconds_bucket{le="4.0"} 11069
repo_query_decode_time_seconds_bucket{le="5.0"} 11069
repo_query_decode_time_seconds_bucket{le="+Inf"} 11069
repo_query_decode_time_seconds_sum 0
repo_query_decode_time_seconds_count 11069
Any reason or idea for the sum being 0?
Am I missing something while configuring Peep?
I there.
Trying to figure out if this library could replace
telemetry_metrics_prometheusdue its metrics generation resource consumption I'm facing a non expected behavior.The following configuration:
Produces the following Prometheus data:
Any reason or idea for the sum being 0?
Am I missing something while configuring Peep?