[xds] ToString: Output telemetry labels from cluster resource (#36401)

Closes #36401

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/36401 from yashykt:LogServiceNameLabels 5a22a5c6cc
PiperOrigin-RevId: 626171767
pull/36286/head
Yash Tibrewal 7 months ago committed by Copybara-Service
parent 17984c10e1
commit 9c704b6962
  1. 9
      src/core/ext/xds/xds_cluster.cc

@ -116,6 +116,15 @@ std::string XdsClusterResource::ToString() const {
absl::StrCat("max_concurrent_requests=", max_concurrent_requests)); absl::StrCat("max_concurrent_requests=", max_concurrent_requests));
contents.push_back(absl::StrCat("override_host_statuses=", contents.push_back(absl::StrCat("override_host_statuses=",
override_host_statuses.ToString())); override_host_statuses.ToString()));
if (!service_telemetry_label.as_string_view().empty()) {
contents.push_back(absl::StrCat("service_name_telemetry_label=",
service_telemetry_label.as_string_view()));
}
if (!namespace_telemetry_label.as_string_view().empty()) {
contents.push_back(
absl::StrCat("service_namespace_telemetry_label=",
namespace_telemetry_label.as_string_view()));
}
return absl::StrCat("{", absl::StrJoin(contents, ", "), "}"); return absl::StrCat("{", absl::StrJoin(contents, ", "), "}");
} }

Loading…
Cancel
Save