gamma-prod-checklist

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Gamma Production Checklist

Gamma 生产就绪检查清单

Overview

概述

Comprehensive checklist to ensure your Gamma integration is production-ready.
确保你的Gamma集成具备生产就绪条件的全面检查清单。

Prerequisites

前置条件

  • Completed development and testing
  • Staging environment validated
  • Monitoring infrastructure ready
  • 已完成开发与测试
  • 已验证预发布环境(Staging)
  • 监控基础设施已就绪

Production Checklist

生产就绪检查清单

1. Authentication & Security

1. 认证与安全

  • Production API key obtained (not development key)
  • API key stored in secret manager (not env file)
  • Key rotation procedure documented and tested
  • Minimum required scopes configured
  • No secrets in source code or logs
typescript
// Production client configuration
const gamma = new GammaClient({
  apiKey: await secretManager.getSecret('GAMMA_API_KEY'),
  timeout: 30000,
  retries: 3,
});
  • 已获取生产环境API密钥(非开发密钥)
  • API密钥存储在密钥管理器中(而非环境变量文件)
  • 已记录并测试密钥轮换流程
  • 已配置最小必要权限范围
  • 源代码或日志中无敏感信息
typescript
// Production client configuration
const gamma = new GammaClient({
  apiKey: await secretManager.getSecret('GAMMA_API_KEY'),
  timeout: 30000,
  retries: 3,
});

2. Error Handling

2. 错误处理

  • All API calls wrapped in try/catch
  • Exponential backoff for rate limits
  • Graceful degradation for API outages
  • User-friendly error messages
  • Error tracking integration (Sentry, etc.)
typescript
import * as Sentry from '@sentry/node';

try {
  await gamma.presentations.create({ ... });
} catch (err) {
  Sentry.captureException(err, {
    tags: { service: 'gamma', operation: 'create' },
  });
  throw new UserError('Unable to create presentation. Please try again.');
}
  • 所有API调用均已用try/catch包裹
  • 针对速率限制实现指数退避机制
  • API服务中断时具备优雅降级能力
  • 提供用户友好的错误提示
  • 已集成错误追踪工具(如Sentry等)
typescript
import * as Sentry from '@sentry/node';

try {
  await gamma.presentations.create({ ... });
} catch (err) {
  Sentry.captureException(err, {
    tags: { service: 'gamma', operation: 'create' },
  });
  throw new UserError('Unable to create presentation. Please try again.');
}

3. Performance

3. 性能优化

  • Client instance reused (singleton pattern)
  • Connection pooling enabled
  • Appropriate timeouts configured
  • Response caching where applicable
  • Async operations for long tasks
  • 复用客户端实例(单例模式)
  • 已启用连接池
  • 已配置合适的超时时间
  • 已在适用场景实现响应缓存
  • 长耗时任务采用异步操作

4. Monitoring & Logging

4. 监控与日志

  • Request/response logging (sanitized)
  • Latency metrics collection
  • Error rate alerting
  • Rate limit monitoring
  • Health check endpoint
typescript
// Health check
app.get('/health/gamma', async (req, res) => {
  try {
    await gamma.ping();
    res.json({ status: 'healthy', service: 'gamma' });
  } catch (err) {
    res.status(503).json({ status: 'unhealthy', error: err.message });
  }
});
  • 已实现脱敏后的请求/响应日志
  • 已收集延迟指标
  • 已配置错误率告警
  • 已监控速率限制情况
  • 已提供健康检查端点
typescript
// Health check
app.get('/health/gamma', async (req, res) => {
  try {
    await gamma.ping();
    res.json({ status: 'healthy', service: 'gamma' });
  } catch (err) {
    res.status(503).json({ status: 'unhealthy', error: err.message });
  }
});

5. Rate Limiting

5. 速率限制

  • Rate limit tier confirmed with Gamma
  • Request queuing implemented
  • Backoff strategy in place
  • Usage monitoring alerts
  • Burst protection enabled
  • 已与Gamma确认速率限制层级
  • 已实现请求排队机制
  • 已准备退避策略
  • 已配置使用情况告警
  • 已启用突发流量保护

6. Data Handling

6. 数据处理

  • PII handling compliant with policies
  • Data retention policies documented
  • Export data properly secured
  • User consent for AI processing
  • GDPR/CCPA compliance verified
  • 个人可识别信息(PII)处理符合政策要求
  • 已记录数据保留政策
  • 导出数据已妥善加密
  • 已获取用户对AI处理的同意
  • 已验证符合GDPR/CCPA合规要求

7. Disaster Recovery

7. 灾难恢复

  • Fallback behavior defined
  • Circuit breaker implemented
  • Recovery procedures documented
  • Backup API key available
  • Incident response plan ready
typescript
import CircuitBreaker from 'opossum';

const breaker = new CircuitBreaker(
  (opts) => gamma.presentations.create(opts),
  {
    timeout: 30000,
    errorThresholdPercentage: 50,
    resetTimeout: 30000,
  }
);

breaker.fallback(() => ({
  error: 'Service temporarily unavailable',
  retry: true,
}));
  • 已定义降级 fallback 行为
  • 已实现断路器机制
  • 已记录恢复流程
  • 已准备备用API密钥
  • 事件响应计划已就绪
typescript
import CircuitBreaker from 'opossum';

const breaker = new CircuitBreaker(
  (opts) => gamma.presentations.create(opts),
  {
    timeout: 30000,
    errorThresholdPercentage: 50,
    resetTimeout: 30000,
  }
);

breaker.fallback(() => ({
  error: 'Service temporarily unavailable',
  retry: true,
}));

8. Testing

8. 测试验证

  • Integration tests passing
  • Load testing completed
  • Failure scenario testing done
  • API mock for CI/CD
  • Staging environment validated
  • 集成测试已通过
  • 负载测试已完成
  • 故障场景测试已执行
  • 已为CI/CD准备API模拟服务
  • 预发布环境已验证

9. Documentation

9. 文档管理

  • API integration documented
  • Runbooks for common issues
  • Architecture diagrams updated
  • On-call procedures defined
  • Team trained on Gamma features
  • API集成文档已完善
  • 常见问题运行手册已编写
  • 架构图已更新
  • 随叫随到(On-call)流程已定义
  • 团队已接受Gamma功能培训

Final Verification Script

最终验证脚本

bash
#!/bin/bash
bash
#!/bin/bash

prod-verify.sh

prod-verify.sh

echo "Gamma Production Verification"
echo "Gamma Production Verification"

Check API key

Check API key

if [ -z "$GAMMA_API_KEY" ]; then echo "FAIL: GAMMA_API_KEY not set" exit 1 fi
if [ -z "$GAMMA_API_KEY" ]; then echo "FAIL: GAMMA_API_KEY not set" exit 1 fi

Test connection

Test connection

curl -s -o /dev/null -w "%{http_code}"
-H "Authorization: Bearer $GAMMA_API_KEY"
https://api.gamma.app/v1/ping | grep -q "200"
&& echo "OK: API connection"
|| echo "FAIL: API connection"
echo "Verification complete"
undefined
curl -s -o /dev/null -w "%{http_code}"
-H "Authorization: Bearer $GAMMA_API_KEY"
https://api.gamma.app/v1/ping | grep -q "200"
&& echo "OK: API connection"
|| echo "FAIL: API connection"
echo "Verification complete"
undefined

Resources

相关资源

Next Steps

下一步

Proceed to
gamma-upgrade-migration
for version upgrades.
如需版本升级,请执行
gamma-upgrade-migration
流程。