refactor: build config from user config instead of mutating pre-filled object#2448
refactor: build config from user config instead of mutating pre-filled object#2448aryamohanan merged 10 commits intofix-config-precedencefrom
Conversation
a22667e to
77ab6ce
Compare
450dc1f to
d3caf5b
Compare
| envVar: 'INSTANA_TRACING_DISABLE_EOL_EVENTS', | ||
| configValue: config.tracing.disableEOLEvents, | ||
| defaultValue: defaults.tracing.disableEOLEvents, | ||
| configValue: userConfig.tracing.disableEOLEvents, |
There was a problem hiding this comment.
Can we name this incodeValue or similar?
There was a problem hiding this comment.
May be we can consider that in a separate PR?
8234da0 to
d3caf5b
Compare
44bad80 to
973acf7
Compare
Co-authored-by: kirrg001 <katharina.irrgang@ibm.com>
| return envVarValue | ||
| .split(/[;,]/) | ||
| .map(header => header.trim()) | ||
| .map(header => header.trim().toLowerCase()) |
There was a problem hiding this comment.
This looks like an unrelated change. Can you explain?
There was a problem hiding this comment.
The lowercase conversion was previously handled within the respective function, but it is more appropriate to move it to this helper. I have verified that this change does not impact any existing functionality, and all case-sensitive tests for environment variables and headers are passing.
kirrg001
left a comment
There was a problem hiding this comment.
Pre-approving! Great work
|



Normalization functions previously operated on a pre-filled config, making it unclear whether values were resolved or already present. This change separates input and output, making value resolution explicit and easier to reason about.