mirror of
https://github.com/coredns/coredns.git
synced 2026-10-16 23:35:43 -04:00
plugin/trace: recognize Zipkin URL schemes by prefix (#8625)
* plugin/trace: recognize Zipkin URL schemes by prefix Signed-off-by: xinjun.jiang <xinjun.jiang@daocloud.io> * plugin/trace: compare HTTP schemes case insensitively Signed-off-by: xinjun.jiang <xinjun.jiang@daocloud.io> --------- Signed-off-by: xinjun.jiang <xinjun.jiang@daocloud.io>
This commit is contained in:
@@ -23,6 +23,14 @@ func TestTraceParse(t *testing.T) {
|
||||
// oks
|
||||
{`trace`, false, "http://localhost:9411/api/v2/spans", 1, `coredns`, false, 0, 0, 0},
|
||||
{`trace localhost:1234`, false, "http://localhost:1234/api/v2/spans", 1, `coredns`, false, 0, 0, 0},
|
||||
{`trace zipkin-http.monitoring:9411`, false, "http://zipkin-http.monitoring:9411/api/v2/spans", 1, `coredns`, false, 0, 0, 0},
|
||||
{`trace zipkin http-collector:9411`, false, "http://http-collector:9411/api/v2/spans", 1, `coredns`, false, 0, 0, 0},
|
||||
{`trace zipkin myhttpscollector:9411`, false, "http://myhttpscollector:9411/api/v2/spans", 1, `coredns`, false, 0, 0, 0},
|
||||
{`trace zipkin https://zipkin-http.monitoring:9411/custom/spans`, false, "https://zipkin-http.monitoring:9411/custom/spans", 1, `coredns`, false, 0, 0, 0},
|
||||
{`trace HTTP://collector:9411/api/v2/spans`, false, "HTTP://collector:9411/api/v2/spans", 1, `coredns`, false, 0, 0, 0},
|
||||
{`trace zipkin HTTPS://collector:9411/api/v2/spans`, false, "HTTPS://collector:9411/api/v2/spans", 1, `coredns`, false, 0, 0, 0},
|
||||
{`trace zipkin HtTpS://collector:9411/Custom/Spans?Tenant=Blue`, false, "HtTpS://collector:9411/Custom/Spans?Tenant=Blue", 1, `coredns`, false, 0, 0, 0},
|
||||
{`trace zipkin httpS://collector:9411/Custom/Spans?Tenant=Blue`, false, "httpS://collector:9411/Custom/Spans?Tenant=Blue", 1, `coredns`, false, 0, 0, 0},
|
||||
{`trace http://localhost:1234/somewhere/else`, false, "http://localhost:1234/somewhere/else", 1, `coredns`, false, 0, 0, 0},
|
||||
{`trace zipkin localhost:1234`, false, "http://localhost:1234/api/v2/spans", 1, `coredns`, false, 0, 0, 0},
|
||||
{`trace datadog localhost`, false, "localhost", 1, `coredns`, false, 0, 0, 0},
|
||||
|
||||
Reference in New Issue
Block a user