cd /news/ai-agents/give-claude-code-the-production-logs… · home › topics › ai-agents › article
[ARTICLE · art-174643] src=signoz.io ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

Give Claude Code the production logs it needs to investigate a bug

SigNoz published a walkthrough showing how to connect Claude Code to SigNoz Cloud over the Model Context Protocol (MCP) so the agent can query production logs, traces and metrics and compare them against deployed application code. In a test on a public Python FastAPI demo that returns HTTP 500 at `/exception`, Claude retrieved five error logs containing `ValueError`, linked one to a failed `GET /exception` trace, and matched the logged stack trace to `raise ValueError("sadness")`; it also reported 10 successful requests in the earlier window and 10 successes plus five failures in the later one. SigNoz advises using a read-only service account, supplying the service name, source commit and UTC time windows, and checking the agent's explanation against the evidence before acting.

recommendation

Give the agent read-only log and trace access plus the deployed commit and explicit UTC incident windows, then require it to cite supporting records and list missing evidence before you act.

more in playbook: Running AI in production
by read2 min views3 publishedNov 23, 2026

Claude Code can investigate a failure by querying logs, traces and historical metrics stored in SigNoz Cloud, then comparing that evidence with the application code. The connection uses Model Context Protocol (MCP), which gives Claude tools to query the data.

To try this, follow the Claude Code configuration steps using a read-only service account. Give Claude access to the relevant application code as well, so it can relate what it finds in the logs to the code that produced them. For cloud sessions, see the Claude Code cloud setup guide.

Once connected, adapt this prompt to your service and incident window. Make the deployed source version available in the workspace:

Using SigNoz, investigate errors for [service] between [start and end, UTC].
Retrieve relevant logs and related traces where available, then compare
the evidence with the code deployed at [commit or release]. Cite the
records supporting your explanation and identify any missing evidence.
Do not make changes.

Investigate an example failure #

For example, we ran a public Python app that deliberately returns a server error (HTTP 500) when called at /exception. We sent its logs, traces and metrics to SigNoz Cloud.

We asked Claude to investigate the error using the logs and a failed trace, and to compare request counts before and during the failure. To help it find the right data and code, we gave it the service name, source commit and two time windows in UTC. The first window covered successful requests; the second included requests to /exception.

Check what the agent found #

Claude retrieved five error logs containing ValueError and linked one to a failed GET /exception trace. The logged stack trace pointed to raise ValueError("sadness") in the sample, which matched the known failure.

The logs and trace explain an individual failure. To see how it fit into the wider request activity, Claude also compared the request counts for the two periods. Its report showed 10 successful requests in the earlier period, and 10 successes and five failures in the later period.

For your own incident, make sure Claude can access the source version that was deployed and the logs, traces and metrics for the relevant period. Check its explanation against the evidence, and ask it to identify any missing information before you act on it.

See natural-language log exploration for more query examples.

── more in #ai-agents 4 stories · sorted by recency
── more on @claude code 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/give-claude-code-the…] indexed:0 read:2min 2026-11-23 · —