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. -->
<!-- 由 convex-agents content/capabilities/sentinel.json 生成——请勿手动编辑。 -->
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和 breadcrumbs。unhandledrejection - 写入时自动执行脱敏,且默认启用(对密钥名称和值模式采用默认拒绝策略)。
- 使用 Convex CLI(、
convex data)读取最近的错误;通过 monitor 的run-once-query事件响应新增错误。prod_error - 可选择启用自愈 cron:会对每个错误进行分类;对于反复出现且非暂时性的错误,将其交给 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; install works anonymously.
- 脱敏是强制要求且默认启用——绝不能存储原始密钥;Agent 读取的数据会传递给模型提供商。
- 数据始终保留在用户的部署中,绝不能发送给第三方。
- 对数据进行采样并设置上限,以控制数据量和成本。
- 捕获 PROD 错误需要已部署的云应用;安装组件时可匿名进行。