Monitoring Your Deployment
Effective monitoring is essential for maintaining a healthy and responsive application. This guide covers how to monitor your CodeNull AI Backend deployment on Azure Container Apps.Accessing Logs
Azure Container Apps provides built-in logging capabilities that allow you to monitor your application in real-time.Streaming Logs
To stream logs from your running container app:Filtering Logs
You can filter the logs to focus on specific information:--follow
flag allows you to stream logs in real-time, which is useful during debugging sessions.
Monitoring Application Health
Health Check Endpoint
CodeNull AI Backend provides a built-in health check endpoint that you can use to verify that the application is running correctly:mongo_db_check
parameter (default: 1) to verify MongoDB connectivity.
Viewing Deployment Information
To view detailed information about your deployed container app:- Application URL
- Resource allocation
- Scaling rules
- Environment variables
- Network configuration
Setting Up Azure Monitor (Optional)
For more comprehensive monitoring:- Navigate to your Container App in the Azure Portal
- Select “Monitoring” from the left navigation
- Configure alerts for metrics like:
- Request count
- Response time
- Error rate
- CPU and memory usage
Recommended Monitoring Practices
- Regular Health Checks: Set up automated health checks to periodically verify your application’s status
- Log Analysis: Review logs regularly to identify potential issues before they affect users
- Performance Monitoring: Track response times and resource usage to optimize your application
- Alert Configuration: Set up alerts for critical metrics to be notified of issues promptly