util.startup: Record current version in a metric

Useful to have this info available when juggling metrics, e.g. to
see if things changed between versions.
This commit is contained in:
Kim Alvefur 2023-05-31 01:14:59 +02:00
parent d098a73534
commit 6c17ba5f28

View file

@ -367,7 +367,7 @@ function startup.load_secondary_libraries()
--- Load and initialise core modules
require "prosody.util.xmppstream"
require "prosody.core.stanza_router"
require "prosody.core.statsmanager"
require "prosody.core.statsmanager".metric("gauge", "prosody_info", "", "Prosody version", { "version" }):with_labels(prosody.version):set(1);
require "prosody.core.hostmanager"
require "prosody.core.portmanager"
require "prosody.core.modulemanager"