metrics: use non decimal version for timer.

- added bucket registry
- some small fixes
This commit is contained in:
RhodeCode Admin 2022-10-25 16:39:23 +02:00
parent e9cba7b782
commit 059911817e
4 changed files with 28 additions and 9 deletions

View file

@ -135,10 +135,10 @@ def make_pyramid_app(global_config, **settings):
log.info('Pyramid app `%s` created and configured in %.2fs',
pyramid_app.func_name, total_time)
if statsd:
elapsed_time_ms = 1000.0 * total_time
elapsed_time_ms = round(1000.0 * total_time) # use ms only rounded time
statsd.timing('rhodecode_app_bootstrap_timing', elapsed_time_ms, tags=[
"pyramid_app:{}".format(pyramid_app.func_name)
])
], use_decimals=False)
return pyramid_app