Jump to content

Talk:Performance.wikimedia.org/Runbook

From Wikitech

Emphasize that timing metrics MUST be recorded in milliseconds while the topic/key MUST have the `_seconds` suffix

@Krinkle: Continuing our conversation from https://phabricator.wikimedia.org/T355837, I think this documentation (and probably also that for Gadgets) should be expanded to very clearly state the requirements regarding the units of the value and suffix of the key for timing metrics.

What do you think about adding a timing example to the Prometheus section:

mw.track( 'stats.mediawiki_baz_seconds', 1234.56 ); // key MUST have _seconds suffix, but value MUST be in milliseconds

and also adding that information again in the Prometheus paragraph just below it:

Note that for timing metrics this means that they must include the _seconds suffix and that the value provided in the second parameter must be in milliseconds!

MGrosse-WMF (talk) 16:14, 8 January 2025 (UTC)Reply