Skip to content

Commit

Permalink
Start HTTP server AFTER verifying metrics collection
Browse files Browse the repository at this point in the history
  • Loading branch information
ThePrez committed Jul 11, 2022
1 parent 3a1300e commit eaf08a3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/main/java/com/ibm/jesseg/MainApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,16 @@ public static void main(String[] args) {
} catch (BindException e) {
throw new IOException("Port " + port + " is already in use", e);
}
HTTPServer server = new HTTPServer.Builder()
.withHttpServer(rootServer)
.build();
logger.println("Verifying metrics collection....");
for (SQLMetricPopulator populator : populators) {
populator.gatherNow(12);
}
logger.println_success("Metrics collection verified.");

HTTPServer server = new HTTPServer.Builder()
.withHttpServer(rootServer)
.build();

String successMessage = "\n\n\n";
successMessage += "==============================================================\n";
successMessage += "Successfully started Prometheus client on port " + port + "\n";
Expand Down

0 comments on commit eaf08a3

Please sign in to comment.