-
Notifications
You must be signed in to change notification settings - Fork 150
[Config registry] Cleanup configuration keys constants, and check them against local json file #7556
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
base: master
Are you sure you want to change the base?
[Config registry] Cleanup configuration keys constants, and check them against local json file #7556
Conversation
7dbf345 to
8d4256d
Compare
65fbbec to
3bb22a8
Compare
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing the following branches/commits: Execution-time benchmarks measure the whole time it takes to execute a program. And are intended to measure the one-off costs. Cases where the execution time results for the PR are worse than latest master results are shown in red. The following thresholds were used for comparing the execution times:
Note that these results are based on a single point-in-time result for each branch. For full results, see the dashboard. Graphs show the p99 interval based on the mean and StdDev of the test run, as well as the mean value of the run (shown as a diamond below the graph). gantt
title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7556) - mean (72ms) : 71, 74
. : milestone, 72,
master - mean (72ms) : 71, 73
. : milestone, 72,
section Baseline
This PR (7556) - mean (68ms) : 66, 71
. : milestone, 68,
master - mean (68ms) : 66, 70
. : milestone, 68,
section CallTarget+Inlining+NGEN
This PR (7556) - mean (1,052ms) : 999, 1105
. : milestone, 1052,
master - mean (1,056ms) : 985, 1127
. : milestone, 1056,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7556) - mean (107ms) : 105, 108
. : milestone, 107,
master - mean (106ms) : 105, 108
. : milestone, 106,
section Baseline
This PR (7556) - mean (106ms) : 103, 108
. : milestone, 106,
master - mean (106ms) : 103, 108
. : milestone, 106,
section CallTarget+Inlining+NGEN
This PR (7556) - mean (742ms) : 721, 763
. : milestone, 742,
master - mean (750ms) : 700, 799
. : milestone, 750,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7556) - mean (101ms) : 100, 102
. : milestone, 101,
master - mean (100ms) : 99, 101
. : milestone, 100,
section Baseline
This PR (7556) - mean (101ms) : 98, 103
. : milestone, 101,
master - mean (100ms) : 98, 102
. : milestone, 100,
section CallTarget+Inlining+NGEN
This PR (7556) - mean (774ms) : 731, 816
. : milestone, 774,
master - mean (779ms) : 738, 820
. : milestone, 779,
gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7556) - mean (93ms) : 92, 95
. : milestone, 93,
master - mean (93ms) : 92, 94
. : milestone, 93,
section Baseline
This PR (7556) - mean (92ms) : 90, 94
. : milestone, 92,
master - mean (92ms) : 90, 95
. : milestone, 92,
section CallTarget+Inlining+NGEN
This PR (7556) - mean (661ms) : 646, 675
. : milestone, 661,
master - mean (663ms) : 648, 679
. : milestone, 663,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7556) - mean (198ms) : 195, 200
. : milestone, 198,
master - mean (197ms) : 194, 201
. : milestone, 197,
section Baseline
This PR (7556) - mean (194ms) : 190, 198
. : milestone, 194,
master - mean (194ms) : 189, 199
. : milestone, 194,
section CallTarget+Inlining+NGEN
This PR (7556) - mean (1,168ms) : 1111, 1226
. : milestone, 1168,
master - mean (1,168ms) : 1113, 1223
. : milestone, 1168,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7556) - mean (278ms) : 274, 282
. : milestone, 278,
master - mean (278ms) : 275, 282
. : milestone, 278,
section Baseline
This PR (7556) - mean (278ms) : 272, 284
. : milestone, 278,
master - mean (278ms) : 273, 283
. : milestone, 278,
section CallTarget+Inlining+NGEN
This PR (7556) - mean (940ms) : 902, 979
. : milestone, 940,
master - mean (944ms) : 882, 1007
. : milestone, 944,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7556) - mean (282ms) : 278, 286
. : milestone, 282,
master - mean (282ms) : 277, 287
. : milestone, 282,
section Baseline
This PR (7556) - mean (283ms) : 278, 288
. : milestone, 283,
master - mean (283ms) : 276, 290
. : milestone, 283,
section CallTarget+Inlining+NGEN
This PR (7556) - mean (998ms) : 964, 1032
. : milestone, 998,
master - mean (996ms) : 957, 1035
. : milestone, 996,
gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat X
axisFormat %s
todayMarker off
section Bailout
This PR (7556) - mean (270ms) : 266, 274
. : milestone, 270,
master - mean (271ms) : 265, 276
. : milestone, 271,
section Baseline
This PR (7556) - mean (271ms) : 264, 278
. : milestone, 271,
master - mean (270ms) : 266, 274
. : milestone, 270,
section CallTarget+Inlining+NGEN
This PR (7556) - mean (853ms) : 833, 873
. : milestone, 853,
master - mean (857ms) : 837, 877
. : milestone, 857,
|
3bb22a8 to
cbb3593
Compare
d340651 to
aef9602
Compare
8d4256d to
afa84af
Compare
57a0761 to
437db7e
Compare
This comment has been minimized.
This comment has been minimized.
afa84af to
05247c7
Compare
437db7e to
e4fb133
Compare
05247c7 to
c50a9c1
Compare
e4fb133 to
bc2ad02
Compare
c50a9c1 to
7dbfceb
Compare
5a9a712 to
6d51e76
Compare
7dbfceb to
56b17eb
Compare
6d51e76 to
f9bb5ba
Compare
56b17eb to
7fb125e
Compare
f9bb5ba to
1bc1b38
Compare
7fb125e to
25fa9a0
Compare
3ab9889 to
e31264e
Compare
25fa9a0 to
b7cefbd
Compare
e31264e to
416672b
Compare
b7cefbd to
6dfb9a9
Compare
416672b to
be5f635
Compare
…f ConfigurationKeys class doesnt list config keys not present in the json
1cfe73f to
096952f
Compare
b202c12 to
1f81c8c
Compare
096952f to
869594a
Compare
bb9d5d8 to
f819c41
Compare
As part of Config inversion second step, this is part of stack:
Add gitlab step and json configuration file > #7548
Cleanup config keys constants, check them against local json file > #7556
Aliases handling > #7565
Analyzers to guard platform and configurationbuilder > #7575
Summary of changes
PlatformKeysclassCheckConfigurationKeysAgainstJsonValidationsto validate that allConfigurationKeysconstants are present in supported-configurations.jsonPlatformKeysfor external platform environment variablesDD_TRACE_ACTIVITY_LISTENER_ENABLEDkey toConfigurationKeysReason for change
After adding supported-configurations.json in PR #7548, we need to ensure that:
ConfigurationKeysclass are documented in the JSON fileWithout this validation, developers could:
ConfigurationKeysbut forget to add them to supported-configurations.jsonImplementation details
PlatformKeys class creation:
ConfigurationKeysinto newPlatformKeysclassAWS_LAMBDA_FUNCTION_NAME,AWS_REGION, etc.WEBSITE_SITE_NAME,WEBSITE_RESOURCE_GROUP, etc.FUNCTIONS_WORKER_RUNTIME,FUNCTIONS_EXTENSION_VERSION, etc.FUNCTION_NAME,FUNCTION_REGION,K_SERVICE, etc.CORECLR_PROFILER,CORECLR_PROFILER_PATH,COR_PROFILER, etc.KUBERNETES_SERVICE_HOST,DD_ENTITY_ID, etc.Nuke validation step:
Validation logic:
net6.0assembly to analyzeConfigurationKeysclasspublic const stringfields fromConfigurationKeysand nested classessupportedConfigurations,aliases, anddeprecationssections in JSONUpdated references:
TracerSettings: Changed Azure/AWS/GCP key references to usePlatformKeysPlatformKeysfor platform environment variablesAdded missing key:
DD_TRACE_ACTIVITY_LISTENER_ENABLEDwas being used in code but not defined as a constantTest coverage
CompileManagedSrcto validate synchronizationConfigurationKeys.AzureAppService.SiteNameKey)Other details
Benefits:
Example validation output:
Future improvements:
ConfigurationKeysclassThis PR builds on #7548 (add supported-configurations.json) and is a prerequisite for future PRs that will add Roslyn analyzers to enforce usage of these centralized constants.