From 25caa332eaab16908fb08b3df54a2d98d603da7a Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Wed, 15 May 2024 22:39:22 +0200 Subject: [PATCH] Improve gauges --- src/Ipc/AbstractServer.php | 3 ++- src/MTProto.php | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Ipc/AbstractServer.php b/src/Ipc/AbstractServer.php index 82f3150c3..2747fa24f 100644 --- a/src/Ipc/AbstractServer.php +++ b/src/Ipc/AbstractServer.php @@ -57,7 +57,8 @@ abstract class AbstractServer extends Loop public function __construct(MTProto $API) { $this->internalInit($API); - $this->connectionGauge = $API->getPromGauge("", "ipc_server_connections", "Number of IPC server connections"); + $this->connectionGauge = $API->getPromGauge("MadelineProto", "ipc_server_connections", "Number of IPC server connections"); + $this->connectionGauge?->set(0); } /** * Server version. diff --git a/src/MTProto.php b/src/MTProto.php index 1b3818d7d..113334c0a 100644 --- a/src/MTProto.php +++ b/src/MTProto.php @@ -966,6 +966,7 @@ final class MTProto implements TLCallback, LoggerGetter, SettingsGetter }, new DefaultErrorHandler); } $this->updateCtr = $this->getPromCounter("MadelineProto", "update_count", "Number of received updates since the session was created"); + $this->updateCtr?->incBy(0); // Start IPC server if (!$this->ipcServer) { $this->ipcServer = new Server($this);