coredns/middleware/trace
Yong Tang 738067a3c7 Fix go fmt, go lint, and go vet issues (#494)
This fix fixes several `go fmt`, `go lint`, and `go vet` issues,
to make goreportcard happy:

https://goreportcard.com/report/github.com/miekg/coredns

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-01-29 20:06:26 +00:00
..
README.md Add tracing option (#487) 2017-01-23 15:40:47 -05:00
setup.go Fix go fmt, go lint, and go vet issues (#494) 2017-01-29 20:06:26 +00:00
setup_test.go Fix go fmt, go lint, and go vet issues (#494) 2017-01-29 20:06:26 +00:00
trace.go Fix go fmt, go lint, and go vet issues (#494) 2017-01-29 20:06:26 +00:00

trace

This module enables OpenTracing-based tracing of DNS requests as they go through the middleware chain.

Syntax

trace [ENDPOINT-TYPE] [ENDPOINT]

For each server you which to trace.

It optionally takes the ENDPOINT-TYPE and ENDPOINT. The ENDPOINT-TYPE defaults to zipkin and the ENDPOINT to localhost:9411. A single argument will be interpreted as a Zipkin ENDPOINT.

The only ENDPOINT-TYPE supported so far is zipkin. You can run Zipkin on a Docker host like this:

docker run -d -p 9411:9411 openzipkin/zipkin

For Zipkin, if ENDPOINT does not begin with http, then it will be transformed to http://ENDPOINT/api/v1/spans.

Examples

Use an alternative Zipkin address:

trace tracinghost:9253

or

trace zipkin tracinghost:9253

If for some reason you are using an API reverse proxy or something and need to remap the standard Zipkin URL you can do something like:

trace http://tracinghost:9411/zipkin/api/v1/spans