File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
detectors/resources-support/src/main/java/com/google/cloud/opentelemetry/detection Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 2222import java .net .HttpURLConnection ;
2323import java .net .URL ;
2424import java .nio .charset .StandardCharsets ;
25- import java .util .HashMap ;
2625import java .util .Map ;
26+ import java .util .concurrent .ConcurrentHashMap ;
2727
2828/**
2929 * Retrieves Google Cloud project-id and a limited set of instance attributes from Metadata server.
@@ -36,7 +36,7 @@ final class GCPMetadataConfig {
3636
3737 private static final String DEFAULT_URL = "http://metadata.google.internal/computeMetadata/v1/" ;
3838 private final String url ;
39- private final Map <String , String > cachedAttributes = new HashMap <>();
39+ private final Map <String , String > cachedAttributes = new ConcurrentHashMap <>();
4040
4141 private GCPMetadataConfig () {
4242 this .url = DEFAULT_URL ;
You can’t perform that action at this time.
0 commit comments