Determine if the full_path or importer should be used for import prometheus tracking
Question
The following discussion from !70012 (merged) should be addressed:
-
@dstull started a discussion: (+2 comments) I was able to consolidate now into using this already existing method - but I don't know about this block - I couldn't really track down by one is
importer: importer
and GitHub isproject: project.full_path
- is it about uniqueness/ability to track them in Prometheus - is one wrong/can we consolidate on just one here?
Conclusion
After gathering more information about how the metric works (gitlab-com/runbooks!4082 (comment 733191118)), it's clear now that this metric should not be associated with the project's full_path:
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 arenumber 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.