diff --git a/config/esp32/components/chip/Kconfig b/config/esp32/components/chip/Kconfig index 0dce48b5f720be..ba23c89b0cc3dc 100644 --- a/config/esp32/components/chip/Kconfig +++ b/config/esp32/components/chip/Kconfig @@ -912,6 +912,12 @@ menu "CHIP Device Layer" default n help This option enables the system statistics to be sent to the insights cloud. + + config INSIGHTS_TRACE_PERMIT_LIST_SIZE + int "Config option to set permitlist size" + range 5 30 + depends on ESP_INSIGHTS_ENABLED + default 20 endmenu diff --git a/src/tracing/esp32_trace/counter.h b/src/tracing/esp32_trace/counter.h index bfa6205c341a13..e155dc4f5b2e24 100644 --- a/src/tracing/esp32_trace/counter.h +++ b/src/tracing/esp32_trace/counter.h @@ -24,8 +24,7 @@ namespace Insights { -/* - * +/** * This class is used to monotonically increment the counters as per the label of the counter macro * 'MATTER_TRACE_COUNTER(label)' and report the metrics to esp-insights. * As per the label of the counter macro, it adds the counter in the linked list with the name label if not @@ -37,7 +36,7 @@ class ESPInsightsCounter { private: static ESPInsightsCounter * mHead; // head of the counter list - const char * label; // unique key + const char * label; // unique key ,it is used as a static string. int instanceCount; ESPInsightsCounter * mNext; // pointer to point to the next entry in the list bool registered = false; diff --git a/src/tracing/esp32_trace/esp32_tracing.cpp b/src/tracing/esp32_trace/esp32_tracing.cpp index 7937772606eec0..542bfb7d3e1054 100644 --- a/src/tracing/esp32_trace/esp32_tracing.cpp +++ b/src/tracing/esp32_trace/esp32_tracing.cpp @@ -30,7 +30,7 @@ namespace Tracing { namespace Insights { namespace { -constexpr size_t kPermitListMaxSize = 20; +constexpr size_t kPermitListMaxSize = CONFIG_INSIGHTS_TRACE_PERMIT_LIST_SIZE; using HashValue = uint32_t; // Implements a murmurhash with 0 seed.