mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 17:48:21 +00:00
Convert telemetry code to use prometheus-cpp
This commit is contained in:
parent
97a35011a7
commit
a0ae06b3cd
22 changed files with 1517 additions and 1195 deletions
|
@ -49,7 +49,7 @@ void EventHandler::Call(Args* vl, bool no_remote, double ts) {
|
|||
telemetry_mgr->CounterFamily("zeek", "event-handler-invocations", {"name"},
|
||||
"Number of times the given event handler was called", "1", true);
|
||||
|
||||
call_count = eh_invocations_family.GetOrAdd({{"name", name}});
|
||||
call_count = eh_invocations_family->GetOrAdd({{"name", name}});
|
||||
}
|
||||
|
||||
call_count->Inc();
|
||||
|
@ -113,4 +113,6 @@ void EventHandler::NewEvent(Args* vl) {
|
|||
event_mgr.Dispatch(ev);
|
||||
}
|
||||
|
||||
uint64_t EventHandler::CallCount() const { return call_count ? call_count->Value() : 0; }
|
||||
|
||||
} // namespace zeek
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue