Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle data from DataDog of type:rate #498

Merged
merged 5 commits into from
Feb 19, 2020

Conversation

conorbev
Copy link
Contributor

When DataDog sends statsd counter data the JSON contains a value that when displayed by DataDog is multiplied by the "interval" property supplied in the JSON.

This change allows Wavefront to store and render that same value. The modified value also matches what the telegraf statsd input plugin sends for the same DogStatsD data so this seems to be a quirk of how DataDog sends and parses the data.

@conorbev conorbev requested a review from basilisk487 February 18, 2020 21:00
JsonNode type = metric.get("type");
if (type != null) {
if (type.textValue().equals("rate")) {
interval = metric.get("interval") == null ? 1 : metric.get("interval").intValue();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably want to handle bad data scenarios where "interval" field is not numeric

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, done

Copy link
Contributor

@basilisk487 basilisk487 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comment, lgtm otherwise

@basilisk487 basilisk487 merged commit 517cc1e into wavefrontHQ:master Feb 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants