Skip to content
This repository was archived by the owner on Feb 12, 2022. It is now read-only.

CloudWatch Metrics Collector fails to publish metrics with small values #44

@ryanewel

Description

@ryanewel

CloudWatch metrics can't accept metrics with magnitude < ~4.257959840008151e-109. Publishing metrics of this magnitude will cause the following error message:

ERROR [/cloudwatch_metrics_collector]: [AWSClient] HTTP response code: 400
Exception name: InvalidParameterValue
Error message: The value 0 for parameter MetricData.member.8.Value is invalid.

Steps to reproduce:

  1. Launch the CloudWatch Metrics Collector with roslaunch cloudwatch_metrics_collector sample_application.launch
  2. Publish small metrics with:
    rostopic pub -r 0.5 /metrics ros_monitoring_msgs/MetricList '{metrics: [{metric_name: 'too_small', value: 2.1289799200040754E-109, time_stamp:{secs: <time>, nsecs: 0}}]}'

Proposed Solution:
Add an option to round small values to 0 before publishing to Cloudwatch

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions