observability
Sentry
Sentry
Connect your Sentry organization to let agents query issues, search error events, check alert statuses, and investigate production incidents. Agents can analyze your error data to help troubleshoot issues, understand error patterns, and identify root causes.
连接
从终端连接Sentry。传入--help查看Sentry接受的标志。
Terminal
polylane integration connect --type sentry在你的Sentry组织上安装Polylane集成。
通过Sentry的OAuth集成连接它,让智能体在调查期间可以查询问题、错误和告警。
设置
- 点击Connect启动Sentry安装流程。
- 选择要安装Polylane的Sentry组织。
- 审阅请求的访问权限并接受安装。
- 你会回到Polylane,集成已就绪。
连接会向每条问题告警规则添加一个Send a notification via Polylane动作,这样告警一触发就落到Polylane并得到分诊。
智能体能做什么
- 查询问题并搜索错误事件
- 检视最新事件和问题详情
- 检查告警状态并调查故障
断开连接
在你的Sentry组织的Settings → Integrations下移除Polylane集成,或在Polylane中断开它。断开连接会从你的告警规则中移除Polylane动作,所以请同时把它从Terraform配置中删掉。
把Sentry的告警与你由Terraform管理的资源一起注册到Polylane。
一个周期性同步把Polylane通知动作添加到每条问题告警规则,所以由Terraform管理的规则在该动作也进入其Terraform配置之前会显示漂移。用Sentry API的GET /api/0/organizations/{organization_slug}/sentry-app-installations/找到你的安装UUID(Polylane应用对应的条目),然后把该动作包含在每条规则上:
resource "sentry_issue_alert" "example" {
# ...
actions_v2 = concat(var.existing_actions, [
{
notify_event_sentry_app = {
sentry_app_installation_uuid = var.polylane_installation_uuid
}
}
])
}
断开该集成会从你的告警规则中移除Polylane动作,所以请同时把它从Terraform配置中删掉。
断开连接
断开连接会停止所有同步和检查,并删除Polylane持有的凭据。 Polylane会移除Sentry的API允许它移除的内容。以下内容会保留,直到你自己移除:
- Sentry app installation and tokens
Terminal
polylane integration disconnect <id>工具
10智能体可以在线程中执行的操作。
Api
Call any Sentry REST endpoint that lacks a dedicated tool
Projects
Read Sentry projects (list, get, stats)
Issues
Read or update Sentry issues, events, tags, and hashes
Alert Rules
Read or create Sentry alerts (issue alert rules)
Metric Alerts
Read or create Sentry metric monitors (metric alert rules)
Incidents
Read Sentry metric alert firings
Replays
Read Sentry session replays
Dashboards
Read, create, or edit Sentry dashboards
Query Discover
Run a Discover query in Sentry
Query Timeseries
Run a Sentry events timeseries query