Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
meltsufin committed Jan 22, 2020
1 parent edb1bed commit 0af0330
Showing 1 changed file with 6 additions and 8 deletions.
Expand Up @@ -185,10 +185,10 @@ private static String getValue(Label label) {

/* Detect monitored Resource type using environment variables, else return global as default. */
private static Resource getAutoDetectedResourceType() {
if (System.getenv("K_SERVICE") != null &&
System.getenv("K_REVISION") != null &&
System.getenv("K_CONFIGURATION") != null &&
System.getenv("KUBERNETES_SERVICE_HOST") == null) {
if (System.getenv("K_SERVICE") != null
&& System.getenv("K_REVISION") != null
&& System.getenv("K_CONFIGURATION") != null
&& System.getenv("KUBERNETES_SERVICE_HOST") == null) {
return Resource.CloudRun;
}
if (System.getenv("GAE_INSTANCE") != null) {
Expand Down Expand Up @@ -223,10 +223,8 @@ private static String getCloudRunLocation() {
String zone = MetadataConfig.getZone();
// for Cloud Run managed, the zone is "REGION-1"
// So, we need to strip the "-1" to set location to just the region
if (zone.endsWith("-1"))
return zone.substring(0, zone.length() - 2);
else
return zone;
if (zone.endsWith("-1")) return zone.substring(0, zone.length() - 2);
else return zone;
}

private static List<LoggingEnhancer> createEnhancers(Resource resourceType) {
Expand Down

0 comments on commit 0af0330

Please sign in to comment.