Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
08c80b4
apply all changes from PR #9327, accomodated to master
mtoffl01 Aug 21, 2025
c62688b
merge with configId changes made in master
mtoffl01 Aug 21, 2025
125744a
nits: add configId in ConfigProvider methods where it was missing; fi…
mtoffl01 Aug 21, 2025
8becbc5
Fix 'test config id exists in ConfigCollector when using StableConfig…
mtoffl01 Aug 21, 2025
db60faf
introduce reportDefault
mtoffl01 Aug 21, 2025
750ba64
Call collect in BaseApplication.getLogInjectionEnabled; make getAppli…
mtoffl01 Aug 22, 2025
3006e7c
Fix call to getAppliedConfigSetting in ConfigCollector test
mtoffl01 Aug 22, 2025
bee84bf
Introduce ConfigValueResolver and ConfigMergeResolver
mtoffl01 Aug 22, 2025
bfcfd7e
getString methods only report non-null values to telemetry
mtoffl01 Aug 22, 2025
b411ea9
remove dependency on collectConfig for reReportToCollector and reRepo…
mtoffl01 Aug 22, 2025
d097300
Merge branch 'master' into mtoff/4-config-sources
mtoffl01 Aug 22, 2025
1ca7fd9
updating config collector to not override existing configs
mhlidd Aug 27, 2025
81db67d
Adding putDefault and adding unit tests
mhlidd Aug 28, 2025
1b81e8a
relaxing reReportToCollector restraint and adding unit test
mhlidd Aug 29, 2025
9b22670
cleanup
mhlidd Aug 29, 2025
cdf3a12
updating failing unit test
mhlidd Sep 10, 2025
7053f6c
abstracing ConfigCollector
mhlidd Sep 11, 2025
ff95cdc
adding support for proper seqId with Remote Config
mhlidd Sep 11, 2025
4094c53
abstracting away getString
mhlidd Sep 12, 2025
1d70667
Update internal-api/src/main/java/datadog/trace/bootstrap/config/prov…
mtoffl01 Sep 16, 2025
bdab76d
Update internal-api/src/main/java/datadog/trace/bootstrap/config/prov…
mtoffl01 Sep 16, 2025
2482933
Update internal-api/src/main/java/datadog/trace/bootstrap/config/prov…
mtoffl01 Sep 16, 2025
bc64730
nit: fix javadoc comments
mtoffl01 Sep 16, 2025
11b61f1
Modify getEnum, getList, getIntegerRange and getSet to report default…
mtoffl01 Sep 16, 2025
d7dc744
merge conflicts
mtoffl01 Sep 16, 2025
700f837
Fix merge conflicts in ConfigCollectorTest.groovy
mtoffl01 Sep 16, 2025
b190961
remove remoteConfig methods from ConfigCollector + highestSeqId
mtoffl01 Sep 17, 2025
779551d
remove serializenulls comment in TelemetryRequestBody
mtoffl01 Sep 17, 2025
94f6485
remove 'no usages' comment above unused ConfigCollector put method
mtoffl01 Sep 17, 2025
e796896
Simplify javadoc for putAll
mtoffl01 Sep 17, 2025
3997f56
remove javadoc for ABSENT_SEQ_ID
mtoffl01 Sep 17, 2025
9794631
revert getStringInternal changes
mtoffl01 Sep 17, 2025
84ab423
Introduce new getStringInternal, for getting string from non-default …
mtoffl01 Sep 17, 2025
a9c1f7a
Deprecate ConfigCollector constructor without sequence ID
mtoffl01 Sep 19, 2025
ff39a53
putRemote: ConfigCollector method for 'putting' from Remote Config or…
mtoffl01 Sep 22, 2025
0408e49
ConfigSetting.NON_DEFAULT_SEQ_ID: introduce new constant, migrate all…
mtoffl01 Sep 22, 2025
e3b307d
ConfigCollector.put: Delete unused function
mtoffl01 Sep 22, 2025
81187aa
Update internal-api/src/test/groovy/datadog/trace/api/ConfigCollector…
mtoffl01 Sep 22, 2025
0ffe413
replace 'def origin' assignment in ConfigCollectorTest with in-line use
mtoffl01 Sep 22, 2025
b5e1414
ConfigCollector.put: Remove deprecated function with zero uses
mtoffl01 Sep 22, 2025
b048c91
NEW_SUB_MAP: Define reusable lambda function as static field in Confi…
mtoffl01 Sep 22, 2025
0ef089d
updateAll: rename putAll to updateAll, and scope to Remote origin, only
mtoffl01 Sep 22, 2025
7ef2a9f
Merge branch 'mtoff/4-config-sources' of github.com:DataDog/dd-trace-…
mtoffl01 Sep 22, 2025
7508fc7
Fix updateAll
mtoffl01 Sep 22, 2025
49d3ced
Align naming of methods that report remote config to the ConfigCollector
mcculls Sep 23, 2025
fe9b376
Avoid need to peek into ConfigCollector internals
mcculls Sep 23, 2025
d9dac26
Restore atomic reporting of updates from remote-config
mcculls Sep 23, 2025
474cd40
Merge remote-tracking branch 'origin/master' into mtoff/4-config-sources
mcculls Sep 23, 2025
8e29e03
Merge remote-tracking branch 'origin/master' into mtoff/4-config-sources
mcculls Sep 23, 2025
365f5d6
Update utils/config-utils/src/main/java/datadog/trace/bootstrap/confi…
mtoffl01 Sep 23, 2025
4a91a8e
Update utils/config-utils/src/main/java/datadog/trace/bootstrap/confi…
mtoffl01 Sep 23, 2025
d9fe333
Update utils/config-utils/src/main/java/datadog/trace/bootstrap/confi…
mtoffl01 Sep 23, 2025
2626c62
Fix bug in reReportFinalResult that incorrectly reported CALCULATED f…
mtoffl01 Sep 23, 2025
5b5ad0d
Merge branch 'mtoff/4-config-sources' of github.com:DataDog/dd-trace-…
mtoffl01 Sep 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
relaxing reReportToCollector restraint and adding unit test
  • Loading branch information
mhlidd committed Aug 29, 2025
commit 1b81e8a8d9f969831aec3de59450f564ab56a2f9
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ private static <T> void reportDefault(String key, T defaultValue) {
}

/** Helper class to store resolved configuration values with their metadata */
private static class ConfigValueResolver<T> {
static class ConfigValueResolver<T> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This class is not private in order to expose it for a unit test that is needed to complete code coverage. The unit test verifies that reReportToCollector is not invoked when origin == null, which should never happen since the method to create a ConfigValueResolver should only occur when no re-reporting is expected. This check is only here as a safety check against poor usage of the function.

final T value;
final ConfigOrigin origin;
final int seqId;
Expand All @@ -653,7 +653,8 @@ static <T> ConfigValueResolver<T> of(T value, ConfigOrigin origin, int seqId, St

/** Re-reports this resolved value to ConfigCollector with the specified seqId */
void reReportToCollector(String key, int finalSeqId) {
if (value != null && origin != null) {
// Source and value should never be null if there is an initialized ConfigValueResolver
if (origin != null) {
ConfigCollector.get().put(key, value, origin, finalSeqId, configId);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -475,4 +475,17 @@ class ConfigProviderTest extends DDSpecification {
def maxSeqId = [defaultSetting.seqId, envSetting.seqId, jvmSetting.seqId, calculatedSetting.seqId].max()
calculatedSetting.seqId == maxSeqId
}

// NOTE: This is a case that SHOULD never occur. #reReportToCollector(String, int) should only be called with valid origins
def "ConfigValueResolver reReportToCollector handles null origin gracefully"() {
setup:
ConfigCollector.get().collect() // clear previous state
ConfigProvider.ConfigValueResolver resolver = ConfigProvider.ConfigValueResolver.of("1")

when:
resolver.reReportToCollector("test.key", 5)

then:
0 * ConfigCollector.get().put(_, _, _, _, _)
}
}
Loading