@@ -55,30 +55,6 @@ public class BuiltinMetricsConstants {
5555 static final AttributeKey <String > TRANSPORT_ZONE = AttributeKey .stringKey ("transport_zone" );
5656 static final AttributeKey <String > TRANSPORT_SUBZONE = AttributeKey .stringKey ("transport_subzone" );
5757
58- // gRPC attribute keys
59- // Note that these attributes keys from transformed from
60- // A.B.C to A_B_C before exporting to Cloud Monitoring.
61- static final AttributeKey <String > GRPC_LB_BACKEND_SERVICE_KEY =
62- AttributeKey .stringKey ("grpc.lb.backend_service" );
63- static final AttributeKey <String > GRPC_DISCONNECT_ERROR_KEY =
64- AttributeKey .stringKey ("grpc.disconnect_error" );
65- static final AttributeKey <String > GRPC_LB_LOCALITY_KEY =
66- AttributeKey .stringKey ("grpc.lb.locality" );
67- static final AttributeKey <String > GRPC_TARGET_KEY = AttributeKey .stringKey ("grpc.target" );
68- static final AttributeKey <String > GRPC_SECURITY_LEVEL_KEY =
69- AttributeKey .stringKey ("grpc.security_level" );
70- static final AttributeKey <String > GRPC_METHOD_KEY = AttributeKey .stringKey ("grpc.method" );
71- static final AttributeKey <String > GRPC_STATUS_KEY = AttributeKey .stringKey ("grpc.status" );
72- static final AttributeKey <String > GRPC_LB_RLS_DATA_PLANE_TARGET_KEY =
73- AttributeKey .stringKey ("grpc.lb.rls.data_plane_target" );
74- static final AttributeKey <String > GRPC_LB_PICK_RESULT_KEY =
75- AttributeKey .stringKey ("grpc.lb.pick_result" );
76- static final AttributeKey <String > GRPC_LB_RLS_SERVER_TARGET_KEY =
77- AttributeKey .stringKey ("grpc.lb.rls.server_target" );
78- static final AttributeKey <String > GRPC_XDS_SERVER_KEY = AttributeKey .stringKey ("grpc.xds.server" );
79- static final AttributeKey <String > GRPC_XDS_RESOURCE_TYPE_KEY =
80- AttributeKey .stringKey ("grpc.xds.resource_type" );
81-
8258 public static final String METER_NAME = "bigtable.googleapis.com/internal/client/" ;
8359
8460 // Metric names
@@ -101,68 +77,31 @@ public class BuiltinMetricsConstants {
10177 ImmutableMap .<String , Set <String >>builder ()
10278 .put (
10379 "grpc.client.attempt.duration" ,
104- ImmutableSet .of (
105- GRPC_LB_LOCALITY_KEY .getKey (),
106- GRPC_METHOD_KEY .getKey (),
107- GRPC_TARGET_KEY .getKey (),
108- GRPC_STATUS_KEY .getKey ()))
80+ ImmutableSet .of ("grpc.lb.locality" , "grpc.method" , "grpc.target" , "grpc.status" ))
10981 .put (
11082 "grpc.lb.rls.default_target_picks" ,
111- ImmutableSet .of (
112- GRPC_LB_RLS_DATA_PLANE_TARGET_KEY .getKey (), GRPC_LB_PICK_RESULT_KEY .getKey ()))
83+ ImmutableSet .of ("grpc.lb.rls.data_plane_target" , "grpc.lb.pick_result" ))
11384 .put (
11485 "grpc.lb.rls.target_picks" ,
11586 ImmutableSet .of (
116- GRPC_TARGET_KEY . getKey () ,
117- GRPC_LB_RLS_SERVER_TARGET_KEY . getKey () ,
118- GRPC_LB_RLS_DATA_PLANE_TARGET_KEY . getKey () ,
119- GRPC_LB_PICK_RESULT_KEY . getKey () ))
87+ "grpc.target" ,
88+ "grpc.lb.rls.server_target" ,
89+ "grpc.lb.rls.data_plane_target" ,
90+ "grpc.lb.pick_result" ))
12091 .put (
12192 "grpc.lb.rls.failed_picks" ,
122- ImmutableSet .of (GRPC_TARGET_KEY . getKey (), GRPC_LB_RLS_SERVER_TARGET_KEY . getKey () ))
93+ ImmutableSet .of ("grpc.target" , "grpc.lb.rls.server_target" ))
12394 // TODO: "grpc.xds_client.connected"
124- .put (
125- "grpc.xds_client.server_failure" ,
126- ImmutableSet .of (GRPC_TARGET_KEY .getKey (), GRPC_XDS_SERVER_KEY .getKey ()))
95+ .put ("grpc.xds_client.server_failure" , ImmutableSet .of ("grpc.target" , "grpc.xds.server" ))
12796 // TODO: "grpc.xds_client.resource_updates_valid",
12897 .put (
12998 "grpc.xds_client.resource_updates_invalid" ,
130- ImmutableSet .of (
131- GRPC_TARGET_KEY .getKey (),
132- GRPC_XDS_SERVER_KEY .getKey (),
133- GRPC_XDS_RESOURCE_TYPE_KEY .getKey ()))
99+ ImmutableSet .of ("grpc.target" , "grpc.xds.server" , "grpc.xds.resource_type" ))
134100 // TODO: "grpc.xds_client.resources"
135- // gRPC subchannel metrics
136- .put (
137- "grpc.subchannel.disconnections" ,
138- ImmutableSet .of (
139- GRPC_LB_BACKEND_SERVICE_KEY .getKey (),
140- GRPC_DISCONNECT_ERROR_KEY .getKey (),
141- GRPC_LB_LOCALITY_KEY .getKey (),
142- GRPC_TARGET_KEY .getKey ()))
143- .put (
144- "grpc.subchannel.connection_attempts_succeeded" ,
145- ImmutableSet .of (
146- GRPC_LB_BACKEND_SERVICE_KEY .getKey (),
147- GRPC_LB_LOCALITY_KEY .getKey (),
148- GRPC_TARGET_KEY .getKey ()))
149- .put (
150- "grpc.subchannel.connection_attempts_failed" ,
151- ImmutableSet .of (
152- GRPC_LB_BACKEND_SERVICE_KEY .getKey (),
153- GRPC_LB_LOCALITY_KEY .getKey (),
154- GRPC_TARGET_KEY .getKey ()))
155- .put (
156- "grpc.subchannel.open_connections" ,
157- ImmutableSet .of (
158- GRPC_LB_BACKEND_SERVICE_KEY .getKey (),
159- GRPC_LB_LOCALITY_KEY .getKey (),
160- GRPC_SECURITY_LEVEL_KEY .getKey (),
161- GRPC_TARGET_KEY .getKey ()))
162101 .build ();
163102
164103 public static final Set <String > INTERNAL_METRICS =
165- ImmutableSet .of (PER_CONNECTION_ERROR_COUNT_NAME , OUTSTANDING_RPCS_PER_CHANNEL_NAME ).stream ()
104+ ImmutableSet .of (PER_CONNECTION_ERROR_COUNT_NAME ).stream ()
166105 .map (m -> METER_NAME + m )
167106 .collect (ImmutableSet .toImmutableSet ());
168107 // End allow list of metrics that will be exported
0 commit comments