Skip to content
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

Merged
merged 11 commits into from Jul 19, 2023
Merged

Basic instrumentation changes behind a flag #663

merged 11 commits into from Jul 19, 2023

Conversation

akang31
Copy link
Contributor

@akang31 akang31 commented Jul 17, 2023

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).

# 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<>();
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@akang31 akang31 merged commit 312fb2c into 1.x Jul 19, 2023
2 checks passed
@akang31 akang31 deleted the inst branch July 19, 2023 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants