2727/** Translates from OpenTelemetry Resource into Google Cloud's notion of resource. */
2828public class ResourceTranslator {
2929
30- private static String UNKNOWN_SERVICE_PREFIX = "unknown_service" ;
30+ private static final String UNKNOWN_SERVICE_PREFIX = "unknown_service" ;
3131
3232 private ResourceTranslator () {}
3333
@@ -89,11 +89,11 @@ public static AttributeMapping create(
8989 }
9090 }
9191
92- private static List <AttributeMapping > GCE_INSTANCE_LABELS =
92+ private static final List <AttributeMapping > GCE_INSTANCE_LABELS =
9393 Arrays .asList (
9494 AttributeMapping .create ("zone" , ResourceAttributes .CLOUD_AVAILABILITY_ZONE ),
9595 AttributeMapping .create ("instance_id" , ResourceAttributes .HOST_ID ));
96- private static List <AttributeMapping > K8S_CONTAINER_LABELS =
96+ private static final List <AttributeMapping > K8S_CONTAINER_LABELS =
9797 Arrays .asList (
9898 AttributeMapping .create (
9999 "location" ,
@@ -103,7 +103,7 @@ public static AttributeMapping create(
103103 AttributeMapping .create ("namespace_name" , ResourceAttributes .K8S_NAMESPACE_NAME ),
104104 AttributeMapping .create ("container_name" , ResourceAttributes .K8S_CONTAINER_NAME ),
105105 AttributeMapping .create ("pod_name" , ResourceAttributes .K8S_POD_NAME ));
106- private static List <AttributeMapping > K8S_POD_LABELS =
106+ private static final List <AttributeMapping > K8S_POD_LABELS =
107107 Arrays .asList (
108108 AttributeMapping .create (
109109 "location" ,
@@ -112,33 +112,33 @@ public static AttributeMapping create(
112112 AttributeMapping .create ("cluster_name" , ResourceAttributes .K8S_CLUSTER_NAME ),
113113 AttributeMapping .create ("namespace_name" , ResourceAttributes .K8S_NAMESPACE_NAME ),
114114 AttributeMapping .create ("pod_name" , ResourceAttributes .K8S_POD_NAME ));
115- private static List <AttributeMapping > K8S_NODE_LABELS =
115+ private static final List <AttributeMapping > K8S_NODE_LABELS =
116116 Arrays .asList (
117117 AttributeMapping .create (
118118 "location" ,
119119 Arrays .asList (
120120 ResourceAttributes .CLOUD_AVAILABILITY_ZONE , ResourceAttributes .CLOUD_REGION )),
121121 AttributeMapping .create ("cluster_name" , ResourceAttributes .K8S_CLUSTER_NAME ),
122122 AttributeMapping .create ("node_name" , ResourceAttributes .K8S_NODE_NAME ));
123- private static List <AttributeMapping > K8S_CLUSTER_LABELS =
123+ private static final List <AttributeMapping > K8S_CLUSTER_LABELS =
124124 Arrays .asList (
125125 AttributeMapping .create (
126126 "location" ,
127127 Arrays .asList (
128128 ResourceAttributes .CLOUD_AVAILABILITY_ZONE , ResourceAttributes .CLOUD_REGION )),
129129 AttributeMapping .create ("cluster_name" , ResourceAttributes .K8S_CLUSTER_NAME ));
130- private static List <AttributeMapping > AWS_EC2_INSTANCE_LABELS =
130+ private static final List <AttributeMapping > AWS_EC2_INSTANCE_LABELS =
131131 Arrays .asList (
132132 AttributeMapping .create ("instance_id" , ResourceAttributes .HOST_ID ),
133133 AttributeMapping .create ("region" , ResourceAttributes .CLOUD_AVAILABILITY_ZONE ),
134134 AttributeMapping .create ("aws_account" , ResourceAttributes .CLOUD_ACCOUNT_ID ));
135- private static List <AttributeMapping > GOOGLE_CLOUD_APP_ENGINE_INSTANCE_LABELS =
135+ private static final List <AttributeMapping > GOOGLE_CLOUD_APP_ENGINE_INSTANCE_LABELS =
136136 Arrays .asList (
137137 AttributeMapping .create ("module_id" , ResourceAttributes .FAAS_NAME ),
138138 AttributeMapping .create ("version_id" , ResourceAttributes .FAAS_VERSION ),
139139 AttributeMapping .create ("instance_id" , ResourceAttributes .FAAS_INSTANCE ),
140140 AttributeMapping .create ("location" , ResourceAttributes .CLOUD_REGION ));
141- private static List <AttributeMapping > GENERIC_TASK_LABELS =
141+ private static final List <AttributeMapping > GENERIC_TASK_LABELS =
142142 Arrays .asList (
143143 AttributeMapping .create (
144144 "location" ,
@@ -155,7 +155,7 @@ public static AttributeMapping create(
155155 Arrays .asList (
156156 ResourceAttributes .SERVICE_INSTANCE_ID , ResourceAttributes .FAAS_INSTANCE ),
157157 "" ));
158- private static List <AttributeMapping > GENERIC_NODE_LABELS =
158+ private static final List <AttributeMapping > GENERIC_NODE_LABELS =
159159 Arrays .asList (
160160 AttributeMapping .create (
161161 "location" ,
0 commit comments