Skip to content

[master forward-port] libnet: don't put external DNS answers in OTel spans#49123

Merged
thaJeztah merged 1 commit intomoby:masterfrom
akerouanton:remove-dns-answers-from-otel-spans
Dec 18, 2024
Merged

[master forward-port] libnet: don't put external DNS answers in OTel spans#49123
thaJeztah merged 1 commit intomoby:masterfrom
akerouanton:remove-dns-answers-from-otel-spans

Conversation

@akerouanton
Copy link
Copy Markdown
Member

@akerouanton akerouanton commented Dec 18, 2024

- What I did

When containers make DNS resolution, and the domain name they're trying to resolve doesn't match any running container, the DNS query is forwarded to upstream servers. In that case, when we receive a response, we put it in an OTel spans.

This was useful to debug DNS resolution on GHA, but it leads to excessive memory usage when DNS resolution happen in a tight loop. So, keep the OTel event signaling that a response was received, but drop the answer from the OTel span.

(cherry picked from commit 173a9f2)

- Description for the changelog

- Fix an issue that caused excessive memory usage when DNS resolution was made in a tight loop

When containers make DNS resolution, and the domain name they're trying
to resolve doesn't match any running container, the DNS query is
forwarded to upstream servers. In that case, when we receive a response,
we put it in an OTel spans.

This was useful to debug DNS resolution on GHA, but it leads to
excessive memory usage when DNS resolution happen in a tight loop. So,
keep the OTel event signaling that a response was received, but drop the
answer from the OTel span.

Signed-off-by: Albin Kerouanton <[email protected]>
(cherry picked from commit 173a9f2)
Signed-off-by: Albin Kerouanton <[email protected]>
@akerouanton akerouanton added this to the 28.0.0 milestone Dec 18, 2024
@akerouanton akerouanton self-assigned this Dec 18, 2024
@thaJeztah thaJeztah changed the title [28.0 backport] libnet: don't put external DNS answers in OTel spans [master forward-port] libnet: don't put external DNS answers in OTel spans Dec 18, 2024
Copy link
Copy Markdown
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

I guess in hindsight we should've done master first.

I'll update this PR description after merging to add a link to the related tracking ticket

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants