Mercurial > prosody-hg
comparison util/startup.lua @ 13989:a8aa17293d22
util.startup: Add another bucket for DNS lookup timings
Observed larger numbers than expected in the 4..Inf range, want more
details.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Tue, 28 Oct 2025 19:15:51 +0100 |
| parents | 260a6feebe5f |
| children | c1469296190d |
comparison
equal
deleted
inserted
replaced
| 13988:260a6feebe5f | 13989:a8aa17293d22 |
|---|---|
| 445 local timed = require"prosody.util.openmetrics".timed; | 445 local timed = require"prosody.util.openmetrics".timed; |
| 446 | 446 |
| 447 local adns = require "prosody.net.adns"; | 447 local adns = require "prosody.net.adns"; |
| 448 if adns.instrument then | 448 if adns.instrument then |
| 449 local m = statsmanager.metric("histogram", "prosody_dns", "seconds", "DNS lookups", { "qclass"; "qtype" }, { | 449 local m = statsmanager.metric("histogram", "prosody_dns", "seconds", "DNS lookups", { "qclass"; "qtype" }, { |
| 450 buckets = { 1 / 1024; 1 / 256; 1 / 64; 1 / 16; 1 / 4; 1; 4 }; | 450 buckets = { 1 / 1024; 1 / 256; 1 / 64; 1 / 16; 1 / 4; 1; 4; 16 }; |
| 451 }); | 451 }); |
| 452 local c = statsmanager.metric("histogram", "prosody_dns_response", "records", "DNS response records", { "qclass"; "qtype" }, { | 452 local c = statsmanager.metric("histogram", "prosody_dns_response", "records", "DNS response records", { "qclass"; "qtype" }, { |
| 453 buckets = { 0; 1; 2; 4; 8; 16 } }) | 453 buckets = { 0; 1; 2; 4; 8; 16 } }) |
| 454 local function m_times(qclass, qtype) return timed(m:with_labels(qclass, qtype)); end | 454 local function m_times(qclass, qtype) return timed(m:with_labels(qclass, qtype)); end |
| 455 local function m_counts(qclass, qtype, num) return c:with_labels(qclass, qtype):sample(num); end | 455 local function m_counts(qclass, qtype, num) return c:with_labels(qclass, qtype):sample(num); end |
