sentry-ci-integration

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Sentry Ci Integration

Sentry CI 集成

Prerequisites

前提条件

  • Sentry CLI installed or available in CI
  • SENTRY_AUTH_TOKEN
    secret configured
  • SENTRY_ORG
    and
    SENTRY_PROJECT
    environment variables set
  • Source maps generated during build
  • 已在CI环境中安装或可使用Sentry CLI
  • 已配置
    SENTRY_AUTH_TOKEN
    密钥
  • 已设置
    SENTRY_ORG
    SENTRY_PROJECT
    环境变量
  • 构建过程中已生成源码映射(Source maps)

Instructions

操作步骤

  1. Add SENTRY_AUTH_TOKEN secret to CI platform (GitHub, GitLab, CircleCI)
  2. Configure SENTRY_ORG and SENTRY_PROJECT environment variables
  3. Create workflow step to build application with SENTRY_RELEASE env
  4. Add step to create Sentry release using sentry-cli or action
  5. Upload source maps from build output directory
  6. Associate commits with release using set-commits --auto
  7. Finalize the release to mark it complete
  8. Add deploy notification step for environment tracking
  9. Configure checkout with fetch-depth: 0 for full git history
  10. Test workflow by pushing to trigger release creation
  1. 将SENTRY_AUTH_TOKEN密钥添加至CI平台(GitHub、GitLab、CircleCI)
  2. 配置SENTRY_ORG和SENTRY_PROJECT环境变量
  3. 创建工作流步骤,使用SENTRY_RELEASE环境变量构建应用
  4. 添加步骤,通过sentry-cli或action创建Sentry版本
  5. 从构建输出目录上传源码映射
  6. 使用set-commits --auto将提交记录与版本关联
  7. 完成版本标记,确认版本创建完成
  8. 添加部署通知步骤,用于环境追踪
  9. 配置checkout时设置fetch-depth: 0,以获取完整Git历史
  10. 推送代码触发版本创建,测试工作流

Output

输出结果

  • Release created and finalized in Sentry
  • Source maps uploaded for stack trace mapping
  • Commits associated with release
  • Deploy notification sent to Sentry
  • 在Sentry中创建并完成版本
  • 已上传源码映射,用于栈追踪映射
  • 提交记录已与版本关联
  • 已向Sentry发送部署通知

Error Handling

错误处理

See
{baseDir}/references/errors.md
for comprehensive error handling.
请查看
{baseDir}/references/errors.md
获取完整的错误处理指南。

Examples

示例

See
{baseDir}/references/examples.md
for detailed examples.
请查看
{baseDir}/references/examples.md
获取详细示例。

Resources

参考资源