COREDNS-TRACE(7)
π COREDNS-TRACE(7)
ok so bestie, you're looking at the trace plugin page from the CoreDNS Plugins manual, section 7 β like, the actual real one. grab a strawberry π and let's get into it.
β¨ NAME β¨
trace β it turns on OpenTracing-based tracing of DNS requests as they travel through the plugin chain. literally watching your queries do their little journey. main character energy for packets π¦
πΈ DESCRIPTION πΈ
with trace you enable OpenTracing of how a request flows through CoreDNS. that's the whole vibe.
heads up bestie: enable the debug plugin if you want to actually get logs from the trace plugin. no debug, no logs, that's just how it is π
π SYNTAX π
the simplest form is literally just this:
trace [ENDPOINT-TYPE] [ENDPOINT]
ENDPOINT-TYPEβ the type of tracing destination. currently onlyzipkinanddatadogare supported (yes, just those two, no cap). defaults tozipkin.ENDPOINTβ the tracing destination, and it defaults tolocalhost:9411. for Zipkin, ifENDPOINTdoes not begin withhttp://orhttps://(case-insensitive, so don't try to be cute), then it will be transformed tohttp://ENDPOINT/api/v2/spans.
with this form, all queries will be traced. every single one. obsessed. β¨
additional features can be enabled with this syntax:
trace [ENDPOINT-TYPE] [ENDPOINT] {
every AMOUNT
service NAME
client_server
datadog_analytics_rate RATE
zipkin_max_backlog_size SIZE
zipkin_max_batch_size SIZE
zipkin_max_batch_interval DURATION
}
every AMOUNTβ will only trace one query of eachAMOUNTqueries. for example, to trace 1 in every 100 queries, useAMOUNTof 100. the default is1. (so by default it's tracing everything, go off π)service NAMEβ lets you specify the service name reported to the tracing server. default iscoredns.client_serverβ will enable theClientServerSameSpanOpenTracing feature.datadog_analytics_rate RATEβ will enable trace analytics (<https://docs.datadoghq.com/tracing/app_analytics>) on the traces sent, from 0 to 1, 1 being every trace sent will be analyzed. this is a datadog only feature (ENDPOINT-TYPEneeds to bedatadog), so don't come crying to me if you set it with zipkin πzipkin_max_backlog_sizeβ configures the maximum backlog size for Zipkin HTTP reporter. when batch size reaches this threshold, spans from the beginning of the batch will be disposed. default is1000backlog size.zipkin_max_batch_sizeβ configures the maximum batch size for Zipkin HTTP reporter, after which a collect will be triggered. the default batch size is100traces.zipkin_max_batch_intervalβ configures the maximum duration we will buffer traces before emitting them to the collector using Zipkin HTTP reporter. the default batch interval is1second.
π§ ZIPKIN π§
you can run Zipkin on a Docker host like this:
docker run -d -p 9411:9411 openzipkin/zipkin
β οΈ note the zipkin provider does not support the v1 API since coredns 1.7.1. that's a real caveat, not a vibe, so plan accordingly π
π₯ 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/v2/spans
using DataDog:
trace datadog localhost:8126
trace one query every 10000 queries, rename the service, and enable same span:
trace tracinghost:9411 {
every 10000
service dnsproxy
client_server
}
ate. no crumbs. π
π METADATA π
the trace plugin will publish the following metadata, if the metadata plugin is also enabled:
trace/traceid: identifier of (zipkin/datadog) trace of processed request
β SEE ALSO β
see the debug plugin for more information about debug logging. (yes, it came up twice, it's that important π«Ά)
that's the whole page bestie, you're officially a tracing girly now π
CoreDNS β October 2026 π go trace something iconic β¨
π¦ where this page comes from
- opensuse-leap 16.0: coredns-extras 1.15.0-bp160.1.1 Β· Apache-2.0 AND MPL-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms