/ 
Django

Django Monitoring

  • Instrument and monitor your Django application instantly
  • Interactive dashboards for enhanced performance monitoring
  • Faster problem resolution for your Django Python applications
  • Set up alerts for your critical metrics with ease

Get real-time context into your Django Python applications

New Relic’s Django monitoring integration allows you to gain instant visibility into Django Python framework key performance indicators. Pinpoint anomalies and bottlenecks using visualizations, real-user monitoring, and synthetics. Whether it's a sudden spike in error rates or a slow-performing database query, you can rely on New Relic’s Django monitoring dashboard to guide you to the source of the issue.

error rate
enhanced performance monitoring

Interactive dashboards for enhanced performance monitoring

  • Instantly visualize your Django performance KPIs
  • Get alerts on spikes in error rates and query response times
  • Customize your Django metric visualizations using SQL
  • Get context into the root cause of your python performance issues

Quickstart
Integration Features

dashboards
Django quickstart contains 1 dashboard. These interactive visualizations let you easily explore your data, understand context, and resolve problems faster.
Show MoreShow Less

How to use
Django quickstart integration

Step 1

Instrument your app

To start monitoring your app, install the New Relic PHP agent. No matter where your app or service is deployed, you can follow the install path. Supported instrumentation methods include CLI, tar archive, package manager, Docker, Ansible, Chef, and Puppet. 

To get a more comprehensive view across your system, including infrastructure and logs, check out the guided install, which auto-discovers your environment and walks you through a recommended setup.

how to step 1
Step 2

Explore the monitoring dashboard

Once your app is instrumented, you’ll automatically get a pre-built interactive dashboard. Get a clear overview of transactions, errors, and virtual machines. You can also see related metrics for infrastructure, database, real-user monitoring, and errors. This allows you to track, debug, and troubleshoot faster.

how to step 2
Step 3

Get deeper insights with our APM tool

Level up your observability with a unified view of telemetry across your development and application stack. With New Relic APM 360, you can go from an estate-wide view of system health to tracing the path of any service request. With integrated infra, logs, alerts, SLOs, and vulnerabilities, you can quickly discover and fix issues before your users notice.

how to step 3

Get started
Monitoring Django & Fixing issues

Django monitoring is crucial to gain instant visibility into your Python application’s key performance indicators. Download New 
Relic Django quickstart to proactively monitor your Python application today. Ingest your first 100GB of telemetry data for free.

FAQs

Django monitoring refers to observing and tracking a Django application's performance, behavior, and health. Monitoring is crucial for identifying issues, optimizing performance, and ensuring the application's overall stability. It involves collecting and analyzing various metrics, logs, and other relevant data to gain insights into the application's behavior.

Key aspects of Django monitoring include:

Performance monitoring: Tracking response times, resource usage (CPU, memory, disk I/O), and identifying performance bottlenecks.

Error monitoring: Detecting and logging errors and exceptions within the application, helping developers quickly identify and fix issues.

Logging: Recording events, warnings, and custom log messages to facilitate debugging and troubleshooting.

Database monitoring: Monitoring database queries and ensuring efficient use of database resources.

Request monitoring: Tracking the flow of requests through the application to identify slow or problematic endpoints.

Alerting: Setting up alerts for predefined thresholds or when specific events occur, allowing for proactive issue resolution.

Monitoring Django applications is essential to ensure their performance, reliability, and security. Here are key aspects and metrics to monitor in Django:

Response times: Monitor the response times for your Django web application to ensure that it responds to user requests promptly. Slow response times can result in a poor user experience.

Error rates: Keep track of error rates to identify and address issues such as application errors, HTTP errors, and exceptions.
Throughput: Measure the rate of incoming HTTP requests or transactions to understand the load on your Django application and its capacity to handle traffic.

Database queries: Monitor the performance of database queries, including query execution times and the number of queries executed, to optimize database interactions.

Server resource utilization: Keep an eye on server-level metrics such as CPU usage, memory usage, and disk I/O to ensure efficient resource allocation and prevent resource bottlenecks.

These key metrics provide insights into the performance, reliability, and user experience of your Django application. Monitoring them helps you proactively identify and resolve issues, optimize application performance, and ensure that your Django application meets the needs of your users effectively.

Here are some best practices to monitor applications in Django:

Implement Logging:
Use Python's built-in logging module to log important events, warnings, and errors. Logging is essential for understanding the flow of your application and identifying issues.

Enable Django's debug mode with caution:
Use Django's debug mode during development for detailed insights, but turn it off in production to avoid exposing sensitive information and potential security risks.

Use a robust error-tracking system:
Implement an error-tracking system to capture and log exceptions in production. This helps quickly identify and address issues as they arise.

Monitor database queries:
Keep an eye on the performance of your database queries. Identifying and optimizing slow queries is crucial for maintaining good application performance.

Set up performance monitoring and profiling:
Utilize APM (Application Performance Monitoring) tools like New Relic to gain insights into overall application performance. 

Establish alerts:
Define alerting thresholds for important metrics and events. Receive notifications when these thresholds are breached, allowing you to proactively address issues before they impact users.

What is Django?

Django is a Python-based free, open-source web framework that follows the model-template-views architectural pattern. The framework enables the rapid development of secure and maintainable websites. It takes away the hassle of web development from developers, and empowers them to focus on writing apps without reinventing the wheel.

New Relic Django quickstart features

The New Relic Django monitoring quickstart has the following features:

  • Dashboard: Our standard dashboard provides a clear overview of transactions and errors. The dashboards also help you track other key indicators like daily transaction errors, comparison between weekly transaction errors, memory heap used, most popular transactions, and more.
  • Alerts: You can get instant alerts on performance metrics like Apdex score, CPU utilization, and transaction error.

Why monitor Django with New Relic?

Proactively monitor Django with New Relic’s Python agent. With an interactive dashboard, you can explore, query, and visualize your data. The quickstart also has three alerts that can detect changes in key metrics:

  • The transaction error alert is triggered when transactions fail more than 10% of the time during a 5-minute period.
  • The high CPU utilization alert is triggered when the CPU utilization is above 90%.
  • Similarly, the Apdex score alert is triggered when the Apdex score is below 0.5 during a period of 5 minutes.

In addition, the New Relic Django integration can automatically add browser monitoring to any HTML page responses for the Django Python web framework. Install the New Relic Django quickstart to instrument Django with New Relic’s Python agent, and track Django’s key metrics in real-time.

Authors
New Relic
Support
BUILT BY NEW RELIC
Need help? Visit our Support Center or check out our community forum, the Explorers Hub.
Collaborate on this quickstart

Get started today for free.

New Relic Now New capabilities announced at our online event.
Register Now