songzhendong commented on PR #139:
URL: 
https://github.com/apache/skywalking-nodejs/pull/139#issuecomment-4824193929

   Thanks for the Round-3 review 
   The deprecated programmatic runtime metric config issue is fixed
   ### Fix
   - Normalize deprecated aliases in 
`normalizeDeprecatedRuntimeMetricOptions()` **before** merging user options 
into the singleton config, so values like `nvmMetricsReporterActive: false` 
override the default `runtimeMetricsReporterActive: true`.
   - Avoid writing `undefined` into canonical fields when `agent.start({})` is 
called with empty options.
   - Keep `applyDeprecatedRuntimeMetricConfig()` for deprecated fields set 
directly on the exported `config` before `agent.start()`.
   ### Test
   Added `tests/config/AgentConfig.test.ts`, including the path you suggested:
   ```ts
   agent.start({ nvmMetricsReporterActive: false });
   expect(config.runtimeMetricsReporterActive).toBe(false);
   Also covers canonical-over-deprecated priority and programmatic nvmJvm* 
aliases.
   
   Verification
   Local:
   
   npm run build
   npx jest tests/config/AgentConfig.test.ts --runInBand
   Fork CI (Build / License / Test) is green


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to