Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BACKPORT] Remove warnings for old client stats format #17513

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -276,8 +276,12 @@ public String toString() {
public void provideDynamicMetrics(MetricDescriptor descriptor, MetricsCollectionContext context) {
ClientStatistics clientStatistics = statsRef.get();
if (clientStatistics != null && clientStatistics.metricsBlob() != null) {
long timestamp = clientStatistics.timestamp();
byte[] metricsBlob = clientStatistics.metricsBlob();
if (metricsBlob.length == 0) {
// zero length means that the client does not support the new format
return;
}
long timestamp = clientStatistics.timestamp();
MetricConsumer consumer = new MetricConsumer() {
@Override
public void consumeLong(MetricDescriptor descriptor, long value) {
Expand Down