Skip to content

Latest commit

 

History

History
53 lines (35 loc) · 3.11 KB

dns-metrics.md

File metadata and controls

53 lines (35 loc) · 3.11 KB

Semantic Conventions for DNS queries

Status: Experimental

This document defines semantic conventions to apply when instrumenting DNS queries.

Metrics

Metric: dns.lookup.duration

This metric is optional.

This metric SHOULD be specified with ExplicitBucketBoundaries of [ 0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10 ].

Name Instrument Type Unit (UCUM) Description Stability
dns.lookup.duration Histogram s Measures the time taken to perform a DNS lookup. Experimental
Attribute Type Description Examples Requirement Level Stability
dns.question.name string The name being queried. [1] www.example.com; dot.net Required Experimental
error.type string Describes the error the DNS lookup failed with. [2] host_not_found; no_recovery; java.net.UnknownHostException Conditionally Required if and only if an error has occurred. Stable

[1]: If the name field contains non-printable characters (below 32 or above 126), those characters should be represented as escaped base 10 integers (\DDD). Back slashes and quotes should be escaped. Tabs, carriage returns, and line feeds should be converted to \t, \r, and \n respectively.

[2]: Instrumentations SHOULD use error code such as one of errors reported by getaddrinfo(Linux or other POSIX systems / Windows) or one reported by the runtime or client library. If error code is not available, the full name of exception type SHOULD be used.

error.type has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

Value Description Stability
_OTHER A fallback error value to be used when the instrumentation doesn't define a custom value. Stable