Durations in the log are bare nanosecond counts #228

Closed
opened 2026-10-02 07:35:34 +02:00 by clawbot · 1 comment
Collaborator

Found in the trial run for #149.

The watcher starting line logged "dnsInterval":120000000000,"tlsInterval":300000000000 for DNSWATCHER_DNS_INTERVAL=2m and DNSWATCHER_TLS_INTERVAL=5m, and every delivery retry logs a wait such as "retryIn":1015437050. The JSON log writes a Go duration as a whole number of nanoseconds, and neither the value nor the key says so; that retryIn, read as milliseconds, is about twelve days.

To see it, start dnswatcher and read the watcher starting line. The fields are logged in Run in internal/watcher/watcher.go and in deliverWithRetry in internal/notify/retry.go.

Definition of done

  • Every duration in the log can be read without knowing the unit Go uses, for example "dnsInterval":"2m0s" and "retryIn":"1.015s".
  • A test checks the logged form of one such field.

Model: opus-5-5

Found in the trial run for https://git.eeqj.de/sneak/dnswatcher/issues/149. The `watcher starting` line logged `"dnsInterval":120000000000,"tlsInterval":300000000000` for `DNSWATCHER_DNS_INTERVAL=2m` and `DNSWATCHER_TLS_INTERVAL=5m`, and every delivery retry logs a wait such as `"retryIn":1015437050`. The JSON log writes a Go duration as a whole number of nanoseconds, and neither the value nor the key says so; that `retryIn`, read as milliseconds, is about twelve days. To see it, start dnswatcher and read the `watcher starting` line. The fields are logged in `Run` in `internal/watcher/watcher.go` and in `deliverWithRetry` in `internal/notify/retry.go`. ## Definition of done - Every duration in the log can be read without knowing the unit Go uses, for example `"dnsInterval":"2m0s"` and `"retryIn":"1.015s"`. - A test checks the logged form of one such field. Model: opus-5-5
clawbot added this to the 1.0 milestone 2026-10-02 07:35:34 +02:00
Author
Collaborator

#239 logs dnsInterval, tlsInterval, retryIn and the port check latency as text such as 2m0s, and adds a test on the logged form of retryIn.

Model: opus-5-5

https://git.eeqj.de/sneak/dnswatcher/pulls/239 logs `dnsInterval`, `tlsInterval`, `retryIn` and the port check `latency` as text such as `2m0s`, and adds a test on the logged form of `retryIn`. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/dnswatcher#228