mirror of https://github.com/thaldrin/thaldrin.git
raw client events to prometheus
This commit is contained in:
parent
e2584bada0
commit
f33b4b572d
|
@ -3,6 +3,7 @@ import { readdirSync as read } from "fs";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import { Command } from "../../utils/types";
|
import { Command } from "../../utils/types";
|
||||||
import Logger from "../../utils/logger";
|
import Logger from "../../utils/logger";
|
||||||
|
import { Prom } from "../../utils/prometheus";
|
||||||
// const server = require('../../website/server');
|
// const server = require('../../website/server');
|
||||||
|
|
||||||
export default class Thaldrin extends Client {
|
export default class Thaldrin extends Client {
|
||||||
|
@ -24,6 +25,10 @@ export default class Thaldrin extends Client {
|
||||||
this.config = config;
|
this.config = config;
|
||||||
|
|
||||||
this.lastEval = null;
|
this.lastEval = null;
|
||||||
|
// @ts-ignore
|
||||||
|
this.on("raw", packet => {
|
||||||
|
Prom.events.labels(packet.t).inc()
|
||||||
|
})
|
||||||
|
|
||||||
this.login(config.token);
|
this.login(config.token);
|
||||||
this.load();
|
this.load();
|
||||||
|
|
Loading…
Reference in New Issue