Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some additional logging to the canary on queries #1137

Merged
merged 3 commits into from
Oct 9, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion pkg/canary/comparator/comparator.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,18 @@ func (c *Comparator) confirmMissing(missing []*time.Time) {
end = end.Add(10 * time.Second)
recvd, err := c.rdr.Query(start, end)
if err != nil {
_, _ = fmt.Fprintf(c.w, "error querying loki: %s", err)
_, _ = fmt.Fprintf(c.w, "error querying loki: %s\n", err)
rfratto marked this conversation as resolved.
Show resolved Hide resolved
return
}
// This is to help debug some missing log entries when queried,
// let's print exactly what we are missing and what Loki sent back
for _, r := range missing {
_, _ = fmt.Fprintf(c.w, "Websocket missing entry: %v\n", r.UnixNano())
}
for _, r := range recvd {
_, _ = fmt.Fprintf(c.w, "Confirmation query result: %v\n", r.UnixNano())
}

k := 0
for i, m := range missing {
found := false
Expand Down