yyqdbngt opened a new pull request, #3421:
URL: https://github.com/apache/rocketmq-dashboard/pull/3421

   ### Summary
   
   `MetricSample` is the normalized native-metric carrier and its canonical 
constructor enforces that non-available samples never carry a value. The suite 
covered the value/availability pairing, but not the remaining invariants.
   
   ### Changes
   
   - Blank `metricKey` and `instanceId` are rejected with descriptive messages
   - `null` domain, availability and clock are rejected
   - `null` labels normalize to an empty map and caller maps are copied 
defensively
   - An available sample cannot carry an unavailable reason
   - An unavailable sample without a value constructs with an optional reason
   
   ### Testing
   
   `mvn test -Dtest=MetricSampleTest` passes: 8 tests, 0 failures (up from 2).


-- 
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