diff options
| author | Stefan Boberg <[email protected]> | 2023-10-25 12:21:51 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-10-25 12:21:51 +0200 |
| commit | 0b220255724020daea18ddb559f5edf3fdb1621b (patch) | |
| tree | 7809227752c15d90111c4e600d80b59d90ad25d2 /src/zenserver/zenserver.h | |
| parent | New rotating file logger that keeps on running regardless of errors (#495) (diff) | |
| download | zen-0b220255724020daea18ddb559f5edf3fdb1621b.tar.xz zen-0b220255724020daea18ddb559f5edf3fdb1621b.zip | |
statsd metrics reporting (#496)
added support for reporting metrics via statsd style UDP messaging, which is supported by many monitoring solution providers
this change adds reporting only of three cache related metrics (hit/miss/put) but this should be extended to include more metrics after additional evaluation
Diffstat (limited to 'src/zenserver/zenserver.h')
| -rw-r--r-- | src/zenserver/zenserver.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/zenserver/zenserver.h b/src/zenserver/zenserver.h index 25e45ccd0..de069be69 100644 --- a/src/zenserver/zenserver.h +++ b/src/zenserver/zenserver.h @@ -33,6 +33,7 @@ ZEN_THIRD_PARTY_INCLUDES_END #include "objectstore/objectstore.h" #include "projectstore/httpprojectstore.h" #include "projectstore/projectstore.h" +#include "stats/statsreporter.h" #include "upstream/upstream.h" #include "vfs/vfsservice.h" @@ -75,6 +76,7 @@ public: void EnqueueTimer(); void EnqueueStateMarkerTimer(); void EnqueueSigIntTimer(); + void EnqueueStatsReportingTimer(); void CheckStateMarker(); void CheckSigInt(); void CheckOwnerPid(); @@ -96,6 +98,7 @@ private: asio::steady_timer m_PidCheckTimer{m_IoContext}; asio::steady_timer m_StateMakerTimer{m_IoContext}; asio::steady_timer m_SigIntTimer{m_IoContext}; + asio::steady_timer m_StatsReportingTimer{m_IoContext}; ProcessMonitor m_ProcessMonitor; NamedMutex m_ServerMutex; @@ -109,6 +112,7 @@ private: inline void SetNewState(ServerState NewState) { m_CurrentState = NewState; } static std::string_view ToString(ServerState Value); + StatsReporter m_StatsReporter; Ref<HttpServer> m_Http; std::unique_ptr<AuthMgr> m_AuthMgr; std::unique_ptr<HttpAuthService> m_AuthService; |