Skip to content

Commit 2b266fb

Browse files
Copilotjoaopgrassi
andcommitted
Fix dns.question.name note to refer to Punycode instead of custom encoding
Co-authored-by: joaopgrassi <[email protected]>
1 parent 337bb42 commit 2b266fb

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

docs/dns/dns-metrics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ 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
4141
| [`dns.question.name`](/docs/registry/attributes/dns.md) | string | The name being queried. [1] | `www.example.com`; `dot.net` | `Required` | ![Development](https://img.shields.io/badge/-development-blue) |
4242
| [`error.type`](/docs/registry/attributes/error.md) | 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](https://img.shields.io/badge/-stable-lightgreen) |
4343

44-
**[1] `dns.question.name`:** 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.
44+
**[1] `dns.question.name`:** The name represents the queried domain name as it appears in the DNS query. If the name contains non-ASCII characters, it will be encoded using Punycode as per [RFC 3492](https://datatracker.ietf.org/doc/html/rfc3492), but no additional normalization is required. The name should be recorded as provided to the DNS resolution function.
4545

4646
**[2] `error.type`:** Instrumentations SHOULD use error code such as one of errors reported by `getaddrinfo`([Linux or other POSIX systems](https://man7.org/linux/man-pages/man3/getaddrinfo.3.html) / [Windows](https://learn.microsoft.com/windows/win32/api/ws2tcpip/nf-ws2tcpip-getaddrinfo)) or one reported by the runtime or client library. If error code is not available, the full name of exception type SHOULD be used.
4747

docs/registry/attributes/dns.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ This document defines the shared attributes used to report a DNS query.
1212
| <a id="dns-answers" href="#dns-answers">`dns.answers`</a> | string[] | The list of IPv4 or IPv6 addresses resolved during DNS lookup. | `["10.0.0.1", "2001:0db8:85a3:0000:0000:8a2e:0370:7334"]` | ![Development](https://img.shields.io/badge/-development-blue) |
1313
| <a id="dns-question-name" href="#dns-question-name">`dns.question.name`</a> | string | The name being queried. [1] | `www.example.com`; `opentelemetry.io` | ![Development](https://img.shields.io/badge/-development-blue) |
1414

15-
**[1] `dns.question.name`:** 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.
15+
**[1] `dns.question.name`:** The name represents the queried domain name as it appears in the DNS query. If the name contains non-ASCII characters, it will be encoded using Punycode as per [RFC 3492](https://datatracker.ietf.org/doc/html/rfc3492), but no additional normalization is required. The name should be recorded as provided to the DNS resolution function.

model/dns/registry.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,10 @@ groups:
1111
brief: The name being queried.
1212
examples: ["www.example.com", "opentelemetry.io"]
1313
note: >
14-
If the name field contains non-printable
15-
characters (below 32 or above 126), those characters should be represented
16-
as escaped base 10 integers (\DDD). Back slashes and quotes should be escaped.
17-
Tabs, carriage returns, and line feeds should be converted to \t, \r, and
18-
\n respectively.
14+
The name represents the queried domain name as it appears in the DNS query.
15+
If the name contains non-ASCII characters, it will be encoded using Punycode as per
16+
[RFC 3492](https://datatracker.ietf.org/doc/html/rfc3492), but no additional normalization
17+
is required. The name should be recorded as provided to the DNS resolution function.
1918
- id: dns.answers
2019
type: string[]
2120
stability: development

0 commit comments

Comments
 (0)