diff --git a/WORKSPACE b/WORKSPACE index db65fc8467b..804462ef6aa 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -17,7 +17,7 @@ workspace(name = "io_istio_proxy") # http_archive is not a native function since bazel 0.19 -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file") +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load( "//bazel:repositories.bzl", "docker_dependencies", @@ -38,10 +38,10 @@ bind( # 2. Update .bazelversion, envoy.bazelrc and .bazelrc if needed. # # Note: this is needed by release builder to resolve envoy dep sha to tag. -# Commit date: 2021-09-11 -ENVOY_SHA = "a22cfc378f9fd8017440fd9239e2c0e778a3b5e1" +# Commit date: 2021-09-13 +ENVOY_SHA = "0bbf23cb5b4cda358b8e5f5da9e91dd03ac27382" -ENVOY_SHA256 = "222e846a763b1ddd7c8a4cedcf61b1792f4526960f253a5090eb5ae24396b74a" +ENVOY_SHA256 = "133e0f71745d198ae3d0f869d867b3d77649dbbb87f22412a5f80103281feadf" ENVOY_ORG = "envoyproxy" diff --git a/extensions/stackdriver/common/metrics.cc b/extensions/stackdriver/common/metrics.cc index 125daa87a0e..3d30062d875 100644 --- a/extensions/stackdriver/common/metrics.cc +++ b/extensions/stackdriver/common/metrics.cc @@ -34,7 +34,7 @@ uint32_t newExportCallMetric(const std::string& type, bool success) { // base VM and thread local VM would cause host side thread local VM root // context missing metric definition. This is not going to be a problem with // real Wasm VM due to memory isolation. - Metric export_call(MetricType::Counter, "export_call", + Metric export_call(MetricType::Counter, "envoy_export_call", {MetricTag{"wasm_filter", MetricTag::TagType::String}, MetricTag{"type", MetricTag::TagType::String}, MetricTag{"success", MetricTag::TagType::Bool}}); diff --git a/src/envoy/BUILD b/src/envoy/BUILD index 643f80b4593..5f35b0f7053 100644 --- a/src/envoy/BUILD +++ b/src/envoy/BUILD @@ -30,7 +30,6 @@ envoy_cc_binary( "//extensions/metadata_exchange:metadata_exchange_lib", "//extensions/stackdriver:stackdriver_plugin", "//extensions/stats:stats_plugin", - "//src/envoy/extensions/wasm:wasm_lib", "//src/envoy/http/alpn:config_lib", "//src/envoy/http/authn:filter_lib", "//src/envoy/tcp/forward_downstream_sni:config_lib", diff --git a/src/envoy/extensions/wasm/BUILD b/src/envoy/extensions/wasm/BUILD deleted file mode 100644 index f016ee164cd..00000000000 --- a/src/envoy/extensions/wasm/BUILD +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 2020 Istio Authors. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -################################################################################ -# - -load( - "@envoy//bazel:envoy_build_system.bzl", - "envoy_cc_library", -) - -envoy_cc_library( - name = "wasm_lib", - srcs = [ - "wasm.cc", - ], - repository = "@envoy", - visibility = ["//visibility:public"], - deps = [ - "@envoy//source/common/stats:stats_lib", - "@envoy//source/server/admin:prometheus_stats_lib", - ], -) diff --git a/src/envoy/extensions/wasm/wasm.cc b/src/envoy/extensions/wasm/wasm.cc deleted file mode 100644 index a8f1b45c372..00000000000 --- a/src/envoy/extensions/wasm/wasm.cc +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright 2018 Istio Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include "source/common/stats/utility.h" -#include "source/server/admin/prometheus_stats.h" - -namespace Envoy { -namespace Extensions { -namespace Common { -namespace Wasm { -namespace Istio { - -// Stat prefix cannot be configured dynamically. -// https://github.com/envoyproxy/envoy/issues/14920 -// https://github.com/istio/istio/issues/27635 -class RegisterPrometheusNamespace { - public: - RegisterPrometheusNamespace() { - ::Envoy::Server::PrometheusStatsFormatter::registerPrometheusNamespace( - "istio"); - } -}; - -RegisterPrometheusNamespace register_namespace; - -} // namespace Istio -} // namespace Wasm -} // namespace Common -} // namespace Extensions -} // namespace Envoy diff --git a/test/envoye2e/stackdriver_plugin/stackdriver_test.go b/test/envoye2e/stackdriver_plugin/stackdriver_test.go index c9d66c85a1d..be98b585ddf 100644 --- a/test/envoye2e/stackdriver_plugin/stackdriver_test.go +++ b/test/envoye2e/stackdriver_plugin/stackdriver_test.go @@ -79,7 +79,7 @@ func TestStackdriverPayload(t *testing.T) { }, true, ), &driver.Stats{params.Ports.ServerAdmin, map[string]driver.StatMatcher{ - "envoy_type_logging_success_true_export_call": &driver.ExactStat{"testdata/metric/stackdriver_callout_metric.yaml.tmpl"}, + "type_logging_success_true_envoy_export_call": &driver.ExactStat{"testdata/metric/stackdriver_callout_metric.yaml.tmpl"}, }}, }, }).Run(params); err != nil { @@ -135,7 +135,7 @@ func TestStackdriverPayloadGateway(t *testing.T) { }, true, ), &driver.Stats{params.Ports.ServerAdmin, map[string]driver.StatMatcher{ - "envoy_type_logging_success_true_export_call": &driver.ExactStat{"testdata/metric/stackdriver_gateway_callout_metric.yaml.tmpl"}, + "type_logging_success_true_envoy_export_call": &driver.ExactStat{"testdata/metric/stackdriver_gateway_callout_metric.yaml.tmpl"}, }}, }, }).Run(params); err != nil { @@ -193,7 +193,7 @@ func TestStackdriverPayloadWithTLS(t *testing.T) { }, true, ), &driver.Stats{params.Ports.ServerAdmin, map[string]driver.StatMatcher{ - "envoy_type_logging_success_true_export_call": &driver.ExactStat{"testdata/metric/stackdriver_callout_metric.yaml.tmpl"}, + "type_logging_success_true_envoy_export_call": &driver.ExactStat{"testdata/metric/stackdriver_callout_metric.yaml.tmpl"}, }}, }, }).Run(params); err != nil { @@ -754,7 +754,7 @@ func TestStackdriverAttributeGen(t *testing.T) { }, true, ), &driver.Stats{params.Ports.ServerAdmin, map[string]driver.StatMatcher{ - "envoy_type_logging_success_true_export_call": &driver.ExactStat{"testdata/metric/stackdriver_callout_metric.yaml.tmpl"}, + "type_logging_success_true_envoy_export_call": &driver.ExactStat{"testdata/metric/stackdriver_callout_metric.yaml.tmpl"}, }}, }, }).Run(params); err != nil { @@ -818,7 +818,7 @@ func TestStackdriverCustomAccessLog(t *testing.T) { }, true, ), &driver.Stats{params.Ports.ServerAdmin, map[string]driver.StatMatcher{ - "envoy_type_logging_success_true_export_call": &driver.ExactStat{"testdata/metric/stackdriver_callout_metric.yaml.tmpl"}, + "type_logging_success_true_envoy_export_call": &driver.ExactStat{"testdata/metric/stackdriver_callout_metric.yaml.tmpl"}, }}, }, }).Run(params); err != nil { @@ -1141,7 +1141,7 @@ func TestStackdriverPayloadUtf8(t *testing.T) { }, true, ), &driver.Stats{params.Ports.ServerAdmin, map[string]driver.StatMatcher{ - "envoy_type_logging_success_true_export_call": &driver.ExactStat{"testdata/metric/stackdriver_callout_metric.yaml.tmpl"}, + "type_logging_success_true_envoy_export_call": &driver.ExactStat{"testdata/metric/stackdriver_callout_metric.yaml.tmpl"}, }}, }, }).Run(params); err != nil { diff --git a/testdata/metric/stackdriver_callout_metric.yaml.tmpl b/testdata/metric/stackdriver_callout_metric.yaml.tmpl index 319ffb9dc51..3e168b5a45e 100644 --- a/testdata/metric/stackdriver_callout_metric.yaml.tmpl +++ b/testdata/metric/stackdriver_callout_metric.yaml.tmpl @@ -1,4 +1,4 @@ -name: envoy_type_logging_success_true_export_call +name: type_logging_success_true_envoy_export_call type: COUNTER metric: - counter: diff --git a/testdata/metric/stackdriver_gateway_callout_metric.yaml.tmpl b/testdata/metric/stackdriver_gateway_callout_metric.yaml.tmpl index 2e1da5f55f3..a8e515b9070 100644 --- a/testdata/metric/stackdriver_gateway_callout_metric.yaml.tmpl +++ b/testdata/metric/stackdriver_gateway_callout_metric.yaml.tmpl @@ -1,4 +1,4 @@ -name: envoy_type_logging_success_true_export_call +name: type_logging_success_true_envoy_export_call type: COUNTER metric: - counter: