Conversation
Signed-off-by: Jose Nino <jnino@lyft.com>
|
@danielhochman @htuch up for review |
| resources[0].set_name(route_config_name_); | ||
| callbacks_->onConfigUpdate(resources); | ||
| version_info_ = Envoy::Config::Utility::computeHashedVersion(response_body); | ||
| stats_.version_.set(HashUtil::xxHash64(version_info_)); |
There was a problem hiding this comment.
i would just hash the response body again here
There was a problem hiding this comment.
Please avoid computing the hash twice. Just return a tuple or something.
There was a problem hiding this comment.
But +1 for using same hash.
| ---------- | ||
|
|
||
| RDS has a statistics tree rooted at *http.<stat_prefix>.rds.* with the following statistics: | ||
| RDS has a statistics tree rooted at *http.<stat_prefix>.rds.<route_config_name>* with the following statistics: |
There was a problem hiding this comment.
*http.<stat_prefix>.rds.<route_config_name>.*
|
@danielhochman @htuch @mattklein123 ready for another pass. |
| } | ||
|
|
||
| std::string path_; | ||
| std::string version_info_; |
There was a problem hiding this comment.
why add this local var?
source/common/router/rds_impl.cc
Outdated
| std::string RdsRouteConfigProviderImpl::rdsStatsName(const std::string& stat_prefix, | ||
| const std::string& route_config_name) { | ||
| std::string stats_name = fmt::format("{}rds.{}.", stat_prefix, route_config_name); | ||
| std::replace(stats_name.begin(), stats_name.end(), ':', '_'); |
There was a problem hiding this comment.
Do you have a test case for this? cc @hennna please update this site also in your other PR if we move this into scope.
There was a problem hiding this comment.
I used all the stats expectations as a test that the name is correct. But I will make an explicit test.
There was a problem hiding this comment.
I've updated #1806. Let me know if I'm missing anything else.
There was a problem hiding this comment.
will remove this in favor of @hennna's change.
|
|
||
| RDS has a statistics tree rooted at *http.<stat_prefix>.rds.* with the following statistics: | ||
| RDS has a statistics tree rooted at *http.<stat_prefix>.rds.<route_config_name>.*. | ||
| Any ``:`` character in the ``route_config_name`` name gets replaces with ``_`` in the |
| update_attempt, Counter, Total API fetches attempted | ||
| update_success, Counter, Total API fetches completed successfully | ||
| update_failure, Counter, Total API fetches that failed (either network or schema errors) | ||
| version, Gauge, Hash of the contents from the last successful API fetch |
There was a problem hiding this comment.
Don't we also want to report the actual version_info as provided by v2 xDS?
There was a problem hiding this comment.
I don't think we can provide that via a gauge, given that version_info is a string.
There was a problem hiding this comment.
we could attempt atoul on the first 6 chars similar to the server's version info and fallback to hashing. i'm not sure that it's worth it though.
Signed-off-by: Jose Nino <jnino@lyft.com>
|
@danielhochman updated |
| */ | ||
| // clang-format off | ||
| #define ALL_SUBSCRIPTION_STATS(COUNTER) \ | ||
| #define ALL_SUBSCRIPTION_STATS(COUNTER, GAUGE) \ |
There was a problem hiding this comment.
nit: align the spacing of \
There was a problem hiding this comment.
hmm I thought fix_format would take care of this.
include/envoy/upstream/upstream.h
Outdated
| COUNTER(update_success) \ | ||
| COUNTER(update_failure) \ | ||
| COUNTER(update_empty) | ||
| COUNTER(update_empty) \ |
Description: expose the new per try idle timeout via the engine builder. Risk Level: low Testing: unit test Docs Changes: added Signed-off-by: Jose Nino <jnino@lyft.com> Co-authored-by: Alan Chiu <achiu@lyft.com> Signed-off-by: JP Simard <jp@jpsim.com>
Description: expose the new per try idle timeout via the engine builder. Risk Level: low Testing: unit test Docs Changes: added Signed-off-by: Jose Nino <jnino@lyft.com> Co-authored-by: Alan Chiu <achiu@lyft.com> Signed-off-by: JP Simard <jp@jpsim.com>
Surface the version_info field in the xDS subscriptions as a gauge in the xDS stats trees.
Signed-off-by: Jose Nino jnino@lyft.com