From 3a5178b1fa1ca426e6025142a8d29950a51d4c5d Mon Sep 17 00:00:00 2001 From: Shannon Weyrick Date: Mon, 7 Feb 2022 13:21:42 -0500 Subject: [PATCH] improve json info in policies --- src/AbstractModule.cpp | 1 + src/StreamHandler.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/AbstractModule.cpp b/src/AbstractModule.cpp index 3e011cbf3..139cc989f 100644 --- a/src/AbstractModule.cpp +++ b/src/AbstractModule.cpp @@ -15,6 +15,7 @@ void AbstractRunnableModule::info_json(json &j) const void AbstractRunnableModule::common_info_json(json &j) const { j["module"]["name"] = _name; + j["module"]["type"] = schema_key(); j["module"]["running"] = _running.load(); config_json(j["module"]["config"]); } diff --git a/src/StreamHandler.h b/src/StreamHandler.h index 992f18789..71171f56d 100644 --- a/src/StreamHandler.h +++ b/src/StreamHandler.h @@ -47,7 +47,7 @@ class StreamMetricsHandler : public StreamHandler void common_info_json(json &j) const { - AbstractModule::common_info_json(j); + AbstractRunnableModule::common_info_json(j); j["metrics"]["deep_sample_rate"] = _metrics->deep_sample_rate(); j["metrics"]["periods_configured"] = _metrics->num_periods();