Skip to content

Observability

NAuth uses readable text logs by default. Enable JSON when your log pipeline expects structured records.

Helm:

Terminal window
helm upgrade --install nauth oci://ghcr.io/wirelesscar/nauth \
--namespace nauth \
--create-namespace \
--set logging.format=json \
--set logging.level=info

Binary:

Terminal window
manager --log-format=json --log-level=info

Formats: text, json. Levels: debug, info, warn, error.

Enable the controller-runtime /metrics endpoint:

Terminal window
helm upgrade --install nauth oci://ghcr.io/wirelesscar/nauth \
--namespace nauth \
--create-namespace \
--set monitoring.enabled=true

Core reconcile metric:

controller_runtime_reconcile_total{controller="<controller>",result="<result>"}

Controller labels:

Resource Controller label Availability
Account account Since v0.1.0
AccountExport accountexport Unreleased
AccountImport accountimport Unreleased
User user Since v0.1.0
NatsCluster natscluster Since v0.6.1

Grafana queries:

sum by (controller, result) (rate(controller_runtime_reconcile_total{service="nauth-metrics-service"}[5m]))
increase(controller_runtime_reconcile_total{service="nauth-metrics-service"}[15m])
rate(controller_runtime_reconcile_errors_total{service="nauth-metrics-service"}[5m])

OpenTelemetry Collector scrape example:

receivers:
prometheus:
config:
scrape_configs:
- job_name: nauth
metrics_path: /metrics
static_configs:
- targets:
- nauth-metrics-service.nauth.svc:8080
exporters:
otlp:
endpoint: grafana-agent.grafana.svc:4317
tls:
insecure: true
service:
pipelines:
metrics:
receivers: [prometheus]
exporters: [otlp]