Skill站外收录 @skilllib/skill-2014279395177869314
juicebox-debug-bundle
收集 Juicebox 应用的运行环境、API 连通性、错误日志及 SDK 版本信息,生成结构化诊断包与文本摘要,辅助支持团队快速定位问题,适用于故障排查与技术支持场景。
效率工具 AI 技能
Skills.MD
# Juicebox Debug Bundle
## Overview
Collect comprehensive diagnostic information for Juicebox support tickets.
## Prerequisites
- Access to application logs
- Juicebox API key configured
- Terminal access
## Instructions
### Step 1: Collect Environment Info
```bash
#!/bin/bash
# collect-debug-info.sh
echo "=== Juicebox Debug Bundle ===" > debug-bundle.txt
echo "Timestamp: $(date -u +%Y-%m-%dT%H:%M:%SZ)" >> debug-bundle.txt
echo "" >> debug-bundle.txt
echo "=== Environment ===" >> debug-bundle.txt
echo "Node Version: $(node -v)" >> debug-bundle.txt
echo "NPM Version: $(npm -v)" >> debug-bundle.txt
echo "OS: $(uname -a)" >> debug-bundle.txt
echo "" >> debug-bundle.txt
echo "=== SDK Version ===" >> debug-bundle.txt
npm list @juicebox/sdk 2>/dev/null >> debug-bundle.txt
echo "" >> debug-bundle.txt
```
### Step 2: Test API Connectivity
```bash
echo "=== API Connectivity ===" >> debug-bundle.txt
# Health check
echo "Health Check:" >> debug-bundle.txt
curl -s -w "\nHTTP Status: %{http_code}\nTime: %{time_total}s\n" \
https://api.juicebox.ai/v1/health >> debug-bundle.txt
echo "" >> debug-bundle.txt
# Auth verification (masked key)
echo "Auth Test:" >> debug-bundle.txt
MASKED_KEY="${JUICEBOX_API_KEY:0:10}...${JUICEBOX_API_KEY: -4}"
echo "API Key (masked): $MASKED_KEY" >> debug-bundle.txt
curl -s -w "\nHTTP Status: %{http_code}\n" \
-H "Authorization: Bearer $JUICEBOX_API_KEY" \
https://api.juicebox.ai/v1/auth/me >> debug-bundle.txt
echo "" >> debug-bundle.txt
```
### Step 3: Gather Error Logs
```typescript
// debug/collect-logs.ts
import * as fs from 'fs';
export function collectRecentErrors(logPath: string): string[] {
const logs = fs.readFileSync(logPath, 'utf-8');
const lines = logs.split('\n');
// Filter for Juicebox-related errors in last 24 hours
const cutoff = Date.now() - 24 * 60 * 60 * 1000;
return lines.filter(line => {
if (!line.includes('juicebox') && !line.includes('Juicebox')) {
return false;
}
const match = line.match(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/);
if (match) {
const timestamp = new Date(match[0]).getTime();
return timestamp > cutoff;
}
return true;
});
}
```
### Step 4: Create Support Bundle
```typescript
// debug/create-bundle.ts
import * as fs from 'fs';
import * as path from 'path';
interface DebugBundle {
timestamp: string;
environment: Record<string, string>;
sdkVersion: string;
recentErrors: string[];
apiTests: {
health: boolean;
auth: boolean;
latency: number;
};
requestSample?: {
endpoint: string;
request: any;
response: any;
duration: number;
};
}
export async function createDebugBundle(): Promise<DebugBundle> {
const bundle: DebugBundle = {
timestamp: new Date().toISOString(),
environment: {
nodeVersion: process.version,
platform: process.platform,
arch: process.arch
},
sdkVersion: require('@juicebox/sdk/package.json').version,
recentErrors: collectRecentErrors('logs/app.log'),
apiTests: await runApiTests()
};
// Save bundle
const filename = `debug-bundle-${Date.now()}.json`;
fs.writeFileSync(filename, JSON.stringify(bundle, null, 2));
console.log(`Debug bundle saved to ${filename}`);
return bundle;
}
```
## Output
- `debug-bundle.txt` - Text summary
- `debug-bundle-*.json` - Structured data
- Filtered error logs
- API connectivity results
## Checklist for Support Tickets
```markdown
## Support Ticket Template
**Issue Description:**
[Brief description of the problem]
**Steps to Reproduce:**
1.
2.
3.
**Expected Behavior:**
[What should happen]
**Actual Behavior:**
[What actually happens]
**Debug Bundle Attached:**
- [ ] debug-bundle.json
- [ ] Relevant log excerpts
- [ ] Screenshot (if UI related)
**Environment:**
- SDK Version:
- Node Version:
- Platform:
```
## Resources
- [Support Portal](https://juicebox.ai/support)
- [Community Forum](https://community.juicebox.ai)
## Next Steps
After collecting debug info, check `juicebox-rate-limits` for quota issues.
评论 0
还没有评论,来抢沙发。
相关内容
同类或同场景的收录内容
building-with-kafka-strimzi
在 Kubernetes 上构建基于 Apache Kafka 的事件驱动系统,支持高可靠的消息传递、事务性处理与精确一次语义,结合 Strimzi 运营商实现集群自动化管理,利用 Schema Registry 保障事件模式演进,适用于微服务间解耦通信与实时数据流处理场景。
站外数据与分析
609 0.0
personal-tool-builder
专注于从个人真实痛点出发快速构建实用工具,涵盖命令行程序、本地优先应用和自动化脚本的开发与演进,强调先满足自身需求再逐步扩展,通过持续自用打磨功能,避免过度设计,确保工具简洁有效且长期可维护。
站外商业与营销
196 0.0
threejs-lighting
实现三维场景中的光照与阴影控制,支持多种光源类型及环境光照明,提供从基础布光到高级阴影优化的完整方案,适用于需要真实感渲染或性能平衡的可视化项目。
站外效率工具
442 0.0
aggregation-helper
提供数据聚合场景的自动化辅助能力,涵盖 SQL 查询编写、统计分析建模、可视化方案设计及商业智能配置,支持从需求理解到生产级代码生成的全流程指导。
站外效率工具数据与分析
217 0.0
举报「juicebox-debug-bundle」
举报信息仅审核团队可见,同一资产 24 小时内仅可举报一次