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
2 changes: 1 addition & 1 deletion envoy
Submodule envoy updated 1122 files
3 changes: 3 additions & 0 deletions library/common/config_template.cc
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ stats_flush_interval: {{ stats_flush_interval_seconds }}s
"@type": type.googleapis.com/envoy.config.metrics.v3.MetricsServiceConfig
transport_api_version: V3
report_counters_as_deltas: true
emit_tags_as_labels: true
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

grpc_service:
envoy_grpc:
cluster_name: stats
Expand Down Expand Up @@ -235,6 +236,8 @@ stats_flush_interval: {{ stats_flush_interval_seconds }}s
- safe_regex:
google_re2: {}
regex: '^vhost.api.vcluster\.[\w]+?\.upstream_rq_(?:[12345]xx|retry.*|time|timeout|total)'
use_all_default_tags:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does this do?

Copy link
Copy Markdown
Contributor Author

@jingwei99 jingwei99 Apr 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as envoyproxy/envoy#16125 changes the behavior of metrics_sink, this is necessary to keep the metric names emitted by envoy the way it is, doc is here: https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/metrics/v3/stats.proto#envoy-v3-api-msg-config-metrics-v3-statsconfig

somehow this comment is lost from the history ... :(

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, it's here: #1420 (comment)

false
watchdog:
megamiss_timeout: 60s
miss_timeout: 60s
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ Stats::SinkPtr EnvoyMobileMetricsServiceSinkFactory::createStatsSink(
envoymobile::extensions::stat_sinks::metrics_service::EnvoyMobileStreamMetricsMessage,
envoymobile::extensions::stat_sinks::metrics_service::EnvoyMobileStreamMetricsResponse>>(
grpc_metrics_streamer,
PROTOBUF_GET_WRAPPED_OR_DEFAULT(sink_config, report_counters_as_deltas, false));
PROTOBUF_GET_WRAPPED_OR_DEFAULT(sink_config, report_counters_as_deltas, false),
sink_config.emit_tags_as_labels());
}

ProtobufTypes::MessagePtr EnvoyMobileMetricsServiceSinkFactory::createEmptyConfigProto() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,10 @@ message EnvoyMobileMetricsServiceConfig {
// If true, counters are reported as the delta between flushing intervals. Otherwise, the current
// counter value is reported. Defaults to false.
google.protobuf.BoolValue report_counters_as_deltas = 2;

// Placeholder for now. The plan is to use it in the same way as in upstream envoy.
// If true, metrics will have their tags emitted as labels on the metrics objects sent to the
// MetricsService, and the tag extracted name will be used instead of the full name, which may
// contain values used by the tag extractor or additional tags added during stats creation.
bool emit_tags_as_labels = 4;
}
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ TEST_P(PlatformBridgeIntegrationTest, MultipleFilters) {
upstream_request_->encodeData(100, true);

// Wait for frames to arrive downstream.
response->waitForEndStream();
ASSERT_TRUE(response->waitForEndStream());

EXPECT_TRUE(response->complete());
EXPECT_EQ("200", response->headers().Status()->value().getStringView());
Expand Down