Application Metrics are the indicators used to evaluate the performance and efficiency of your application. It can be enabled in the Devtron platform to see your application's metrics.
- CPU usage: Overall CPU utilization per pod and aggregated.
- Memory Usage: Overall memory utilization per pod and aggregated.
- Throughput: Number of requests processed per minute.
- Latency: Delay between request and response, measured in percentiles.
{% hint style="warning" %}
Application metrics will only take effect if your application is deployed using Devtron Deployment Charts and not Custom Deployment Charts {% endhint %}
-
Install Grafana Dashboard:
To use the Grafana dashboard, you need to first install the integration from the Devtron Stack Manager.
-
Install Prometheus:
Go to the Chart Store and search for
prometheus
. Use the Prometheus community'skube-prometheus-stack
chart to deploy Prometheus.After selecting the chart, configure these values as needed before deployment.
kube-state-metrics: metricLabelsAllowlist: - pods=[*]
Search for the above parameters, and update them as shown (or customize as needed).
-
Enable
upgradeJob
parameter to install CRDs:Since Helm does not automatically apply CRDs, you need to enable the
upgradeJob
parameter in the Helm chart to ensure CRDs are applied before deploying Prometheus. -
Setup Prometheus Endpoint:
Once Prometheus is installed, go to its App Details and navigate to Networking → Service in the K8s resources. Expand the Prometheus server service to see the endpoints.
Copy the URL of the
kube-prometheus
service as shown in the image below.To set Prometheus as a data source in Grafana, navigate to Global Configurations → Clusters & Environments, select your cluster, and edit its settings.
Now to set up the Prometheus endpoint:
-
Enable the
See metrics for applications in this cluster
option, as shown in the image below. -
Paste the copied URL into the Prometheus endpoint field, ensuring it includes
http://
-
Click Update Cluster to save the changes.
After adding the endpoint, application metrics will be visible in the Devtron dashboard for all the Devtron apps in the cluster (it may take a few minutes). This includes CPU usage and Memory usage.
-
-
Enable Application Metrics:
To enable Throughput and Latency metrics in Devtron, follow these steps:
- Open your Devtron app.
- Go to Configurations → Base Configurations → Deployment Template.
- Enable Application Metrics in the Deployment Template as shown below and save the changes.
Now, you can track all your application metrics by navigating to Applications and going to the App Details page of your Devtron App as shown below.
{% hint style="warning" %}
You won’t be able to enable the Application Metrics if your environment is Overridden. {% endhint %}