From f33b4b572d579870d4d736fccbdd3d1fa14fbce9 Mon Sep 17 00:00:00 2001 From: Lio Young Date: Thu, 8 Jul 2021 13:49:00 +0200 Subject: [PATCH] raw client events to prometheus --- src/handler/client/Client.ts | 5 +++++ 1 file changed, 5 insertions(+) mode change 100755 => 100644 src/handler/client/Client.ts diff --git a/src/handler/client/Client.ts b/src/handler/client/Client.ts old mode 100755 new mode 100644 index 89ae390..be843ee --- a/src/handler/client/Client.ts +++ b/src/handler/client/Client.ts @@ -3,6 +3,7 @@ import { readdirSync as read } from "fs"; import path from "path"; import { Command } from "../../utils/types"; import Logger from "../../utils/logger"; +import { Prom } from "../../utils/prometheus"; // const server = require('../../website/server'); export default class Thaldrin extends Client { @@ -24,6 +25,10 @@ export default class Thaldrin extends Client { this.config = config; this.lastEval = null; + // @ts-ignore + this.on("raw", packet => { + Prom.events.labels(packet.t).inc() + }) this.login(config.token); this.load();