From aac97845278c7fd5e8eeda84f843d86b75999cc7 Mon Sep 17 00:00:00 2001 From: Mattie Fu Date: Tue, 27 Sep 2022 10:19:22 -0400 Subject: [PATCH] fix: add a UUID in the task value --- .../cloud/bigtable/stats/BigtableStackdriverExportUtils.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BigtableStackdriverExportUtils.java b/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BigtableStackdriverExportUtils.java index bdca097050..ff3e93158b 100644 --- a/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BigtableStackdriverExportUtils.java +++ b/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BigtableStackdriverExportUtils.java @@ -46,6 +46,7 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.UUID; import java.util.logging.Level; import java.util.logging.Logger; import javax.annotation.Nullable; @@ -168,7 +169,7 @@ static String getDefaultTaskValue() { // Generate a random number and use the same format "random_number@hostname". return "java-" + new SecureRandom().nextInt() + "@" + hostname; } - return "java-" + jvmName; + return "java-" + UUID.randomUUID() + jvmName; } private static MetricKind createMetricKind(Type type) {