xbkaishui commented on issue #5417:
URL: https://github.com/apache/skywalking/issues/5417#issuecomment-684186240


   the bug is in the MetricsQuery*DAO , it read the value as long, but the 
actually value is double like 0.8842238771569793 for example, code as below
   
   ```
   
    // Label is null, because in readMetricsValues, no label parameter.
           IntValues intValues = metricsValues.getValues();
           for (String id : ids) {
               KVInt kvInt = new KVInt();
               kvInt.setId(id);
               kvInt.setValue(0);
               if (idMap.containsKey(id)) {
                   Map<String, Object> source = idMap.get(id);
                   kvInt.setValue(((Number) 
source.getOrDefault(valueColumnName, 0)).longValue());
               } else {
                   
kvInt.setValue(ValueColumnMetadata.INSTANCE.getDefaultValue(condition.getName()));
               }
               intValues.addKVInt(kvInt);
           }
   
   ```
   
   @wu-sheng , Can I submit a pr and fix this ? 


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

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


Reply via email to