chore(app): update stats interface to build

Signed-off-by: Luca Guerra <luca@guerra.sh>
This commit is contained in:
Luca Guerra 2024-08-05 10:40:41 +00:00 committed by poiana
parent 62ab938973
commit 00e154870b
2 changed files with 13 additions and 9 deletions

View File

@ -48,11 +48,6 @@ falco::app::run_result falco::app::actions::open_live_inspector(
{
try
{
if((s.config->m_metrics_flags & METRICS_V2_STATE_COUNTERS))
{
inspector->set_sinsp_stats_v2_enabled();
}
if(s.config->m_falco_libs_thread_table_size > 0)
{
// Default value is set in libs as part of the sinsp_thread_manager setup

View File

@ -115,9 +115,18 @@ falco::app::run_result falco::app::actions::init_inspectors(falco::app::state& s
// in capture mode, every event source uses the offline inspector.
// in live mode, we create a new inspector for each event source
src_info->inspector = s.is_capture_mode()
? s.offline_inspector
: std::make_shared<sinsp>();
if (s.is_capture_mode())
{
src_info->inspector = s.offline_inspector;
}
else
{
src_info->inspector = std::make_shared<sinsp>(false,
"",
"",
"",
s.config->m_metrics_flags & METRICS_V2_STATE_COUNTERS);
}
// do extra preparation for the syscall source
if (src == falco_common::syscall_source)