agent-substrate / agent-substrate/substrate

atenet-dns does not have any telemetry

Open
#572 3 comments 0 reactions 1 assignee Claimed by @bowei View on GitHub
area/network area/observability kind/feature prio/P0
Dominant language
Go
Stars
1.8k
Forks
316
Avg merge
2d 43m
Merged PRs (30d)
287

Description

Currently atenet-dns has no metrics, no tracing, and no exporter and the only evidence it is working is an unwatched log line.

**No metrics, no tracing, no exporter.** The binary never calls `internal/serverboot`; there is no`StartMetricsServer`, no meter provider, no tracer provider. `manifests/ate-install/atenet-dns.yaml`has no `OTEL_*` environment variables and no `prometheus.io/scrape` annotation — consistent, since there is nothing to export or scrape.

**Logs carry no trace ID.** `cmd/atenet/internal/dns.go:52-63` installs its own handler:

```go
slog.SetDefault(slog.New(slog.NewJSONHandler(os.Stdout, &slog.HandlerOptions{Level: level})))
```

This bypasses `contextlogging.NewHandler`, which is what stamps `ate.dev/trace-id` onto records (`internal/contextlogging/contextlogging.go:37-44`). Note the reason it was bypassed:`serverboot.InitLogger` hardcodes `nil` handler options and so offers no level control, while this command supports a `--log-level` flag. That shared root cause is worth fixing in `serverboot` rather than per-binary.

## Suggested minimum instrument set

The point is detecting a wedged or silently-skipping loop:

- reconcile attempts and failures (counter, split by outcome)
- **seconds since last successful reconcile** (gauge) — the single most useful signal here, because the failure mode is "quietly does nothing," not "crashes"
- a counter for the skip branches, labelled by reason (`router-service-missing`,`no-clusterip`, `kube-dns-configmap-missing`), so a stuck precondition is visible
- CoreDNS reload signal successes/failures (`dns.go:205-219`)

Bounded label sets throughout — the skip reasons are a small fixed enum.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.