/devops-skills:log-managementfrom devops-skills
Guides on structured logging at scale: emitting JSON fields, choosing log levels, sampling high-volume paths, setting retention, correlating with trace IDs, and avoiding secrets in logs.
Ships in devops-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A log line's only job is to be found and understood by someone who wasn't there when it was written. A free-text sentence optimized for a human reading it in a terminal fails that job the moment volume grows past what one person can scroll through — it can't be queried, filtered, or aggregated reliably. Structured logging exists to make every line a queryable record instead of a string.
At scale, logs stop being something a person tails in a terminal and become a dataset something else queries on that person's behalf — every choice below follows from designing for that querying system, not for the human glancing at a live stream.
If a log line can't be filtered by field without a regex, it isn't structured yet.
Every log line should be a JSON object (or equivalent structured format) with consistent field names across the codebase — level, timestamp, service, message, plus whatever request-specific fields apply. "user 4821 failed login from 10.0.0.4" cannot be filtered by user ID without a regex; {"event":"login_failed","user_id":4821,"source_ip":"10.0.0.4"} can be filtered, aggregated, and joined with other events in one query.
user_id in one service and userId in another silently breaks every cross-service query.event: "login_failed" is filterable; a sentence about a failed login is not.message field too, but treat it as a summary, not the source of truth the query relies on.Done when: every log line is machine-parseable and field names are consistent across every service that emits them.
Levels are an action filter, not a mood indicator:
ERROR — something failed and a human may need to act.WARN — something is degraded but self-recovering.INFO — a notable state change worth keeping around.DEBUG — detail only useful while actively investigating.Getting this consistent matters more than getting it clever, because levels are what alerting and dashboards filter on downstream. The failure mode in both directions is common:
ERROR — a retried request, a routine 404 — trains everyone to ignore that level entirely.WARN means they never surface in an error-rate alert built to watch ERROR.Done when: ERROR in production logs reliably means something a human should look at, with no routine noise in that level.
Logging every request at full detail is affordable at low traffic and unaffordable at scale — the fix is not to stop logging the hot path, it's to sample it deliberately. Log 100% of errors and slow requests (the ones you'll actually need), and a statistically useful fraction of routine successful requests (1% is often enough to catch a trend).
Done when: error and outlier logs are never sampled away, and routine-path sampling has an explicit, stated rate.
A log line without a correlation ID is an island — you can read it, but you can't connect it to the seven other services that touched the same request. Propagate a request or trace ID through every service call and include it as a field on every log line that request produces.
That single field collapses what used to be a cross-team log-grepping exercise into one query. See distributed-tracing for how it gets propagated across service boundaries in the first place.
Done when: you can pull every log line for one request across every service it touched using a single ID.
Keeping every log line at full fidelity forever is rarely worth the cost, and the right retention period differs by use: debug-level detail is often worthless after a day, INFO-level business events might matter for months for audit purposes, and error logs sit somewhere in between. Tiering storage keeps cost proportional to how often data at that age actually gets queried.
Done when: retention period and storage tier are set per log level or log type, not uniformly by default.
Logs get copied, exported, and retained longer than almost anything else in the system, which makes them one of the highest-leverage places a secret or a customer's personal data can leak. Relying on someone remembering not to log a password or an API key does not scale.
See secrets-management for handling the credentials themselves upstream of this problem.
Done when: a grep for known secret patterns across recent logs returns nothing, and the logging layer — not code review — is what prevents it.
State the logging format in use, current retention per tier, whether correlation IDs are propagated end to end, and the sampling rate on high-volume paths.
Name the honest gap — usually a service still emitting unstructured text, a secret pattern that slipped through, or a retention tier that's still "keep everything" by default — rather than describing logging as fully standardized.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub arjunprabhulal/devops-skills --plugin devops-skills88 skills in this plugin
/alertingCovers designing alerts that page a human only when a human needs to act — symptom-based alerting over cause-based, multi-window burn-rate alerts on error budgets, severity tiers that route between page/ticket/dashboard, requiring every page to link a runbook, and tuning out alert fatigue. Use this whenever the user is writing a new alert rule, asking why on-call is paged too often or missing real incidents, choosing an alert threshold, or designing severity routing. For the SLO the burn-rate math comes from use `slo-definition`, and for what a runbook should contain use `runbooks`./api-gatewayCovers the managed front-door pattern for APIs — request routing, centralized auth, rate limiting and quotas, request/response shaping, and recognizing when a gateway helps versus becomes a bottleneck or single point of failure. Use this whenever the user is designing an API entry point, adding rate limits or quotas, centralizing auth for several backend services, transforming a request between an external and internal contract, or debugging a gateway timeout. For east-west traffic between internal services use `service-connectivity`, and for token issuance details use `iam-access-management`./argocd-operationsCovers running Argo CD day to day — structuring app-of-apps, choosing sync policies and waves, reading health versus sync status correctly, and unsticking a degraded or hung Application. Use this whenever the user mentions Argo CD, an Application stuck "Progressing" or "OutOfSync," app-of-apps or ApplicationSets, sync waves and hooks, or asks why a deploy shows synced but the workload is unhealthy. For the underlying model this tool implements use `gitops`; for automated canary analysis on top of it use `progressive-delivery`; for the workloads it manages use `kubernetes-operations`.