Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Misleading documentation about statsd client #13

Open
nicgirault opened this issue Jul 8, 2019 · 2 comments
Open

Misleading documentation about statsd client #13

nicgirault opened this issue Jul 8, 2019 · 2 comments

Comments

@nicgirault
Copy link

nicgirault commented Jul 8, 2019

Docs says the statsd lib is node-dogstatsd but I couldn't find the options I was looking for so I had a look in the code https://github.com/DataDog/node-connect-datadog/blob/master/lib/index.js#L4 and realized the doc was misleading: the statsd client is hot-shots.

Moreover typing definitions seems wrong:

image

I get the typescript error: Type 'StatsD' is missing the following properties from type 'StatsDClient': incrementBy, decrementBy

because the expected type comes from node-dogstatsd: import { StatsDClient } from 'node-dogstatsd'

@rochdev
Copy link
Member

rochdev commented Jul 8, 2019

This is a recent change from node-dogstatsd to hotshots since the latter is a lot more active. It looks like the TypeScript definitions are community-maintained at DefinitelyTyped. I can submit a PR but in the meantime I would recommend using declaration merging to resolve the error.

@vanessayuenn
Copy link

This has been fixed via DefinitelyTyped/DefinitelyTyped#45510!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants