Investigating a production error
- List recent open exceptions: “Show me all open incidents in production from the last 24 hours”
- Get full details on a specific incident: “Get the details for incident #847 including the stack trace”
- Pull traces to see what happened at the code level: “Get the error traces for incident #847”
- Document your findings: “Add a note to incident #847: investigated the database timeout — connection pool was exhausted during peak traffic”
- Resolve it: “Close incident #847”
Profiling a slow action
- Get a performance overview: “Which actions are slowest in the web namespace right now?”
- Pull traces for the worst offender: “Get traces for BlogPostsController#index from the last hour”
- Inspect the span tree to find the bottleneck: “Show me the full span tree for trace abc123”
- Drill into a specific span: “Get the details for span def456 in trace abc123”
Triaging a batch of incidents
- “Find all open incidents in the background namespace from the last week”
- “Mark incidents #120, #121, and #122 as work in progress and assign them to Jana”
- “Close all incidents related to ActionMailer — they were fixed in the last deploy”
Searching logs during an incident
- “Find all error logs from the last hour”
- “Show me logs where message contains ‘timeout’ on web-1 between 14:00 and 15:00”
- “Get fatal logs from the payments source over the last 30 minutes”
Reconstructing a customer journey
When a user reports a problem, the answer is usually scattered across logs, errors, and traces from multiple sources. An agent can stitch that timeline together for you.- “Get all logs for user.id=4321 from production over the last 24 hours, across every source”
- “Narrow that to the window between 14:00 and 15:30 UTC and group the results by source”
- “List any open exception incidents from production in that same window — anything tagged with user.id=4321?”
- “For incident #903, pull the error traces and walk the span tree”
- “Summarize what happened: which actions did this user hit, what failed, and where did the error originate?”
get_log_lines, get_exception_incidents, and get_traces in a single conversation. The final summary step is where MCP earns its keep — the agent composes the narrative, not you.
Setting up log processing
AppSignal executes log line actions during ingestion, in the order you define. A common pattern is to emit a metric, create a trigger, then filter — this ensures AppSignal captures the signal before discarding the log line.- Check the existing log line actions and their order: use
get_app_resourceswithsections: ["log_line_actions"] - “Create a metrics action that counts log lines where severity is error as log.error_count”
- “Add a trigger action that fires an alert when severity is fatal”
- “Add a filter to drop all health check log lines”
- “Reorder those actions so the metrics action runs first, then the trigger, then the filter”
Creating an anomaly detection trigger
- Discover available metrics: “What metrics are available for my production app?”
- Check available tags: “What tags are available for response_time?”
- Create the trigger: “Create a trigger that fires when mean response time exceeds 500ms for more than 5 minutes, and notify the Slack #alerts channel”
- Archive an old trigger once replaced: use
get_triggersto find the ID first, then “Archive the old response_time trigger”
Building a monitoring dashboard
- “What metrics are available for my production app?”
- “Create a dashboard called ‘API Health’ in production”
- “Add a line chart of p95 response time by action to the API Health dashboard”
- “Add an area chart of error rate broken down by namespace”
- “Add a Big Number tile showing the mean of response_time, formatted as a duration”