rds: add config reload time stat for rds#17033
Conversation
Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
| :widths: 1, 1, 2 | ||
|
|
||
| config_reload, Counter, Total API fetches that resulted in a config reload due to a different config | ||
| config_reload_time, Gauge, Timestamp of the last config reload as milliseconds since the epoch |
There was a problem hiding this comment.
config_reload is only applicable/implemented for RDS/SRDS and VHDS - but added here generically. I followed the same pattern and added this new stat here even though it is implemented only for RDS and SRDS. If it is better to move to rds stats page - I can move.
There was a problem hiding this comment.
can you name this stat config_reload_time_ms?
Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
| :widths: 1, 1, 2 | ||
|
|
||
| config_reload, Counter, Total API fetches that resulted in a config reload due to a different config | ||
| config_reload_time, Gauge, Timestamp of the last config reload as milliseconds since the epoch |
There was a problem hiding this comment.
can you name this stat config_reload_time_ms?
test/common/router/rds_impl_test.cc
Outdated
| // Old config use count should be 1 now. | ||
| EXPECT_EQ(1, config.use_count()); | ||
| EXPECT_EQ(2UL, scope_.counter("foo.rds.foo_route_config.config_reload").value()); | ||
| EXPECT_NE(0, scope_ |
There was a problem hiding this comment.
could this flake if the test runs in <1ms?
If you are just trying to ensure that the gauge exists, you can use findGaugeByString, which is on class TestStore, which is the base class of MockIsolatedStatsStore.
There was a problem hiding this comment.
Sure.. Will change to ensure gauge exists.
|
@jmarantz PTAL addressed comments. The coverage failure not seems relevant. |
jmarantz
left a comment
There was a problem hiding this comment.
Looks great modulo nits.
/assign-from @envoyproxy/senior-maintainers
source/common/router/rds_impl.h
Outdated
| #define ALL_RDS_STATS(COUNTER) \ | ||
| #define ALL_RDS_STATS(COUNTER, GAUGE) \ | ||
| COUNTER(config_reload) \ | ||
| GAUGE(config_reload_time_ms, NeverImport) \ |
There was a problem hiding this comment.
nit: sort this block alphabetically, so the 2 counters go together.
source/common/router/scoped_rds.h
Outdated
| // clang-format off | ||
| #define ALL_SCOPED_RDS_STATS(COUNTER, GAUGE) \ | ||
| COUNTER(config_reload) \ | ||
| GAUGE(config_reload_time_ms, NeverImport) \ |
|
@envoyproxy/senior-maintainers assignee is @ggreenway |
Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
|
/retest |
|
Retrying Azure Pipelines: |
…bridge-stream * upstream/main: (268 commits) tools: adding dio,better comments (envoyproxy#17104) doc: fix misplaced #[extension-category] for Wasm runtimes (envoyproxy#17078) ci: Speedup deps precheck (envoyproxy#17102) doc: fix wrong link on wasm network filter. (envoyproxy#17079) docs: Added v3 API reference. (envoyproxy#17095) docs: Update include paths in repo (envoyproxy#17098) exception: make Ipv6Instance and Ipv4Instance not throw and remove some try catch pattern (envoyproxy#16122) tools: adding reminders for API shephards (envoyproxy#17081) ci: Fix wasm verify example (envoyproxy#17086) [fuzz]: fix oss fuzz bug 34515, limit maglev table size (envoyproxy#16671) test: silencing flaky test (envoyproxy#17084) Set `validate` flag when the SAN(SubjectAltName) matching is performed (envoyproxy#16816) Listener: reset the file event when destroying listener filters (envoyproxy#16952) docs: link additional filters that emit dynamic metadata (envoyproxy#17059) rds: add config reload time stat for rds (envoyproxy#17033) bazel: Use color by default for build and run commands (envoyproxy#17077) ci: Add timing for docker pull (envoyproxy#17074) [Windows] Adding note section in Original Source HTTP Filter (envoyproxy#17058) quic: add quic version counters in http3 codec stats. (envoyproxy#16943) quiche: change crypto stream factory interfaces (envoyproxy#17046) ... Signed-off-by: Garrett Bourg <bourg@squareup.com>
Signed-off-by: Rama Chavali <rama.rao@salesforce.com> Signed-off-by: chris.xin <xinchuantao@qq.com>
Signed-off-by: Rama Chavali <rama.rao@salesforce.com>
We would like to know when a route update is loaded to Envoy. This PR adds a stat to indicate the same.
Commit Message: add config reload time stat.
Additional Description:
Risk Level: Low
Testing: Added
Docs Changes: Updated
Release Notes: Updated
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Deprecated:]
[Optional API Considerations:]