Skip to content

Performance Monitoring

Easy Deploy provides comprehensive monitoring tools to track your application’s performance, health, and user experience in real-time.

  • Response Time: Average, median, and 95th percentile response times
  • Throughput: Requests per second and concurrent users
  • Error Rate: HTTP error responses and exception tracking
  • Availability: Uptime monitoring and service health checks
  • CPU Usage: Server CPU utilization and load average
  • Memory Usage: RAM usage and memory leaks detection
  • Disk Usage: Storage consumption and I/O performance
  • Network: Bandwidth usage and connection metrics
  • User Sessions: Active users and session duration
  • Page Views: Popular pages and user journeys
  • Conversion Rates: Goal completion and funnel analysis
  • Revenue Impact: Performance correlation with business metrics

Access your monitoring dashboard at /monitoring in your application settings:

  • Live metrics: Real-time performance data
  • Historical data: Trends over time (1h, 24h, 7d, 30d)
  • Alerts: Active alerts and incidents
  • Service status: Current health of all services

Create custom dashboards for different teams:

  • Development: Deployment frequency, build times, test coverage
  • Operations: Infrastructure health, alerts, capacity planning
  • Business: User metrics, conversion rates, revenue impact
  • Support: Error rates, customer issues, response times

Easy Deploy automatically monitors:

  • HTTP endpoints: Response status and timing
  • Database connections: Connection pool health
  • External services: Third-party API availability
  • Background jobs: Queue processing and worker health

Define custom health check endpoints:

Terminal window
// Node.js health check endpoint
app.get('/health', (req, res) => {
const health = {
status: 'healthy',
timestamp: new Date().toISOString(),
checks: {
database: checkDatabase(),
redis: checkRedis(),
external_api: checkExternalAPI()
}
};
const isHealthy = Object.values(health.checks).every(check => check.status === 'ok');
res.status(isHealthy ? 200 : 503).json(health);
});
function checkDatabase() {
try {
// Database connectivity check
return { status: 'ok', responseTime: '15ms' };
} catch (error) {
return { status: 'error', message: error.message };
}
}
.easydeploy.yml
monitoring:
health_checks:
- name: "Main Health Check"
path: "/health"
interval: 30s
timeout: 5s
expected_status: 200
- name: "API Health Check"
path: "/api/health"
interval: 60s
timeout: 10s
expected_status: 200
headers:
Authorization: "Bearer health-check-token"

Track application response times:

Terminal window
// Express.js middleware
const responseTime = require('response-time');
app.use(responseTime((req, res, time) => {
// Send metrics to Easy Deploy
metrics.timing('response_time', time, {
method: req.method,
route: req.route.path,
status: res.statusCode
});
}));

Capture and track application errors:

Terminal window
// Error handling middleware
app.use((error, req, res, next) => {
// Log error details
console.error('Application Error:', {
message: error.message,
stack: error.stack,
url: req.url,
method: req.method,
userAgent: req.get('User-Agent'),
timestamp: new Date().toISOString()
});
// Send error to monitoring service
monitoring.captureException(error, {
request: req,
user: req.user,
extra: {
url: req.url,
method: req.method
}
});
res.status(500).json({ error: 'Internal Server Error' });
});

Send custom metrics from your application:

Terminal window
// Custom metrics examples
const metrics = require('@easydeploy/metrics');
// Counter metrics
metrics.increment('user.login', 1, { method: 'oauth' });
metrics.increment('order.completed', 1, { product: 'premium' });
// Gauge metrics
metrics.gauge('active_users', 1250);
metrics.gauge('queue_size', queueLength);
// Timing metrics
metrics.timing('database.query', queryTime, { table: 'users' });
metrics.timing('external_api.request', apiTime, { service: 'payment' });
// Histogram metrics
metrics.histogram('request.size', requestSize);
metrics.histogram('response.size', responseSize);

Automatic collection of server metrics:

  • CPU: Usage percentage, load average, core utilization
  • Memory: Used/available RAM, swap usage, buffer/cache
  • Disk: Usage percentage, I/O operations, free space
  • Network: Bytes in/out, connections, packet loss

For containerized applications:

  • Container CPU: CPU usage per container
  • Container Memory: Memory usage and limits
  • Container Network: Network I/O per container
  • Container Health: Container restarts and exit codes

Monitor database performance:

  • Connection pool: Active/idle connections
  • Query performance: Slow queries and execution times
  • Replication lag: Master-slave synchronization delay
  • Resource usage: Database CPU, memory, and disk usage

Configure alerts for critical metrics:

Terminal window
# Alert configuration
alerts:
- name: "High Response Time"
condition: "avg(response_time) > 1000ms over 5 minutes"
severity: "warning"
channels: ["email", "slack"]
- name: "High Error Rate"
condition: "error_rate > 5% over 2 minutes"
severity: "critical"
channels: ["email", "slack", "pagerduty"]
- name: "Low Disk Space"
condition: "disk_usage > 90%"
severity: "warning"
channels: ["email"]
- name: "Database Connection Issues"
condition: "database_errors > 10 over 1 minute"
severity: "critical"
channels: ["email", "slack", "pagerduty"]
Terminal window
curl -X POST \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "email",
"name": "DevOps Team",
"email": "[email protected]"
}' \
https://api.easydeploy.com/v1/applications/APP_ID/alert-channels
Terminal window
curl -X POST \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "slack",
"name": "Alerts Channel",
"webhook_url": "https://hooks.slack.com/services/..."
}' \
https://api.easydeploy.com/v1/applications/APP_ID/alert-channels
Terminal window
curl -X POST \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "pagerduty",
"name": "Critical Alerts",
"integration_key": "your-pagerduty-integration-key"
}' \
https://api.easydeploy.com/v1/applications/APP_ID/alert-channels

Centralized log collection and analysis:

  • Structured logging: JSON log format support
  • Log levels: Debug, info, warning, error, critical
  • Log retention: Configurable retention periods
  • Search and filtering: Full-text search across logs
Terminal window
// Node.js structured logging
const winston = require('winston');
const logger = winston.createLogger({
level: process.env.LOG_LEVEL || 'info',
format: winston.format.combine(
winston.format.timestamp(),
winston.format.json()
),
transports: [
new winston.transports.Console(),
new winston.transports.File({ filename: 'app.log' })
]
});
// Usage
logger.info('User logged in', {
userId: user.id,
email: user.email,
ip: req.ip,
userAgent: req.get('User-Agent')
});
logger.error('Payment failed', {
userId: user.id,
orderId: order.id,
amount: order.total,
error: error.message
});
  • Error tracking: Automatic error detection and grouping
  • Performance insights: Slow request identification
  • Security monitoring: Suspicious activity detection
  • Business intelligence: User behavior analysis

Get performance metrics via API:

Terminal window
# Get application metrics
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://api.easydeploy.com/v1/applications/APP_ID/metrics?period=24h"
# Get specific metric
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://api.easydeploy.com/v1/applications/APP_ID/metrics/response_time?period=1h"
# Get alert history
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://api.easydeploy.com/v1/applications/APP_ID/alerts?status=triggered"

Receive monitoring events via webhooks:

Terminal window
curl -X POST \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-app.com/webhooks/monitoring",
"events": ["alert.triggered", "alert.resolved", "deployment.completed"]
}' \
https://api.easydeploy.com/v1/applications/APP_ID/webhooks

Use monitoring data to optimize performance:

  1. Identify bottlenecks: Find slow endpoints and queries
  2. Resource optimization: Right-size CPU and memory
  3. Caching strategy: Implement caching where needed
  4. Database optimization: Optimize queries and indexes
  5. CDN usage: Optimize static asset delivery
  • Set up comprehensive monitoring from day one
  • Define SLOs (Service Level Objectives) for key metrics
  • Monitor business metrics, not just technical ones
  • Set up alerts for critical issues
  • Review metrics regularly and optimize based on data

Metrics not appearing

  • Check monitoring agent installation
  • Verify API key configuration
  • Review firewall and network settings

High false positive alerts

  • Adjust alert thresholds based on historical data
  • Use trend-based alerts instead of absolute values
  • Implement alert suppression during deployments

Missing performance data

  • Ensure monitoring SDK is properly integrated
  • Check for sampling rate configuration
  • Verify data retention settings
  • Slow response times: Check database queries, external API calls
  • High error rates: Review application logs and error tracking
  • Memory leaks: Monitor memory usage trends over time
  • CPU spikes: Identify resource-intensive operations

Need help? Check our troubleshooting guide or contact support.