add missing gauge resets
This commit is contained in:
parent
b0c91b2a34
commit
29d6c752ce
2 changed files with 3 additions and 1 deletions
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "mtproto_exporter",
|
||||
"type": "module",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"packageManager": "pnpm@10.6.5",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ function newStaticPeerInfoGauge(tg: TelegramClient) {
|
|||
help: "Dialog information exposed as labels",
|
||||
labelNames: ["peerId", "peerType", "displayName"],
|
||||
collect: async () => {
|
||||
gauge.reset();
|
||||
for await (const d of tg.iterDialogs()) {
|
||||
gauge.set({
|
||||
peerId: d.peer.id,
|
||||
|
|
@ -44,6 +45,7 @@ function newUnreadCountGauge(tg: TelegramClient) {
|
|||
help: "Number of unread messages in dialogs",
|
||||
labelNames: ["peerId"],
|
||||
collect: async () => {
|
||||
gauge.reset();
|
||||
for await (const d of tg.iterDialogs()) {
|
||||
gauge.set({
|
||||
peerId: d.peer.id,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue