1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-26 19:24:42 +01:00

Improve gauges

This commit is contained in:
Daniil Gentili 2024-05-15 22:39:22 +02:00
parent ccadcf42c8
commit 25caa332ea
2 changed files with 3 additions and 1 deletions

View File

@ -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.

View File

@ -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);