diff --git a/source/extensions/filters/network/mongo_proxy/proxy.cc b/source/extensions/filters/network/mongo_proxy/proxy.cc index fa70d4ae9801f..b8ee760c910b7 100644 --- a/source/extensions/filters/network/mongo_proxy/proxy.cc +++ b/source/extensions/filters/network/mongo_proxy/proxy.cc @@ -59,10 +59,9 @@ ProxyFilter::ProxyFilter(const std::string& stat_prefix, Stats::Scope& scope, const Filters::Common::Fault::FaultDelayConfigSharedPtr& fault_config, const Network::DrainDecision& drain_decision, TimeSource& time_source, bool emit_dynamic_metadata, const MongoStatsSharedPtr& mongo_stats) - : stat_prefix_(stat_prefix), stats_(generateStats(stat_prefix, scope)), runtime_(runtime), - drain_decision_(drain_decision), access_log_(access_log), fault_config_(fault_config), - time_source_(time_source), emit_dynamic_metadata_(emit_dynamic_metadata), - mongo_stats_(mongo_stats) { + : stats_(generateStats(stat_prefix, scope)), runtime_(runtime), drain_decision_(drain_decision), + access_log_(access_log), fault_config_(fault_config), time_source_(time_source), + emit_dynamic_metadata_(emit_dynamic_metadata), mongo_stats_(mongo_stats) { if (!runtime_.snapshot().featureEnabled(MongoRuntimeConfig::get().ConnectionLoggingEnabled, 100)) { // If we are not logging at the connection level, just release the shared pointer so that we diff --git a/source/extensions/filters/network/mongo_proxy/proxy.h b/source/extensions/filters/network/mongo_proxy/proxy.h index c54308f1ae386..773d4714aa7fa 100644 --- a/source/extensions/filters/network/mongo_proxy/proxy.h +++ b/source/extensions/filters/network/mongo_proxy/proxy.h @@ -183,7 +183,6 @@ class ProxyFilter : public Network::Filter, void tryInjectDelay(); std::unique_ptr decoder_; - std::string stat_prefix_; MongoProxyStats stats_; Runtime::Loader& runtime_; const Network::DrainDecision& drain_decision_; diff --git a/source/extensions/filters/network/mysql_proxy/mysql_filter.cc b/source/extensions/filters/network/mysql_proxy/mysql_filter.cc index e66701ee87841..d3fa62e55fc82 100644 --- a/source/extensions/filters/network/mysql_proxy/mysql_filter.cc +++ b/source/extensions/filters/network/mysql_proxy/mysql_filter.cc @@ -14,7 +14,7 @@ namespace NetworkFilters { namespace MySQLProxy { MySQLFilterConfig::MySQLFilterConfig(const std::string& stat_prefix, Stats::Scope& scope) - : scope_(scope), stat_prefix_(stat_prefix), stats_(generateStats(stat_prefix, scope)) {} + : scope_(scope), stats_(generateStats(stat_prefix, scope)) {} MySQLFilter::MySQLFilter(MySQLFilterConfigSharedPtr config) : config_(std::move(config)) {} diff --git a/source/extensions/filters/network/mysql_proxy/mysql_filter.h b/source/extensions/filters/network/mysql_proxy/mysql_filter.h index 2d73ef9b58468..daabb165dde62 100644 --- a/source/extensions/filters/network/mysql_proxy/mysql_filter.h +++ b/source/extensions/filters/network/mysql_proxy/mysql_filter.h @@ -54,7 +54,6 @@ class MySQLFilterConfig { const MySQLProxyStats& stats() { return stats_; } Stats::Scope& scope_; - const std::string stat_prefix_; MySQLProxyStats stats_; private: diff --git a/source/extensions/filters/network/postgres_proxy/postgres_filter.cc b/source/extensions/filters/network/postgres_proxy/postgres_filter.cc index f66754c051018..ee8526b92c9f5 100644 --- a/source/extensions/filters/network/postgres_proxy/postgres_filter.cc +++ b/source/extensions/filters/network/postgres_proxy/postgres_filter.cc @@ -13,8 +13,7 @@ namespace PostgresProxy { PostgresFilterConfig::PostgresFilterConfig(const std::string& stat_prefix, bool enable_sql_parsing, Stats::Scope& scope) - : stat_prefix_{stat_prefix}, - enable_sql_parsing_(enable_sql_parsing), scope_{scope}, stats_{generateStats(stat_prefix, + : enable_sql_parsing_(enable_sql_parsing), scope_{scope}, stats_{generateStats(stat_prefix, scope)} {} PostgresFilter::PostgresFilter(PostgresFilterConfigSharedPtr config) : config_{config} { diff --git a/source/extensions/filters/network/postgres_proxy/postgres_filter.h b/source/extensions/filters/network/postgres_proxy/postgres_filter.h index 5571a0587c400..f3ef83a6abcea 100644 --- a/source/extensions/filters/network/postgres_proxy/postgres_filter.h +++ b/source/extensions/filters/network/postgres_proxy/postgres_filter.h @@ -65,7 +65,6 @@ class PostgresFilterConfig { PostgresFilterConfig(const std::string& stat_prefix, bool enable_sql_parsing, Stats::Scope& scope); - const std::string stat_prefix_; bool enable_sql_parsing_{true}; Stats::Scope& scope_; PostgresProxyStats stats_;