File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
src/main/java/com/gitblit/guice Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 4444import com .gitblit .servlet .SyndicationServlet ;
4545import com .gitblit .wicket .GitblitWicketFilter ;
4646import com .google .common .base .Joiner ;
47+ import com .google .inject .Scopes ;
4748import com .google .inject .servlet .ServletModule ;
49+ import io .prometheus .client .exporter .MetricsServlet ;
50+ import io .prometheus .client .hotspot .DefaultExports ;
4851
4952/**
5053 * Defines all the web servlets & filters.
@@ -79,6 +82,11 @@ protected void configureServlets() {
7982 serve ("/robots.txt" ).with (RobotsTxtServlet .class );
8083 serve ("/logo.png" ).with (LogoServlet .class );
8184
85+ // Prometheus
86+ bind (MetricsServlet .class ).in (Scopes .SINGLETON );
87+ serve (fuzzy ("/prometheus/" )).with (MetricsServlet .class );
88+ DefaultExports .initialize ();
89+
8290 /* Prevent accidental access to 'resources' such as GitBlit java classes
8391 *
8492 * In the GO setup the JAR containing the application and the WAR injected
You can’t perform that action at this time.
0 commit comments