sentry
2
总安装量
2
周安装量
#73266
全站排名
安装命令
npx skills add https://github.com/sergical/openclaw-skill-sentry --skill sentry
Agent 安装分布
openclaw
2
gemini-cli
2
github-copilot
2
codex
2
kimi-cli
2
cursor
2
Skill 文档
Sentry Observability for OpenClaw
Overview
This skill covers two things:
- Setting up the
openclaw-plugin-sentryplugin for error/trace/log collection - Investigating issues using the Sentry CLI
Plugin Setup
Install
openclaw plugins install openclaw-plugin-sentry
Configure
Two config changes needed in openclaw.json:
- Enable diagnostics (required for traces):
{ "diagnostics": { "enabled": true } }
- Configure the plugin:
{
"plugins": {
"allow": ["sentry"],
"entries": {
"sentry": {
"enabled": true,
"config": {
"dsn": "<your-sentry-dsn>",
"environment": "production",
"tracesSampleRate": 1.0,
"enableLogs": true
}
}
}
}
}
Config lives under plugins.entries.sentry.config â not top-level under sentry.
Get your DSN
- Go to Sentry â Project Settings â Client Keys (DSN)
- Copy the DSN URL (looks like
https://key@o000000.ingest.us.sentry.io/0000000)
What gets captured
| Signal | Source | Sentry Feature |
|---|---|---|
| Errors | Auto-captured exceptions (fetch failures, AbortError, etc.) | Issues |
| Traces | model.usage â ai.chat spans, message.processed â openclaw.message spans |
Tracing |
| Messages | webhook.error, session.stuck â captureMessage |
Issues |
| Logs | Gateway log transport â Sentry.logger |
Structured Logs |
Verify it works
After restart, send a message to your bot and check:
sentry issue list <org>/<project> # Should see any errors
sentry event list <org>/<project> # Should see events
Or via API:
curl -s "https://sentry.io/api/0/organizations/<org>/events/?project=<project-id>&dataset=discover&field=id&field=title&field=event.type&field=timestamp&sort=-timestamp" \
-H "Authorization: Bearer $SENTRY_AUTH_TOKEN"
Sentry CLI Investigation
Auth setup
npm install -g sentry
sentry login
# Follow browser auth flow â stores config in ~/.sentry/cli.db
Common commands
# List issues for a project
sentry issue list <org>/<project>
# View issue details
sentry issue view <short-id>
# AI-powered root cause analysis
sentry issue explain <short-id>
# List recent events
sentry event list <org>/<project>
# Direct API calls
sentry api /organizations/<org>/projects/
Checking traces via API
Traces don’t show in the CLI directly. Use the API:
SENTRY_TOKEN="..."
curl -s "https://sentry.io/api/0/organizations/<org>/events/?project=<id>&dataset=discover&per_page=10&sort=-timestamp&field=id&field=title&field=timestamp&field=transaction.duration&field=transaction.op&query=event.type:transaction" \
-H "Authorization: Bearer $SENTRY_TOKEN"
Troubleshooting
No traces appearing
- Check
diagnostics.enabled: truein config (this gates event emission) - Check plugin loaded: look for
sentry: initializedin gateway logs - Check for module isolation: plugin’s
onDiagnosticEventmust share the same listener set as the gateway (OpenClaw patchesglobalThis.__oc_diagfor this)
Traces show 0ms duration
- Sentry SDK v10 expects timestamps in milliseconds (not seconds)
- The plugin uses
evt.tsandevt.durationMsfrom diagnostic events
Plugin not loading
- Ensure
"sentry"is inplugins.allowarray - Ensure
openclaw.plugin.jsonhasconfigSchemawithadditionalProperties: true - Check gateway logs for config validation errors
Logs not appearing
enableLogs: truemust be set in plugin config- Sentry structured logs may need to be enabled in your Sentry project settings
Sentry.loggerAPI requires@sentry/nodev10+