newrelic / infra-integrations-sdk

New Relic Infrastructure Integrations SDK
Apache License 2.0
46 stars 24 forks source link

Calculate rates for PRATE source type #228

Closed heaje closed 4 years ago

heaje commented 4 years ago

While using the nri-haproxy integration I've noticed the rates for connections per second, bytes per second, and other things that were defined as type PRATE were all wrong. I could manually collect statistics for HAProxy and calculate rates and nothing lined up with what the integration calculated. On further inspection, I found in the SDK that if a metric was defined as a source type of PRATE, it was not actually having a rate calculated for it. This PR fixes this problem. The one line code fix ensures that rates are calculated for a source type of RATE or PRATE.

CLAassistant commented 4 years ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Corey Shaw seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.