Thanks for the PR. Two comments: - the code format checker seems to fail, could you please check with clang-format and update if necessary? - you introduced a new parameter "xhttp_prom_pkgmem_stats_enabled", what about just checking during startup if the kex module is available, if yes enable the statistics, if not log a INFO message about it. In the end there is already a parameter to specify the statistics to show: "xhttp_prom_stats", we probably should re-use it.
You are probably aware of this, but after changes just force-push to this PR is ok, no need to create a new one.