aboutsummaryrefslogtreecommitdiff
path: root/plugin/trace/setup_test.go
diff options
context:
space:
mode:
authorGravatar Bob <nyodas@users.noreply.github.com> 2020-10-12 21:30:55 +0200
committerGravatar GitHub <noreply@github.com> 2020-10-12 19:30:55 +0000
commit0835f5bb5f2edec9337432e8ba7164e74f67c150 (patch)
tree640fddffa2a3447084ef0fafc12818585bb53407 /plugin/trace/setup_test.go
parent5f5cc3188fe03e9dde888dcfeceb86fbc98a8f5d (diff)
downloadcoredns-0835f5bb5f2edec9337432e8ba7164e74f67c150.tar.gz
coredns-0835f5bb5f2edec9337432e8ba7164e74f67c150.tar.zst
coredns-0835f5bb5f2edec9337432e8ba7164e74f67c150.zip
[plugin][trace] - Have a consistent spanName (#4171)
Automatically submitted.
Diffstat (limited to 'plugin/trace/setup_test.go')
-rw-r--r--plugin/trace/setup_test.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugin/trace/setup_test.go b/plugin/trace/setup_test.go
index 34b0adb29..1e3baaf4b 100644
--- a/plugin/trace/setup_test.go
+++ b/plugin/trace/setup_test.go
@@ -22,6 +22,7 @@ func TestTraceParse(t *testing.T) {
{`trace zipkin localhost:1234`, false, "http://localhost:1234/api/v1/spans", 1, `coredns`, false},
{`trace datadog localhost`, false, "localhost", 1, `coredns`, false},
{`trace datadog http://localhost:8127`, false, "http://localhost:8127", 1, `coredns`, false},
+ {"trace datadog localhost {\n datadog_analytics_rate 0.1\n}", false, "localhost", 1, `coredns`, false},
{"trace {\n every 100\n}", false, "http://localhost:9411/api/v1/spans", 100, `coredns`, false},
{"trace {\n every 100\n service foobar\nclient_server\n}", false, "http://localhost:9411/api/v1/spans", 100, `foobar`, true},
{"trace {\n every 2\n client_server true\n}", false, "http://localhost:9411/api/v1/spans", 2, `coredns`, true},
@@ -29,6 +30,7 @@ func TestTraceParse(t *testing.T) {
// fails
{`trace footype localhost:4321`, true, "", 1, "", false},
{"trace {\n every 2\n client_server junk\n}", true, "", 1, "", false},
+ {"trace datadog localhost {\n datadog_analytics_rate 2\n}", true, "", 1, "", false},
}
for i, test := range tests {
c := caddy.NewTestController("dns", test.input)