Skip to content

Commit 5b2e959

Browse files
committed
feat: Add grpc.xds.resource_type label to xDS client metrics
1 parent c1a20ce commit 5b2e959

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

google-cloud-spanner/src/main/java/com/google/cloud/spanner/BuiltInMetricsConstant.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ public class BuiltInMetricsConstant {
9999
public static final AttributeKey<String> DIRECT_PATH_USED_KEY =
100100
AttributeKey.stringKey("directpath_used");
101101
public static final AttributeKey<String> REQUEST_ID_KEY = AttributeKey.stringKey(REQUEST_ID);
102+
public static final AttributeKey<String> GRPC_XDS_RESOURCE_TYPE_KEY = AttributeKey.stringKey("grpc.xds.resource_type");
102103
public static Set<String> ALLOWED_EXEMPLARS_ATTRIBUTES = new HashSet<>(Arrays.asList(REQUEST_ID));
103104

104105
// IP address prefixes allocated for DirectPath backends.
@@ -232,6 +233,7 @@ private static void defineGRPCView(ImmutableMap.Builder<InstrumentSelector, View
232233
.map(AttributeKey::getKey)
233234
.collect(Collectors.toSet());
234235
attributesFilter.addAll(BuiltInMetricsConstant.GRPC_LB_RLS_ATTRIBUTES);
236+
attributesFilter.add(BuiltInMetricsConstant.GRPC_XDS_RESOURCE_TYPE_KEY.getKey());
235237

236238
View view =
237239
View.builder()

0 commit comments

Comments
 (0)