New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Basic instrumentation changes behind a flag #663
Conversation
# Conflicts: # archaius-core/src/main/java/com/netflix/config/AbstractPollingScheduler.java # archaius-core/src/main/java/com/netflix/config/ConcurrentCompositeConfiguration.java # archaius-core/src/main/java/com/netflix/config/DefaultContextualPredicate.java # archaius-core/src/main/java/com/netflix/config/DynamicContextualProperty.java # archaius-core/src/main/java/com/netflix/config/DynamicPropertyFactory.java # archaius-core/src/main/java/com/netflix/config/WatchedUpdateResult.java # archaius-core/src/test/java/com/netflix/config/PollingSourceTest.java # archaius-etcd/src/main/java/com/netflix/config/source/EtcdConfigurationSource.java # archaius-zookeeper/src/main/java/com/netflix/config/source/ZooKeeperConfigurationSource.java # build.gradle # gradle/wrapper/gradle-wrapper.jar # gradle/wrapper/gradle-wrapper.properties # gradlew # gradlew.bat
return usedProperties; | ||
} | ||
|
||
private Set<String> usedProperties = new HashSet<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either this field should be a ConcurrentHashMap
like the stackTraces
one, or neither should because they'll both be subjected to the very same possible races.
Also, could they both be final
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated usedProperties to also be backed by a ConcurrentHashMap and changed both fields to be final as well.
Keeps track of usage data through ConcurrentCompositeConfiguration when enabled by the system property and also surfaces an uninstrumented endpoint for any calls that should not be recorded.
Also includes the ability to record stack traces of call sites (useful for debugging, but should not be used in prod).