Skip to content

Commit

Permalink
fix(datadog) correct valid sample_rate range
Browse files Browse the repository at this point in the history
The sample_rate parameter for datadog represents sample rate
according to the statsd standard. As such, its valid range
is between 0 and 1.

See:
* https://docs.datadoghq.com/developers/faq/dog-statsd-sample-rate-parameter-explained/
* https://thenewstack.io/collecting-metrics-using-statsd-a-standard-for-real-time-monitoring/
  • Loading branch information
hishamhm committed Jan 5, 2019
1 parent d941774 commit 6683637
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kong/plugins/datadog/schema.lua
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ return {
{ name = { type = "string", required = true, one_of = STAT_NAMES }, },
{ stat_type = { type = "string", required = true, one_of = STAT_TYPES }, },
{ tags = { type = "array", elements = { type = "string", match = "^.*[^:]$" }, }, },
{ sample_rate = { type = "number", between = { 1, math.huge }, }, },
{ sample_rate = { type = "number", between = { 0, 1 }, }, },
{ consumer_identifier = { type = "string", one_of = CONSUMER_IDENTIFIERS }, },
},
entity_checks = {
Expand Down

0 comments on commit 6683637

Please sign in to comment.