Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions cilium/host_map.cc
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,11 @@ PolicyHostMap::PolicyHostMap(Server::Configuration::CommonFactoryContext& contex
bool subscribe)
: ManagedGrpcSubscription(
NetworkPolicyHostsTypeUrl, []() { return std::make_shared<Cilium::PolicyHostDecoder>(); },
config_source, context, context.serverScope().createScope("cilium.hostmap."), subscribe),
config_source, context, context.serverScope().createScope("cilium.nphds."), subscribe),
tls_(context.threadLocal().allocateSlot()),
name_(absl::StrCat("cilium.hostmap.", fmt::format("{}", instance_id_ + 1), ".")),
stats_({CILIUM_POLICY_HOSTS_STATS(POOL_COUNTER(scope()))}) {
host_stats_scope_(context.serverScope().createScope("cilium.hostmap.")),
stats_({CILIUM_POLICY_HOSTS_STATS(POOL_COUNTER(*host_stats_scope_))}) {
instance_id_++;
ENVOY_LOG(debug, "PolicyHostMap({}) created.", name_);

Expand Down
2 changes: 2 additions & 0 deletions cilium/host_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "envoy/protobuf/message_validator.h"
#include "envoy/server/factory_context.h"
#include "envoy/singleton/instance.h"
#include "envoy/stats/scope.h"
#include "envoy/stats/stats_macros.h"
#include "envoy/thread_local/thread_local.h"
#include "envoy/thread_local/thread_local_object.h"
Expand Down Expand Up @@ -222,6 +223,7 @@ class PolicyHostMap : public Singleton::Instance, public ManagedGrpcSubscription
std::string name_;
uint64_t accepted_stream_generation_{0};
static uint64_t instance_id_;
Stats::ScopeSharedPtr host_stats_scope_;
PolicyHostsStats stats_;
};

Expand Down
Loading