Skip to content

Commit f38976c

Browse files
author
Brian Lomeland
committed
added support for Distribution metrics
1 parent b599111 commit f38976c

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ meter(stat, value, tags)
6060
6161
-- Sets
6262
meter(stat, value, tags)
63+
64+
-- Distribution
65+
distribution(stat, value, tags)
6366
```
6467
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
6568

lib/ngx_lua_datadog.lua

+4-1
Original file line numberDiff line numberDiff line change
@@ -83,5 +83,8 @@ function dogstatsd_mt:set(stat, value, tags)
8383
return self:send_dogstatsd(stat, value, "s", nil, tags)
8484
end
8585

86-
return dogstatsd_mt
86+
function dogstatsd_mt:distribution(stat, value, tags)
87+
return self:send_dogstatsd(stat, value, "d", nil, tags)
88+
end
8789

90+
return dogstatsd_mt

0 commit comments

Comments
 (0)