feat: add ServerStats counters and NatsClient metadata for monitoring

This commit is contained in:
Joseph Doherty
2026-02-22 22:04:43 -05:00
parent ceaafc48d4
commit 1a777e09c9
5 changed files with 138 additions and 3 deletions

View File

@@ -0,0 +1,20 @@
using System.Collections.Concurrent;
namespace NATS.Server;
public sealed class ServerStats
{
public long InMsgs;
public long OutMsgs;
public long InBytes;
public long OutBytes;
public long TotalConnections;
public long SlowConsumers;
public long StaleConnections;
public long Stalls;
public long SlowConsumerClients;
public long SlowConsumerRoutes;
public long SlowConsumerLeafs;
public long SlowConsumerGateways;
public readonly ConcurrentDictionary<string, long> HttpReqStats = new();
}