Metric label values truncated when using OpenMetrics endpoint
Josef 'Jeff' Sipek
jeff.sipek at open-xchange.com
Mon Aug 24 15:47:11 EEST 2020
On Sat, Aug 22, 2020 at 00:31:36 +0000, Daan van Gorkum wrote:
> Hi,
>
> Recently we upgraded to Dovecot 2.3.11.3 and configured an example metric
> like this:
>
>
> metric imap_command {
> event_name = imap_command_finished
> group_by = cmd_name tagged_reply_state user remote_ip
Grouping by remote_ip seems a bit dangerous unless the ips are somehow
limited. Each unique value will result in (permanent) memory allocation, so
this has the potential to slowly grow the stats process large enough that
the vsize limit kicks in and the stats process gets killed and respawned.
> }
...
> While the result is great, I noticed that some metrics are being truncated
> (three dots at the end of the label value):
>
> dovecot_imap_command_duration_usecs_sum{cmd_name="FETCH",tagged_reply_state="OK",user="xxxxxxxxxxx.inbox at xxxxxxxxxxxxx…",remote_ip="XXXX:XXXX:XXXX:XXXX:cc6b:cc7a:d…"} 2346 1598055662473
>
> I couldn't find this information in the documentation so I'm wondering if
> this is a bug.
Hm. The submetric names are truncated to 32 bytes because nobody will ever
want metrics bigger than that. ;) Obviously, we need to revisit that
decision. There is no workaround that I can think of.
Jeff.
--
I'm somewhere between geek and normal.
- Linus Torvalds
More information about the dovecot
mailing list