mirror of
https://github.com/danog/TelegramApiServer.git
synced 2024-11-30 04:19:13 +01:00
Enable prometheus collection if requested
This commit is contained in:
parent
632da98a33
commit
6184b5fd65
@ -3,6 +3,8 @@
|
||||
use danog\MadelineProto\Logger;
|
||||
use TelegramApiServer\EventObservers\LogObserver;
|
||||
|
||||
use function Amp\Socket\SocketAddress\fromString;
|
||||
|
||||
$settings = [
|
||||
'server' => [
|
||||
'address' => (string)getenv('SERVER_ADDRESS'),
|
||||
@ -69,6 +71,10 @@ $settings = [
|
||||
'passwords' => (array)json_decode((string)getenv('PASSWORDS'), true),
|
||||
'bulk_interval' => (float)getenv('REQUESTS_BULK_INTERVAL')
|
||||
],
|
||||
'metrics' => [
|
||||
'enable_prometheus_collection' => (bool)getenv("PROMETHEUS_BIND_TO"),
|
||||
'bind_to' => getenv("PROMETHEUS_BIND_TO") ? fromString(getenv("PROMETHEUS_BIND_TO")) : null
|
||||
]
|
||||
];
|
||||
|
||||
if (empty($settings['telegram']['connection']['proxies']['\danog\MadelineProto\Stream\Proxy\SocksProxy'][0]['address'])) {
|
||||
|
Loading…
Reference in New Issue
Block a user