Skip to content

added support for Distribution metrics #4

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

Merged
merged 1 commit into from
Sep 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ meter(stat, value, tags)

-- Sets
meter(stat, value, tags)

-- Distribution
distribution(stat, value, tags)
```
Sample rates are your responsiblity to calculate. If you tell it the sample rate is 0.10 (10 percent), then the **value** you send needs to be the sampled value. e.g. If you've had 100 hits and you send a 0.20 sample rate, the value you send would be 20

Expand Down
5 changes: 4 additions & 1 deletion lib/ngx_lua_datadog.lua
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,8 @@ function dogstatsd_mt:set(stat, value, tags)
return self:send_dogstatsd(stat, value, "s", nil, tags)
end

return dogstatsd_mt
function dogstatsd_mt:distribution(stat, value, tags)
return self:send_dogstatsd(stat, value, "d", nil, tags)
end

return dogstatsd_mt