analyze-performance
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAnalyze Performance Issues
分析性能问题
Name
名称
sentry:analyze-performance - Analyze performance metrics and identify slow transactions in Sentry
sentry:analyze-performance - 分析Sentry中的性能指标并识别慢事务
Synopsis
概要
/analyze-performance [arguments]/analyze-performance [arguments]Description
描述
Analyze performance monitoring data in Sentry to identify slow transactions, bottlenecks, and performance regressions.
分析Sentry中的性能监控数据,以识别慢事务、瓶颈和性能退化问题。
Implementation
实现说明
This command helps you investigate performance issues and optimize application speed using Sentry's performance monitoring data.
该命令可帮助你利用Sentry的性能监控数据调查性能问题并优化应用运行速度。
Usage
使用方法
/analyze-performance [project-name] [timeframe]/analyze-performance [project-name] [timeframe]What This Command Does
该命令的功能
- Asks for the Sentry project name
- Requests timeframe for analysis
- Fetches performance metrics using Sentry MCP tools
- Analyzes transaction performance data
- Provides insights on:
- Slowest transactions and endpoints
- Performance trends over time
- Transaction throughput (requests/min)
- Apdex scores
- P50, P95, P99 latency percentiles
- Database query performance
- External API call latency
- Identifies performance regressions and anomalies
- Suggests optimization opportunities
- 询问Sentry项目名称
- 请求分析的时间范围
- 使用Sentry MCP工具获取性能指标
- 分析事务性能数据
- 提供以下维度的洞察:
- 最慢的事务和端点
- 随时间变化的性能趋势
- 事务吞吐量(请求/分钟)
- Apdex评分
- P50、P95、P99延迟百分位数
- 数据库查询性能
- 外部API调用延迟
- 识别性能退化和异常情况
- 给出优化建议
Prerequisites
前提条件
- Sentry MCP server must be installed and configured
- OAuth authentication with Sentry must be completed
- Performance monitoring enabled for the project
- Access to the target Sentry project
- 必须安装并配置Sentry MCP服务器
- 已完成与Sentry的OAuth认证
- 项目已启用性能监控
- 拥有目标Sentry项目的访问权限
Example Interaction
示例交互
User: /analyze-performance backend-api 7d
Claude: Analyzing performance metrics for backend-api over the last 7 days...用户: /analyze-performance backend-api 7d
Claude: 正在分析backend-api项目过去7天的性能指标...Performance Analysis Report
性能分析报告
Overview
概述
- Total Transactions: 2.4M
- Avg Throughput: 4,000 req/min
- Apdex Score: 0.78 (Fair)
- Time Range: Last 7 days
- 总事务数: 240万
- 平均吞吐量: 4000 请求/分钟
- Apdex评分: 0.78(一般)
- 时间范围: 过去7天
Slowest Transactions (P95 Latency)
最慢事务(P95延迟)
-
POST /api/users/search
- P50: 450ms
- P95: 3,200ms
- P99: 8,500ms
- Throughput: 120 req/min
- Issue: Database query scanning full table
-
GET /api/reports/generate
- P50: 890ms
- P95: 2,800ms
- P99: 5,400ms
- Throughput: 45 req/min
- Issue: Large data aggregation without caching
-
POST /api/images/upload
- P50: 320ms
- P95: 2,100ms
- P99: 4,200ms
- Throughput: 200 req/min
- Issue: S3 upload latency varies by region
-
POST /api/users/search
- P50: 450ms
- P95: 3200ms
- P99: 8500ms
- 吞吐量: 120 请求/分钟
- 问题: 数据库查询扫描全表
-
GET /api/reports/generate
- P50: 890ms
- P95: 2800ms
- P99: 5400ms
- 吞吐量: 45 请求/分钟
- 问题: 大数据聚合未使用缓存
-
POST /api/images/upload
- P50: 320ms
- P95: 2100ms
- P99: 4200ms
- 吞吐量: 200 请求/分钟
- 问题: S3上传延迟因区域而异
Performance Trends
性能趋势
- Overall latency increased 15% since v3.1.0 deployment (5 days ago)
- User search endpoint degraded 40% in last 3 days
- Database query time increased from 120ms to 180ms average
- 自v3.1.0版本部署(5天前)以来,整体延迟增加了15%
- 用户搜索端点在过去3天内性能下降了40%
- 数据库查询平均时间从120ms增加到180ms
Span Analysis
链路分析(Span Analysis)
Slowest Database Queries:
- SELECT * FROM users WHERE email LIKE '%@%' - 1,200ms avg
- SELECT * FROM events JOIN users - 850ms avg
- UPDATE sessions SET last_seen - 450ms avg
Slowest External Calls:
- POST https://api.payment-processor.com/charge - 650ms avg
- GET https://cdn.example.com/assets - 280ms avg
最慢数据库查询:
- SELECT * FROM users WHERE email LIKE '%@%' - 平均1200ms
- SELECT * FROM events JOIN users - 平均850ms
- UPDATE sessions SET last_seen - 平均450ms
最慢外部调用:
- POST https://api.payment-processor.com/charge - 平均650ms
- GET https://cdn.example.com/assets - 平均280ms
Recommendations
优化建议
- Critical: Add database index on users.email for search queries
- High: Implement Redis caching for report generation
- Medium: Consider CDN with multi-region support for uploads
- Low: Review payment processor latency (external dependency)
- 紧急: 为users.email字段添加数据库索引以优化搜索查询
- 高优先级: 为报告生成实现Redis缓存
- 中优先级: 考虑使用支持多区域的CDN处理上传
- 低优先级: 评估支付处理器的延迟情况(外部依赖)
Next Steps
后续步骤
Would you like me to:
- Investigate the v3.1.0 regression in detail?
- Analyze specific slow database queries?
- Review span performance for a specific transaction?
undefined你是否需要我:
- 详细调查v3.1.0版本的性能退化问题?
- 分析特定的慢数据库查询?
- 查看特定事务的链路性能详情?
undefinedArguments
参数
- (optional): Sentry project slug
project-name - (optional): Time range (1h, 24h, 7d, 30d)
timeframe
- (可选): Sentry项目标识(slug)
project-name - (可选): 时间范围(1h、24h、7d、30d)
timeframe
Tips
提示
- Focus on P95/P99 latency for user experience impact
- Look for performance changes after deployments
- Monitor Apdex score for overall user satisfaction
- Investigate span-level details for bottlenecks
- Compare performance across releases and environments
- Set up performance alerts for regressions
- 重点关注P95/P99延迟对用户体验的影响
- 留意部署后的性能变化
- 监控Apdex评分以了解整体用户满意度
- 深入分析链路级细节以定位瓶颈
- 对比不同版本和环境的性能表现
- 为性能退化设置告警
Related Commands
相关命令
- : Check for errors related to slow endpoints
/investigate-errors - : Compare performance across releases
/check-releases - : Run custom performance queries
/query-events
- : 检查与慢端点相关的错误
/investigate-errors - : 对比不同版本的性能
/check-releases - : 运行自定义性能查询
/query-events