Skip to content

Commit

Permalink
fix(dns): spam ttl logs for prepared queries (#21381)
Browse files Browse the repository at this point in the history
  • Loading branch information
DanStough authored Jul 8, 2024
1 parent 40ca4ad commit a251f8a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .changelog/21381.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
```release-note:bug
dns: Fixes a spam log message "Failed to parse TTL for prepared query..."
that was always being logged on each prepared query evaluation.
```
9 changes: 5 additions & 4 deletions agent/discovery/query_fetcher_v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -363,11 +363,12 @@ func (f *V1DataFetcher) FetchPreparedQuery(ctx Context, req *QueryPayload) ([]*R
if err == nil {
ttlSec := uint32(ttl / time.Second)
ttlOverride = &ttlSec
} else {
f.logger.Warn("Failed to parse TTL for prepared query , ignoring",
"ttl", out.DNS.TTL,
"prepared_query", req.Name,
)
}
f.logger.Warn("Failed to parse TTL for prepared query , ignoring",
"ttl", out.DNS.TTL,
"prepared_query", req.Name,
)
}

// If we have no nodes, return not found!
Expand Down

0 comments on commit a251f8a

Please sign in to comment.