Commit ec92625
Enforce size limit on application_monitoring.yaml files (#8789)
* migrate CLIHelper to use a Map, parse system properties in key-vals
* Fix processTemplateVar logic to remove superfluous ':'
* nits: javadocs
* Move writeFileRaw helper to testutils
* Add YamlParser tests
* Revert CLIHelper to use List<String>; lazily load a Map cache for querying key-vals
* reuse logic for adding to the vm args cache
* apply github suggestions
* Move processTemplate yaml helper fns into StableConfigParser, along with tests
* Remove changes to CLIHelper; rely on System.getProperty instead
* optimize: return from processTemplate early if no {{ found
* Add more test coverage to StableConfigParserTest
* Optimize template processing to reduce use of substrings
* Introduce constants for repeated strings
* Change UNDEFINED_VALUE to empty string
* Add log messages for empty environment_variable and process_argument values in template variable
* Remove FileUtils and all its references
* initial file size limit implementation: phase 1 limit only
* Implement file size limit + tests
* remove unrelated changes
* Merge master & remove getMaxFileSizeBytes helper; give MAX_FILE_SIZE_BYTES default access
---------
Co-authored-by: Stuart McCulloch <[email protected]>1 parent f19b3dc commit ec92625
File tree
2 files changed
+59
-1
lines changed- internal-api/src
- main/java/datadog/trace/bootstrap/config/provider
- test/groovy/datadog/trace/bootstrap/config/provider
2 files changed
+59
-1
lines changedLines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| 25 | + | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
| |||
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
42 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
43 | 57 | | |
44 | 58 | | |
45 | 59 | | |
| |||
internal-api/src/test/groovy/datadog/trace/bootstrap/config/provider/StableConfigParserTest.groovy
Lines changed: 44 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
187 | 231 | | |
188 | 232 | | |
189 | 233 | | |
| |||
0 commit comments