argoproj/argo-cd
Debugging
Useful entry points when something is wrong in a local or installed Argo CD.
Logs
All components use logrus (configured by util/log/) and respect two flags:
--loglevel debug|info|warn|error--logformat json|text
Both are exposed at the binary level (see cmd/argocd-server/commands/argocd_server.go and similar) and at the CLI level (cmd/argocd/commands/root.go registers --logformat/--loglevel as persistent flags).
In a Procfile dev environment (goreman start), the components emit colorized text logs (FORCE_LOG_COLORS=1).
Profiling
util/profile/ exposes pprof endpoints on the metrics port of each component. With the dev Procfile defaults (metrics port is component-specific), you can:
go tool pprof http://localhost:<metrics-port>/debug/pprof/profile?seconds=30For runtime stats, util/stats/ and the argoproj/pkg/v2/stats library record GC and mem stats. The application controller logs aggregated stats periodically.
Tracing
OpenTelemetry tracing is wired in via util/trace/. Enable it by setting --otlp-address (and optionally --otlp-headers) on each binary. The Procfile passes ${ARGOCD_OTLP_ADDRESS} so you can point a local collector at all components in one shot.
Common error patterns
| Symptom | First thing to check | Where the code lives |
|---|---|---|
App stuck OutOfSync after push |
Repo server cache; verify argocd-repo-server got the webhook |
util/webhook/webhook.go, reposerver/repository/repository.go |
| Permission denied in CLI/UI | Casbin RBAC policy in argocd-rbac-cm |
util/rbac/rbac.go, server/rbacpolicy/ |
manifests-too-large install error |
Use kubectl apply --server-side --force-conflicts |
manifests/install.yaml |
| Sync fails on hooks | Inspect hook resources and their phases | controller/hook.go, controller/sync.go |
| ApplicationSet not generating | Generator validation errors in controller logs | applicationset/controllers/applicationset_controller.go, applicationset/generators/ |
| Notifications silent | Trigger templates / subscriptions config | notification_controller/, notifications_catalog/, util/notification/ |
| OIDC redirect loop | argocd-cm oidc.config, Dex pod logs |
util/oidc/oidc.go, cmd/argocd-dex/commands/ |
| Helm/Kustomize render fails | Repo server logs, run argocd app manifests <app> |
util/helm/, util/kustomize/ |
Reproducing controller behavior
controller/appcontroller.go is the primary loop and very dense. To reproduce its behavior locally:
- Bring up the dev stack (
goreman start). - Apply a fake
ApplicationCR pointing at a local git repo (provided bytest/fixture/testrepos/start-git.sh). - Watch logs in
controller's console; bump--loglevel debugif needed. - Inspect the cached state in Redis (
redis-cli -p 6379 KEYS "*").
Inspecting the gRPC API directly
argocd itself talks gRPC to argocd-server. For raw debugging, use grpcurl:
grpcurl -plaintext localhost:8080 list
grpcurl -plaintext -H "Authorization: Bearer $TOKEN" \
localhost:8080 application.ApplicationService/ListThe proto definitions are under pkg/apiclient/, server/application/application.proto, and server/repository/repository.proto.
When all else fails
- The
bug_triage.mddocument underdocs/lists how the maintainers triage incoming bugs and what good repro reports look like. SECURITY.mdandSECURITY_CONTACTSdescribe responsible disclosure for security issues.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.