DropWizard metric support

Gerrit server supports defining and recording metrics.  Metric
reporters for monitoring can be implemented as plugins.  A basic
Graphite reporter is available here:

  https://gerrit-review.googlesource.com/#/c/72202/

Some example metrics are included in this change:

  change/query/query_latency
  (Query latency)

  sshd/sessions/connected
  (SSH sessions connected)

  sshd/sessions/created/count
  (SSH connections created)

  git/upload-pack
  (Upload packs requests)

Partially-by: Gustaf Lundh <gustaflh@axis.com>
Change-Id: I46a07aace57efe236ee724ec8d34c581e2c37965
This commit is contained in:
Shawn Pearce
2015-11-08 11:44:03 -08:00
parent 40d64f6d43
commit f70a242ad5
21 changed files with 817 additions and 6 deletions

View File

@@ -236,7 +236,7 @@ public class ServerPlugin extends Plugin {
if (getApiType() == ApiType.PLUGIN) {
modules.add(env.getSysModule());
}
modules.add(new ServerPluginInfoModule(this));
modules.add(new ServerPluginInfoModule(this, env.getServerMetrics()));
return Guice.createInjector(modules);
}