agent-substrate / agent-substrate/substrate

atenet-dns does not have any telemetry

未关闭
#572 3 条评论 0 个 reaction 已指派 1 人 已被 @bowei 认领 在 GitHub 查看
area/network area/observability kind/feature prio/P0
主要语言
Go
星标
1.8k
派生
316
平均合并
2 天 43 分钟
30 天内合并 PR
287

描述

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.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。