mon_lwtrace.h 915 B

123456789101112131415161718192021222324252627
  1. #pragma once
  2. #include <library/cpp/lwtrace/protos/lwtrace.pb.h>
  3. #include <library/cpp/monlib/service/monservice.h>
  4. #include <library/cpp/lwtrace/control.h>
  5. #include <util/generic/vector.h>
  6. namespace NLwTraceMonPage {
  7. class TDashboardRegistry {
  8. THashMap<TString, NLWTrace::TDashboard> Dashboards;
  9. TMutex Mutex;
  10. public:
  11. void Register(const NLWTrace::TDashboard& dashboard);
  12. void Register(const TVector<NLWTrace::TDashboard>& dashboards);
  13. void Register(const TString& dashText);
  14. bool Get(const TString& name, NLWTrace::TDashboard& dash);
  15. void Output(TStringStream& ss);
  16. };
  17. void RegisterPages(NMonitoring::TIndexMonPage* index, bool allowUnsafe = false);
  18. NLWTrace::TProbeRegistry& ProbeRegistry(); // This is not safe to use this function before main()
  19. NLWTrace::TManager& TraceManager(bool allowUnsafe = false);
  20. TDashboardRegistry& DashboardRegistry();
  21. } // namespace NLwTraceMonPage