Antony Mithun
03/26/2025, 1:01 PMlet hist = meter
.f64_histogram("test_hist")
.with_description("Time taken")
.with_unit("ms")
.build();
let start_time = Instant::now();
//do_somthing
let elapsed_time = start_time.elapsed().as_secs_f64() * 1000.0;
hist.record(elapsed_time, &[]);
In the SigNoz dashboard, I see my histogram metric in the dropdown when creating a panel, but it appears as three different metrics:
• hist_count
• hist_sum
• hist_bucket
However, when I select hist_bucket
, it shows no data. and I am struggling to understand the plot if I select other two.
What is the correct metric to use to properly visualize the histogram distribution? Do I need to configure anything else to see histogram buckets properly?
thanksAntony Mithun
03/27/2025, 2:19 PMvec![
500.0, 1000.0, 1500.0, 2000.0, 2500.0, 3000.0, 3500.0, 4000.0, 4500.0, 5000.0
]
Here is the relevant Rust code I used to create the histogram:
meter
.u64_histogram("function_execution_time-2")
.with_description("Time taken to execute a function")
.with_boundaries(vec![
500.0, 1000.0, 1500.0, 2000.0, 2500.0, 3000.0, 3500.0, 4000.0, 4500.0, 5000.0
])
.with_unit("ms")
.build()
To check if the values are being recorded, I ran the following Clickhouse query:
SELECT value
FROM signoz_metrics.distributed_samples_v4
WHERE metric_name = 'function_execution_time_2_bucket'
LIMIT 10
The query returns a value of 1
, but I’m not sure what this means.
Also, I see a 2950 value on the histogram panel, which I don't understand. Can someone explain what the 2950 value represents?Antony Mithun
03/27/2025, 2:20 PMSrikanth Chekuri
03/28/2025, 7:22 AMAntony Mithun
03/28/2025, 8:56 AMAntony Mithun
03/28/2025, 8:57 AMSrikanth Chekuri
03/28/2025, 9:36 AMAntony Mithun
03/28/2025, 10:08 AMSrikanth Chekuri
03/28/2025, 10:35 AMAntony Mithun
03/28/2025, 10:36 AM