From 6e4de99e3e78fd0431888a965265a5aefeaa5f8a Mon Sep 17 00:00:00 2001 From: Yongkoo Kang Date: Wed, 17 Jan 2024 14:29:05 -0800 Subject: [PATCH] Add instrumentation on more call sites --- .../netflix/config/ConcurrentCompositeConfiguration.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/archaius-core/src/main/java/com/netflix/config/ConcurrentCompositeConfiguration.java b/archaius-core/src/main/java/com/netflix/config/ConcurrentCompositeConfiguration.java index 2082ae14..bb97d2ac 100644 --- a/archaius-core/src/main/java/com/netflix/config/ConcurrentCompositeConfiguration.java +++ b/archaius-core/src/main/java/com/netflix/config/ConcurrentCompositeConfiguration.java @@ -546,6 +546,9 @@ public Object getPropertyUninstrumented(String key) { private Object getProperty(String key, boolean instrument) { if (overrideProperties.containsKey(key)) { + if (instrument) { + recordUsage(key); + } return overrideProperties.getProperty(key); } Configuration firstMatchingConfiguration = null; @@ -922,12 +925,13 @@ public Configuration getSource(String key) * @param config the configuration to query * @param key the key of the property */ - private static void appendListProperty(List dest, Configuration config, + private void appendListProperty(List dest, Configuration config, String key) { Object value = config.getProperty(key); if (value != null) { + recordUsage(key); if (value instanceof Collection) { Collection col = (Collection) value;