Signed-off-by: Amit Saha <amitsaha.in@gmail.com>
This commit is contained in:
Amit Saha 2019-09-13 13:07:12 +10:00
parent 028531e953
commit d64c674394

View file

@ -159,13 +159,33 @@ func TestHandlePacket(t *testing.T) {
},
}, {
name: "histogram with sampling",
in: "foo:0.01|h|@0.1|#tag1:bar,#tag2:baz",
in: "foo:0.01|h|@0.2|#tag1:bar,#tag2:baz",
out: Events{
&TimerEvent{
metricName: "foo",
value: 0.01,
labels: map[string]string{"tag1": "bar", "tag2": "baz"},
},
&TimerEvent{
metricName: "foo",
value: 0.01,
labels: map[string]string{"tag1": "bar", "tag2": "baz"},
},
&TimerEvent{
metricName: "foo",
value: 0.01,
labels: map[string]string{"tag1": "bar", "tag2": "baz"},
},
&TimerEvent{
metricName: "foo",
value: 0.01,
labels: map[string]string{"tag1": "bar", "tag2": "baz"},
},
&TimerEvent{
metricName: "foo",
value: 0.01,
labels: map[string]string{"tag1": "bar", "tag2": "baz"},
},
},
}, {
name: "datadog tag extension with multiple colons",