Note that I'm not modifying anything in the swh-web right now.
I'm just making just conversion happens at the right place so everything is fine. [1]
[1] I believe that when we'll be done with typing swh-storage and that we use swh-model objects everywhere.
We can discuss with @anlambert to simplify a bit the "swh-model" used within swh-web (preceding the almost "pervasive" use of our swh.model now), same goes for the archive-data storage used here (preceding the pytest fixtures).
I recall the main swh-model divergence needed here is a way to convert to hex the hashes in bytes and also make the optional value not shown in the main output result.
Like i said, to discuss later ;)
Related to T645
For all these histograms, we will want to change the configuration of the statsd exporter for this metric to generate a histogram with relevant buckets. Our default buckets are only relevant for timings and will be really wasteful for this (which will pretty much always return 0 or 1)
https://forge.softwareheritage.org/source/puppet-swh-site/browse/production/data/common/common.yaml$3124-3151
https://github.com/prometheus/statsd_exporter#statsd-timers-and-distributions
(something like:
(you will want to test that in docker as well)