@@ -74,7 +74,7 @@ String getKey() {
7474 }
7575 }
7676
77- private static String appEngineLabelPrefix = "appengine.googleapis.com/" ;
77+ private static final String APPENGINE_LABEL_PREFIX = "appengine.googleapis.com/" ;
7878
7979 private static Map <String , Label []> resourceTypeWithLabels ;
8080
@@ -199,13 +199,12 @@ private static List<LoggingEnhancer> getEnhancers(Resource resourceType) {
199199 switch (resourceType ) {
200200 // Trace logging enhancer is supported on GAE Flex and Standard.
201201 case GaeAppFlex :
202- enhancers = new ArrayList <>();
203202 enhancers .add (new LabelLoggingEnhancer (
204- appEngineLabelPrefix , Collections .singletonList (Label .InstanceName )));
205- enhancers .add (new TraceLoggingEnhancer (appEngineLabelPrefix ));
203+ APPENGINE_LABEL_PREFIX , Collections .singletonList (Label .InstanceName )));
204+ enhancers .add (new TraceLoggingEnhancer (APPENGINE_LABEL_PREFIX ));
206205 break ;
207206 case GaeAppStandard :
208- enhancers .add (new TraceLoggingEnhancer (appEngineLabelPrefix ));
207+ enhancers .add (new TraceLoggingEnhancer (APPENGINE_LABEL_PREFIX ));
209208 break ;
210209 default :
211210 enhancers = Collections .emptyList ();
@@ -220,7 +219,7 @@ private static List<LoggingEnhancer> getEnhancers(Resource resourceType) {
220219 * are restricted to a supported set per resource.
221220 * @see <a href="https://cloud.google.com/logging/docs/api/v2/resource-list">Logging Labels</a>
222221 */
223- static class LabelLoggingEnhancer implements LoggingEnhancer {
222+ private static class LabelLoggingEnhancer implements LoggingEnhancer {
224223 String prefix ;
225224 List <Label > labels ;
226225
0 commit comments