Skip to content

GithubImporter: Fix import duration metric

Kassio Borges requested to merge kassio/github-importer-fix-histogram into master

What does this MR do and why?

Since project.full_path is user provided information, this means that the cardinality of this metric is not bound and we can't initialize the metric properly. Because the metric isn't initialized and the project is included we can never track the rate past 1 for each counter in the histogram: A histogram is a series of counters, in total there are number of buckets * number of label combinations counters that Prometheus uses to calculate the quantiles. For that, we're using a rate, which is the increase of a counter in seconds.

Related to:

Screenshots or screen recordings

These are strongly recommended to assist reviewers and reduce the time to merge your change.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Kassio Borges

Merge request reports

Loading