diff --git a/source/common/config/well_known_names.cc b/source/common/config/well_known_names.cc index 9f0ab2548f7a5..986b8bc96d65c 100644 --- a/source/common/config/well_known_names.cc +++ b/source/common/config/well_known_names.cc @@ -239,6 +239,12 @@ TagNameValues::TagNameValues() { // grpc.().** addTokenized(GOOGLE_GRPC_CLIENT_PREFIX, "grpc.$.**"); + // [*.]grpc.(.)streams_closed_ + // Handles gRPC client stats where the stat_prefix is embedded inside a longer + // stat name (e.g. listener_manager.lds.grpc.(.)streams_closed_1, + // sds.client_cert.grpc.(.)streams_closed_12). + addRe2(GOOGLE_GRPC_CLIENT_PREFIX, R"(\.grpc\.((.+)\.streams_closed_\d+)$)", ".grpc."); + // listener.[
.]ssl.certificate.(). or // cluster.[.]ssl.certificate.(). addRe2(TLS_CERTIFICATE, diff --git a/test/extensions/access_loggers/grpc/http_grpc_access_log_integration_test.cc b/test/extensions/access_loggers/grpc/http_grpc_access_log_integration_test.cc index 306f9da1a2267..7f77e395f5a0a 100644 --- a/test/extensions/access_loggers/grpc/http_grpc_access_log_integration_test.cc +++ b/test/extensions/access_loggers/grpc/http_grpc_access_log_integration_test.cc @@ -24,10 +24,6 @@ class AccessLogIntegrationTest : public Grpc::GrpcClientIntegrationParamTest, public HttpIntegrationTest { public: AccessLogIntegrationTest() : HttpIntegrationTest(Http::CodecType::HTTP1, ipVersion()) { - // TODO(ggreenway): add tag extraction rules. - // Missing stat tag-extraction rule for stat 'grpc.accesslog.streams_closed_11' and stat_prefix - // 'accesslog'. - skip_tag_extraction_rule_check_ = true; } void createUpstreams() override { diff --git a/test/extensions/access_loggers/grpc/tcp_grpc_access_log_integration_test.cc b/test/extensions/access_loggers/grpc/tcp_grpc_access_log_integration_test.cc index a9fbc16ecfd96..94217e263729b 100644 --- a/test/extensions/access_loggers/grpc/tcp_grpc_access_log_integration_test.cc +++ b/test/extensions/access_loggers/grpc/tcp_grpc_access_log_integration_test.cc @@ -49,10 +49,6 @@ class TcpGrpcAccessLogIntegrationTest : public Grpc::GrpcClientIntegrationParamT public: TcpGrpcAccessLogIntegrationTest() : BaseIntegrationTest(ipVersion(), ConfigHelper::tcpProxyConfig()) { - // TODO(ggreenway): add tag extraction rules. - // Missing stat tag-extraction rule for stat 'grpc.accesslog.streams_closed_14' and stat_prefix - // 'accesslog'. - skip_tag_extraction_rule_check_ = true; enableHalfClose(true); } diff --git a/test/extensions/filters/http/ratelimit/ratelimit_integration_test.cc b/test/extensions/filters/http/ratelimit/ratelimit_integration_test.cc index 50235dbe946b1..14c175e55e3fb 100644 --- a/test/extensions/filters/http/ratelimit/ratelimit_integration_test.cc +++ b/test/extensions/filters/http/ratelimit/ratelimit_integration_test.cc @@ -27,8 +27,6 @@ class RatelimitIntegrationTest : public Grpc::GrpcClientIntegrationParamTest, public HttpIntegrationTest { public: RatelimitIntegrationTest() : HttpIntegrationTest(Http::CodecClient::Type::HTTP2, ipVersion()) { - // TODO(ggreenway): add tag extraction rules. - skip_tag_extraction_rule_check_ = true; } void createUpstreams() override { diff --git a/test/extensions/stats_sinks/metrics_service/metrics_service_integration_test.cc b/test/extensions/stats_sinks/metrics_service/metrics_service_integration_test.cc index 6fe18877624de..7936e39b8e967 100644 --- a/test/extensions/stats_sinks/metrics_service/metrics_service_integration_test.cc +++ b/test/extensions/stats_sinks/metrics_service/metrics_service_integration_test.cc @@ -22,10 +22,6 @@ class MetricsServiceIntegrationTest : public Grpc::GrpcClientIntegrationParamTes public HttpIntegrationTest { public: MetricsServiceIntegrationTest() : HttpIntegrationTest(Http::CodecType::HTTP1, ipVersion()) { - // TODO(ggreenway): add tag extraction rules. - // Missing stat tag-extraction rule for stat 'grpc.metrics_service.streams_closed_14' and - // stat_prefix 'metrics_service'. - skip_tag_extraction_rule_check_ = true; } void createUpstreams() override { diff --git a/test/integration/extension_discovery_integration_test.cc b/test/integration/extension_discovery_integration_test.cc index 0766b32a9bbee..420ce4403471e 100644 --- a/test/integration/extension_discovery_integration_test.cc +++ b/test/integration/extension_discovery_integration_test.cc @@ -59,10 +59,6 @@ class ExtensionDiscoveryIntegrationTest : public Grpc::GrpcClientIntegrationPara public HttpIntegrationTest { public: ExtensionDiscoveryIntegrationTest() : HttpIntegrationTest(Http::CodecType::HTTP1, ipVersion()) { - // TODO(ggreenway): add tag extraction rules. - // Missing stat tag-extraction rule for stat - // 'listener_manager.lds.grpc.lds_cluster.streams_closed_10' and stat_prefix 'lds_cluster'. - skip_tag_extraction_rule_check_ = true; } void addDynamicFilter(const std::string& name, bool apply_without_warming, diff --git a/test/integration/listener_extension_discovery_integration_test.cc b/test/integration/listener_extension_discovery_integration_test.cc index 14dd941c7f6fc..7d0c536c2f1b7 100644 --- a/test/integration/listener_extension_discovery_integration_test.cc +++ b/test/integration/listener_extension_discovery_integration_test.cc @@ -27,11 +27,6 @@ class ListenerExtensionDiscoveryIntegrationTestBase : public Grpc::GrpcClientInt const std::string& listener_filter_name) : HttpIntegrationTest(downstream_type, ipVersion(), config), filter_name_(listener_filter_name), port_name_("http") { - // TODO(ggreenway): add tag extraction rules. - // Missing stat tag-extraction rule for stat - // 'extension_config_discovery.tcp_listener_filter.foo.grpc.ecds_cluster.streams_closed_7' and - // stat_prefix 'ecds_cluster'. - skip_tag_extraction_rule_check_ = true; } void addDynamicFilterWithType(const std::string& filter_name, diff --git a/test/integration/listener_lds_integration_test.cc b/test/integration/listener_lds_integration_test.cc index bc543cfab2a36..2c2ecf080fcdc 100644 --- a/test/integration/listener_lds_integration_test.cc +++ b/test/integration/listener_lds_integration_test.cc @@ -38,10 +38,6 @@ class ListenerIntegrationTestBase : public HttpIntegrationTest { ListenerIntegrationTestBase(Network::Address::IpVersion version, const std::string& config) : HttpIntegrationTest(Http::CodecType::HTTP1, version, config) { - // TODO(ggreenway): add tag extraction rules. - // Missing stat tag-extraction rule for stat - // 'listener_manager.lds.grpc.lds_cluster.streams_closed_1' and stat_prefix 'lds_cluster'. - skip_tag_extraction_rule_check_ = true; } ~ListenerIntegrationTestBase() override { resetConnections(); } @@ -1193,10 +1189,6 @@ class ListenerFilterIntegrationTest : public BaseIntegrationTest, stat_prefix: tcp_stats cluster: cluster_0 )EOF") { - // TODO(ggreenway): add tag extraction rules. - // Missing stat tag-extraction rule for stat - // 'listener_manager.lds.grpc.lds_cluster.streams_closed_1' and stat_prefix 'lds_cluster'. - skip_tag_extraction_rule_check_ = true; } ~ListenerFilterIntegrationTest() override { diff --git a/test/integration/scoped_rds.h b/test/integration/scoped_rds.h index c1632a0704034..f16a751ed2ac3 100644 --- a/test/integration/scoped_rds.h +++ b/test/integration/scoped_rds.h @@ -31,11 +31,6 @@ class ScopedRdsIntegrationTest : public HttpIntegrationTest, }; ScopedRdsIntegrationTest() : HttpIntegrationTest(Http::CodecType::HTTP1, ipVersion()) { - // TODO(ggreenway): add tag extraction rules. - // Missing stat tag-extraction rule for stat - // 'http.scoped_rds.foo-scoped-routes.grpc.srds_cluster.streams_closed_16' and stat_prefix - // 'srds_cluster'. - skip_tag_extraction_rule_check_ = true; config_helper_.addRuntimeOverride("envoy.reloadable_features.unified_mux", (sotwOrDelta() == Grpc::SotwOrDelta::UnifiedSotw || diff --git a/test/integration/sds_dynamic_integration_test.cc b/test/integration/sds_dynamic_integration_test.cc index 176ca6086ecf0..d0bd0125bb0c0 100644 --- a/test/integration/sds_dynamic_integration_test.cc +++ b/test/integration/sds_dynamic_integration_test.cc @@ -91,22 +91,12 @@ class SdsDynamicIntegrationBaseTest : public Grpc::BaseGrpcClientIntegrationPara SdsDynamicIntegrationBaseTest() : HttpIntegrationTest(Http::CodecType::HTTP1, GetParam().ip_version), test_quic_(GetParam().test_quic) { - // TODO(ggreenway): add tag extraction rules. - // Missing stat tag-extraction rule for stat - // 'sds.client_cert.grpc.sds_cluster.lyft.com.streams_closed_12' and stat_prefix - // 'sds_cluster.lyft.com'. - skip_tag_extraction_rule_check_ = true; } SdsDynamicIntegrationBaseTest(Http::CodecType downstream_protocol, Network::Address::IpVersion version, const std::string& config) : HttpIntegrationTest(downstream_protocol, version, config), test_quic_(GetParam().test_quic) { - // TODO(ggreenway): add tag extraction rules. - // Missing stat tag-extraction rule for stat - // 'sds.client_cert.grpc.sds_cluster.lyft.com.streams_closed_12' and stat_prefix - // 'sds_cluster.lyft.com'. - skip_tag_extraction_rule_check_ = true; } Network::Address::IpVersion ipVersion() const override { return GetParam().ip_version; }