| name | deepgram-prod-checklist |
| description | Execute Deepgram production deployment checklist.
Use when preparing for production launch, auditing production readiness,
or verifying deployment configurations.
Trigger with phrases like "deepgram production", "deploy deepgram",
"deepgram prod checklist", "deepgram go-live", "production ready deepgram".
|
| allowed-tools | Read, Grep, Bash(curl:*) |
| version | 1.0.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
Deepgram Production Checklist
Overview
Comprehensive checklist for deploying Deepgram integrations to production.
Pre-Deployment Checklist
API Configuration
Error Handling
Performance
Security
Monitoring
Documentation
Production Configuration
TypeScript Production Client
import { createClient, DeepgramClient } from '@deepgram/sdk';
import { getSecret } from './secrets';
import { metrics } from './metrics';
import { logger } from './logger';
interface ProductionConfig {
timeout: number;
retries: number;
model: string;
}
const config: ProductionConfig = {
timeout: 30000,
retries: 3,
model: 'nova-2',
};
let client: DeepgramClient | null = null;
export async function getProductionClient(): Promise<DeepgramClient> {
if (client) return client;
const apiKey = await getSecret('DEEPGRAM_API_KEY');
client = createClient(apiKey, {
global: {
fetch: {
: {
: config.,
},
},
},
});
client;
}
() {
startTime = .();
requestId = crypto.();
logger.(, { requestId, : (audioUrl) });
{
deepgram = ();
{ result, error } = deepgram...(
{ : audioUrl },
{
: config.,
: options. || ,
: ,
: ,
: options.,
}
);
duration = .() - startTime;
metrics.(, duration);
(error) {
metrics.();
logger.(, { requestId, : error. });
(error.);
}
metrics.();
logger.(, {
requestId,
: result.?.,
duration,
});
result;
} (err) {
metrics.();
logger.(, {
requestId,
: err ? err. : ,
});
err;
}
}
(): {
{
parsed = (url);
;
} {
;
}
}
Health Check Endpoint
import { getProductionClient } from '../lib/deepgram-production';
interface HealthStatus {
status: 'healthy' | 'degraded' | 'unhealthy';
timestamp: string;
checks: {
deepgram: {
status: 'pass' | 'fail';
latency?: number;
message?: string;
};
};
}
export async function healthCheck(): Promise<HealthStatus> {
const checks: HealthStatus['checks'] = {
deepgram: { status: 'fail' },
};
const startTime = Date.now();
try {
const client = await getProductionClient();
const { error } = await client.manage.getProjects();
checks.deepgram = {
status: error ? 'fail' : 'pass',
: .() - startTime,
: error?.,
};
} (err) {
checks. = {
: ,
: .() - startTime,
: err ? err. : ,
};
}
allPassing = .(checks).( c. === );
anyFailing = .(checks).( c. === );
{
: allPassing ? : anyFailing ? : ,
: ().(),
checks,
};
}
Production Metrics
import { Counter, Histogram, Registry } from 'prom-client';
export const registry = new Registry();
export const transcriptionDuration = new Histogram({
name: 'deepgram_transcription_duration_seconds',
help: 'Duration of Deepgram transcription requests',
labelNames: ['status', 'model'],
buckets: [0.1, 0.5, 1, 2, 5, 10, 30, 60],
registers: [registry],
});
export const transcriptionTotal = new Counter({
name: 'deepgram_transcription_total',
help: 'Total number of transcription requests',
labelNames: ['status', 'error_code'],
registers: [registry],
});
export const audioProcessedSeconds = new Counter({
name: 'deepgram_audio_processed_seconds_total',
help: 'Total seconds of audio processed',
: [registry],
});
rateLimitHits = ({
: ,
: ,
: [registry],
});
metrics = {
() {
transcriptionDuration.(status, ).(duration / );
transcriptionTotal.(status, ).();
(audioSeconds) {
audioProcessedSeconds.(audioSeconds);
}
},
() {
rateLimitHits.();
},
};
Alerting Configuration
groups:
- name: deepgram
rules:
- alert: DeepgramHighErrorRate
expr: |
sum(rate(deepgram_transcription_total{status="error"}[5m])) /
sum(rate(deepgram_transcription_total[5m])) > 0.05
for: 5m
labels:
severity: critical
annotations:
summary: High Deepgram error rate
description: Error rate is above 5% for the last 5 minutes
- alert: DeepgramHighLatency
expr: |
histogram_quantile(0.95,
sum(rate(deepgram_transcription_duration_seconds_bucket[5m])) by (le)
) > 10
for: 5m
labels:
severity: warning
annotations:
summary: High Deepgram latency
description: P95 latency
Runbook Template
# Deepgram Incident Runbook
## Quick Reference
- **Deepgram Status Page**: https://status.deepgram.com
- **Console**: https://console.deepgram.com
- **Support**: support@deepgram.com
## Common Issues
### Issue: High Error Rate
**Symptoms**: Error rate > 5%
**Steps**:
1. Check Deepgram status page
2. Review error logs for specific error codes
3. If 429 errors: check rate limit configuration
4. If 401 errors: verify API key validity
5. If 500 errors: escalate to Deepgram support
### Issue: High Latency
**Symptoms**: P95 > 10 seconds
**Steps**:
1. Check audio file sizes (large files = longer processing)
2. Review concurrent request count
3. Check network latency to Deepgram
4. Consider using callback URLs for large files
### Issue: API Key Expiring
**Symptoms**: Alert from key monitoring
**Steps**:
1. Generate new API key in Console
2. Update secret manager
3. Verify new key works
4. Schedule deletion of old key (24h grace period)
Go-Live Checklist
## Pre-Launch (D-7)
- [ ] Load testing completed
- [ ] Security review passed
- [ ] Documentation finalized
- [ ] Team trained on runbooks
## Launch Day (D-0)
- [ ] Final smoke test passed
- [ ] Monitoring dashboards open
- [ ] On-call rotation confirmed
- [ ] Rollback plan ready
## Post-Launch (D+1)
- [ ] No critical alerts
- [ ] Error rate within SLA
- [ ] Performance metrics acceptable
- [ ] Customer feedback collected
Resources
Next Steps
Proceed to deepgram-upgrade-migration for SDK upgrade guidance.