New plugin: git-repo-metrics

240 views
Skip to first unread message

Fabio Ponciroli

unread,
May 26, 2022, 5:00:28 AM5/26/22
to Repo and Gerrit Discussion
Hi,
during the last hackathon, we have been working on a plugin to systematically collect metrics from git repositories.

It is currently hosted on gerrithub [1].

Here [2] is some documentation about the metrics currently exposed and how to configure it.

I would like to import it into the official gerrit-review.googlesource.com.

Any objection?

Thanks,
Ponch

pon...@gmail.com

unread,
Jun 2, 2022, 11:03:08 AM6/2/22
to Repo and Gerrit Discussion
Hi,
if there are no objections can any maintainer add the new repo?

Thanks,
Ponch

Luca Milanesio

unread,
Jun 3, 2022, 1:57:59 AM6/3/22
to Fabio Ponciroli, Luca Milanesio, Repo and Gerrit Discussion

On 2 Jun 2022, at 08:03, pon...@gmail.com <pon...@gmail.com> wrote:

Hi,
if there are no objections can any maintainer add the new repo?

-- 
-- 
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

--- 
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/ecc93328-5264-4098-a989-4f9c89f9b70cn%40googlegroups.com.

Yingchun Li

unread,
Oct 10, 2022, 2:09:49 AM10/10/22
to Repo and Gerrit Discussion
Where is the output of this plugin? I have installed/configed the plugin,
but don't know how to check the output.

Fabio Ponciroli

unread,
Oct 10, 2022, 3:14:08 AM10/10/22
to Yingchun Li, Repo and Gerrit Discussion
Hi,
the plugin will publish new metrics. You will need to export the metrics with, for example, the Prometheus metrics reporter plugin [1].

As soon as you have traffic on the projects you want to collect metrics for, you will have these [2] additional metrics exposed. 

Hope this helps,
Ponch


Yingchun Li

unread,
Oct 10, 2022, 11:08:33 PM10/10/22
to Repo and Gerrit Discussion
On Monday, October 10, 2022 at 3:14:08 PM UTC+8 pon...@gmail.com wrote:
Hi,
the plugin will publish new metrics. You will need to export the metrics with, for example, the Prometheus metrics reporter plugin [1].

As soon as you have traffic on the projects you want to collect metrics for, you will have these [2] additional metrics exposed. 
Thank you Ponch。
I installed the two plugins, the output is just text(from link  http://my-git-server/plugins/metrics-reporter-prometheus/metrics),
it is hard to read. Is there visual GUI tables?

# HELP gerrit_build_info Gerrit build information. # TYPE gerrit_build_info counter gerrit_build_info{javaversion="11(11.0.16+8-post-Ubuntu-0ubuntu122.04)",version="3.6.1",revision="",} 0.0 # HELP caches_memory_cached_accounts Generated from Dropwizard metric import (metric=caches/memory_cached/accounts, type=com.google.gerrit.metrics.dropwizard.BucketedCallback$ValueGauge) # TYPE caches_memory_cached_accounts gauge caches_memory_cached_accounts 3.0 # HELP caches_memory_cached_adv_bases Generated from Dropwizard metric import (metric=caches/memory_cached/adv_bases, type=com.google.gerrit.metrics.dropwizard.BucketedCallback$ValueGauge) # TYPE caches_memory_cached_adv_bases gauge caches_memory_cached_adv_bases 0.0 # HELP caches_memory_cached_change_kind Generated from Dropwizard metric import (metric=caches/memory_cached/change_kind, type=com.google.gerrit.metrics.dropwizard.BucketedCallback$ValueGauge) # TYPE caches_memory_cached_change_kind gauge caches_memory_cached_change_kind 0.0 # HELP caches_memory_cached_change_notes Generated from Dropwizard metric import (metric=caches/memory_cached/change_notes, type=com.google.gerrit.metrics.dropwizard.BucketedCallback$ValueGauge) # TYPE caches_memory_cached_change_notes gauge caches_memory_cached_change_notes 0.0 # HELP caches_memory_cached_changeid_project Generated from Dropwizard metric import (metric=caches/memory_cached/changeid_project, type=com.google.gerrit.metrics.dropwizard.BucketedCallback$ValueGauge) # TYPE caches_memory_cached_changeid_project gauge caches_memory_cached_changeid_project 0.0 # HELP caches_memory_cached_changes Generated from Dropwizard metric import (metric=caches/memory_cached/changes, type=com.google.gerrit.metrics.dropwizard.BucketedCallback$ValueGauge) # TYPE caches_memory_cached_changes gauge caches_memory_cached_changes 0.0 # HELP caches_memory_cached_comment_context Generated from Dropwizard metric import (metric=caches/memory_cached/comment_context, type=com.google.gerrit.metrics.dropwizard.BucketedCallback$ValueGauge) # TYPE caches_memory_cached_comment_context gauge caches_memory_cached_comment_context 0.0 # HELP caches_memory_cached_conflicts Generated from Dropwizard metric import (metric=caches/memory_cached/conflicts, type=com.google.gerrit.metrics.dropwizard.BucketedCallback$ValueGauge) # TYPE caches_memory_cached_conflicts gauge caches_memory_cached_conflicts 0.0  

Fabio Ponciroli

unread,
Oct 11, 2022, 2:16:51 AM10/11/22
to Yingchun Li, Repo and Gerrit Discussion
Hi Yingchun,
you can use Prometheus [1] to import the metrics. It provides a graphing interface [2] to plot your metrics.

If you need more advanced visualization, look at visualisation tools able to import Prometheus data, for example, Grafana [3] [4].

Thanks,
Ponch


Matthias Sohn

unread,
Oct 11, 2022, 3:30:06 AM10/11/22
to Fabio Ponciroli, Yingchun Li, Repo and Gerrit Discussion
On Tue, Oct 11, 2022 at 8:16 AM Fabio Ponciroli <pon...@gmail.com> wrote:
Hi Yingchun,
you can use Prometheus [1] to import the metrics. It provides a graphing interface [2] to plot your metrics.

If you need more advanced visualization, look at visualisation tools able to import Prometheus data, for example, Grafana [3] [4].

Thanks,
Ponch


You may consider using gerrit-monitoring [5] which provides a monitoring setup for Gerrit
using Prometheus and a set of Grafana dashboards. 

Yingchun Li

unread,
Oct 11, 2022, 11:01:50 PM10/11/22
to Repo and Gerrit Discussion
Thank you Ponch, Matthias
Seems complicated, but I will try to setup them.

Reply all
Reply to author
Forward
0 new messages