Skip to content

Commit

Permalink
Enable the metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
Half-Shot committed May 22, 2019
1 parent c4ae6be commit 3d9a677
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/discordas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { DiscordBot } from "./bot";
import { DiscordStore } from "./store";
import { Log } from "./log";
import "source-map-support/register";
import { MetricPeg } from "./metrics";
import { MetricPeg, PrometheusBridgeMetrics } from "./metrics";

const log = new Log("DiscordAS");

Expand Down Expand Up @@ -162,6 +162,11 @@ async function run(port: number, fileConfig: DiscordBridgeConfig) {
+ "The config option userStorePath no longer has any use.");
}

if (config.bridge.enableMetrics) {
log.info("Enabled metrics");
MetricPeg.setMetrics(new PrometheusBridgeMetrics().init(bridge));
}

await bridge.run(port, config);
log.info(`Started listening on port ${port}`);

Expand Down

0 comments on commit 3d9a677

Please sign in to comment.