brettlangdon / node-dogapi

Datadog API Node.JS Client
https://brettlangdon.github.io/node-dogapi/
105 stars 45 forks source link

Use "count" as metric type instead of "counter" in the docs #37

Closed jetmind closed 8 years ago

jetmind commented 8 years ago

This is the right value as seen here https://github.com/brettlangdon/node-dogapi/issues/35#issuecomment-198357491

brettlangdon commented 8 years ago

Hmm, it is weird that the docs for the Python client say "counter" https://github.com/DataDog/datadogpy/blob/55bf806eef399e0f60204ede61a962e591c8ee5a/datadog/api/metrics.py#L83

jetmind commented 8 years ago

Yeah, but when I set it to counter I get gauge in the datadog dashboard, but count works as expected.

brettlangdon commented 8 years ago

hmm... I just tested and confirmed, you are correct, however, for this change we need to update s/counter/count/ in a few other places as well.

In order to update the docs, we actually have to update the doc strings in the code. The index.html is generated on release, so you won't need to update index.html.

We will want to update lib/api/metric.js to reference count in the doc strings/examples: https://github.com/brettlangdon/node-dogapi/blob/79226c9037dd8d58bc53ed689110c6aa19fa28d7/lib/api/metric.js

And then update test/api/metric.js to use count instead of counter: https://github.com/brettlangdon/node-dogapi/blob/79226c9037dd8d58bc53ed689110c6aa19fa28d7/test/api/metric.js

brettlangdon commented 8 years ago

Thanks for catching this bug.

jetmind commented 8 years ago

Created a new pull request https://github.com/brettlangdon/node-dogapi/pull/38

Closing this.