Skip to content

Deploy explain#64 and alarm on usage-limit and unhandled API errors - #2506

Merged
mattgodbolt merged 2 commits into
mainfrom
molty/explain-alarm
Oct 31, 2026
Merged

mattgodbolt merged 2 commits into
mainfrom
molty/explain-alarm

Conversation

@mattgodbolt-molty

@mattgodbolt-molty mattgodbolt-molty commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Adds two CloudWatch alarms on the explain Lambda's own metrics, using the CompilerExplorer namespace and the existing alert SNS topic:

  • ExplainUsageLimit: fires on any ClaudeExplainUsageLimit in an hour. A spent Anthropic workspace limit fails every request until it resets. It failed for about 26 hours from 2026-10-29 10:23 UTC, and we found out from a user on Discord.
  • ExplainApiErrors: fires on 3 or more ClaudeExplainApiError in an hour. These are unhandled Anthropic API errors, which reach users as a 500.

Both treat missing data as not breaching, since the metrics are only published when non-zero, and both notify on recovery, like the DynamoDB throttle alarms. The dimensions (LogGroup and ServiceName explain, ServiceType AWS::Lambda::Function) are the ones the existing ClaudeExplainRequest metric is published under. terraform fmt and terraform validate are clean.

The metrics are emitted by compiler-explorer/explain#64, now merged. This PR also bumps the explain image_tag from gh-168 to gh-177, the image built from that merge, so one apply deploys the code and the alarms together. gh-177 also includes the dependabot updates merged alongside it.

🤖 Generated with Claude Code

mattgodbolt-molty and others added 2 commits October 30, 2026 07:31
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mattgodbolt-molty mattgodbolt-molty changed the title Alarm when Claude Explain hits its usage limit or unhandled API errors Deploy explain#64 and alarm on usage-limit and unhandled API errors Oct 31, 2026

@mattgodbolt mattgodbolt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. applied ok

@mattgodbolt
mattgodbolt merged commit d1c0346 into main Oct 31, 2026
1 check passed
@mattgodbolt
mattgodbolt deleted the molty/explain-alarm branch October 31, 2026 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants