convex-sentinel
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese<!-- GENERATED from convex-agents content/capabilities/sentinel.json — do not edit by hand. -->
<!-- GENERATED from convex-agents content/capabilities/sentinel.json — do not edit by hand. -->
Capture production errors in your own deployment
在自有部署中捕获生产环境错误
Install to capture production errors (server function failures, client JS/React crashes, OCC and scale signals) into a table in the user's OWN deployment, redacted at write time, then react to new ones. Data never leaves the user's deployment.
@convex-dev/sentinel安装以将生产环境错误(服务器函数失败、客户端JS/React崩溃、OCC和扩容信号)捕获到用户自有部署的数据库表中,写入时自动脱敏,之后可对新错误做出响应。数据永远不会离开用户的部署环境。
@convex-dev/sentinelWorkflow
工作流程
- Install the component: in
app.use(sentinel).convex/convex.config.ts - Wire the client SDK: a React error boundary plus /
window.onerrorand breadcrumbs.unhandledrejection - Redaction runs at write time and is on by default (default-deny on secret key names and value patterns).
- Read recent errors with the Convex CLI (,
convex data); react to new ones via the monitor'srun-once-queryevent.prod_error - Optionally enable the self-healing cron: classifies each error and, for recurring non-transient ones, hands it to ai-runner to open a fix PR.
triage
- 安装组件:在中添加
convex/convex.config.ts。app.use(sentinel) - 接入客户端SDK:配置React错误边界,加上/
window.onerror监听和面包屑追踪。unhandledrejection - 脱敏在写入时自动执行且默认开启(默认拒绝存储包含敏感密钥名称和特定值模式的数据)。
- 使用Convex CLI(、
convex data)查看近期错误;通过监控器的run-once-query事件对新错误做出响应。prod_error - 可选启用自愈定时任务:会对每个错误进行分类,对于重复出现的非临时性错误,将其交给ai-runner来创建修复PR。
triage
Rules
规则
- Redaction is mandatory and on by default — never store raw secrets; the agent's reads reach the model provider.
- Data stays in the user's deployment; never send it to a third party.
- Sample and cap to control volume and cost.
- Capturing PROD errors needs a deployed cloud app (Tier 2); install works anonymously.
- 脱敏是强制要求且默认开启——绝不存储原始敏感信息;Agent的读取操作仅会发送至模型提供商。
- 数据始终保留在用户的部署环境中;绝不发送至第三方。
- 通过采样和限流来控制数据量与成本。
- 捕获生产环境错误需要已部署的云应用(Tier 2);匿名状态下即可完成安装。