Python application instance monitoring

Updated at:

After you install a probe for a Python application, Cloud Monitor 2.0 begins collecting performance data. You can view basic monitoring, instance GC, heap memory, and more on the Instance Monitoring page.

View instance monitoring

  1. Log on to the Cloud Monitor 2.0 console, select the target workspace, and in the navigation pane on the left, choose All Functions > Application Observability > Application Monitoring.

  2. On the Application List page, click the name of the target application. In the navigation pane on the left, click Instance Monitoring.

Page overview

Instance monitoring for Python applications is currently supported only in container environments. You must also connect your Python application to Managed Service for Prometheus. For more information, see Container Observability.

  • The quick filter section lets you filter charts and the instance list by cluster and instance.

  • The trend charts section shows CPU/Memory Usage and GC Count trends over a specified time range.

    • Basic Monitoring: CPU Usage and Memory Usage trends over a specified time range.

    • Instance GC: GC activity trend over a specified time range.

    Click the image.png icon to open a dialog box to view metric statistics for a specific period or compare statistics across different dates for the same time period. Click the image.png icon to switch between a bar chart and a trend chart.

  • The instance list section displays metrics including Instance IP, CPU Usage, CPU Request, CPU Limit, CPU Utilization (displays as - if no CPU limit is set), Memory Usage, Memory Request, Memory Limit, Memory Utilization (displays as - if no memory limit is set), Disk Usage, Disk Limit, Disk Utilization (displays as - if no disk limit is set), GC Count, and RED metrics (request rate, error rate, and average latency).

    The instance list supports the following operations:

    • Click an Instance IP or Details in the Actions column to view the instance details. For more information, see Instance details.

    • Click Traces in the Actions column to view the trace details for the instance. For more information, see Trace analysis.

Instance details

Overview

The Overview tab shows the request count, error count, and average latency for the selected operation.

2024-09-11_16-49-48

Runtime monitoring

The runtime monitoring tab tracks the following metrics:

  • Thread count

  • Context switch count

  • GC object count, object allocations, and object frees. Allocations are positive values, and frees are negative values.

  • Gen 2 GC Count: The number of garbage collection runs on the oldest generation of objects (Generation 2).

  • Gen 2 GC Duration: The total time spent on garbage collection of the oldest generation of objects (Generation 2).

Note

2024-09-11_16-50-59

Container monitoring

The Container Monitoring tab shows time-series charts for container-level CPU, memory, disk, load, network traffic, and network packets.

The page has two sections: Overview and Resource. The Overview section shows basic pod information (Namespace, Node Name, Age, Status, Phase, Restart Count), resource configurations (CPU and Memory under Requests and Limits), the Containers table (container name, running status, image, restart count, and resource requests), and Warning Events. The Resource section shows time-series charts such as Memory/Limit (%), Memory Usage, Memory Failcnt, and Network Error(Percent). Use the pod drop-down list at the top to switch pods. In the upper-right corner, you can set the time range and refresh frequency.

Trace analysis

Trace analysis lets you analyze stored, full-fidelity trace data in real time by combining filters and aggregation dimensions. For more information, see Trace analysis. On the Trace Analysis page in the tracing console, you can query span data with a search condition such as serviceName: "mall-gateway". The left panel provides quick filters for Status, Latency, Operation Name, and Host Address. The center of the page shows charts for Call Count, Errors, and Average Latency, followed by a span list with columns such as TraceId, Operation Name, Application Name, Latency, Status, Start Time, and Host Address. Click Details or Logs for more information. The Slow Trace Analysis panel on the right lists the top slow spans, sorted by latency contribution.

References

For more information about application monitoring metrics, see Application Monitoring Metrics.