{"id":32272,"date":"2026-10-06T13:17:28","date_gmt":"2026-10-06T07:47:28","guid":{"rendered":"https:\/\/opstree.com\/blog\/?p=32272"},"modified":"2026-10-06T13:17:28","modified_gmt":"2026-10-06T07:47:28","slug":"grafana-pyroscope-kubernetes","status":"publish","type":"post","link":"https:\/\/opstree.com\/blog\/grafana-pyroscope-kubernetes\/","title":{"rendered":"Kubernetes Application Performance Optimization with Grafana Pyroscope| A Complete Practical Guide"},"content":{"rendered":"<h2 aria-level=\"2\"><b><span data-contrast=\"none\">Introduction<\/span><\/b><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:200,&quot;335559739&quot;:0,&quot;335559740&quot;:276}\">\u00a0<\/span><\/h2>\n<p><span data-contrast=\"auto\">Grafana Pyroscope is a continuous profiling tool that helps monitor and optimize application performance. It continuously collects profiling data from running applications, such as CPU, memory, and execution time, to identify performance bottlenecks. By integrating with Grafana, it provides clear visualizations that help developers and DevOps engineers analyze application performance and troubleshoot issues more efficiently.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<h2 aria-level=\"2\"><b><span data-contrast=\"none\">The Metric Blind Spot: Why Prometheus Isn&#8217;t Enough<\/span><\/b><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:200,&quot;335559739&quot;:0,&quot;335559740&quot;:276}\">\u00a0<\/span><\/h2>\n<p><span data-contrast=\"auto\">Standard monitoring tools like <a href=\"https:\/\/opstree.com\/blog\/prometheus-and-grafana-on-kubernetes\/\" target=\"_blank\" rel=\"noopener\">Prometheus and Grafana<\/a> are excellent at telling you *that* something is wrong high CPU, high memory, elevated latency. What they can&#8217;t tell you is why: which specific function, which line of code, which allocation is responsible.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">That gap is what continuous profiling closes. <\/span><b><span data-contrast=\"auto\">Grafana Pyroscope<\/span><\/b><span data-contrast=\"auto\"> continuously samples running applications and produces function-level, line-level visibility into CPU time and memory allocation turning a vague &#8220;CPU usage is high&#8221; alert into &#8220;this function, at this line, is the cause.&#8221;<\/span><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<div style=\"overflow-x: auto; width: 100%; margin: 25px 0; -webkit-overflow-scrolling: touch;\">\n<table style=\"width: 100%; min-width: 750px; border-collapse: collapse; font-family: Arial,Helvetica,sans-serif; font-size: 14px; line-height: 1.6; color: #374151;\">\n<thead>\n<tr style=\"background: #f5f7fa;\">\n<th style=\"border: 1px solid #ddd; padding: 12px; text-align: left;\">What Metrics Tell You<\/th>\n<th style=\"border: 1px solid #ddd; padding: 12px; text-align: left;\">What Profiling Proves<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">CPU usage is high<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">Which function is consuming the CPU<\/td>\n<\/tr>\n<tr style=\"background: #fafafa;\">\n<td style=\"border: 1px solid #ddd; padding: 12px;\">Memory usage is high<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">Which function is allocating the memory<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">API latency is elevated<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">Which code path is slow, down to the line<\/td>\n<\/tr>\n<tr style=\"background: #fafafa;\">\n<td style=\"border: 1px solid #ddd; padding: 12px;\">Something is wrong<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">Exactly what and where<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h2 aria-level=\"2\"><b><span data-contrast=\"none\">Pyroscope Architecture Diagram<\/span><\/b><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:200,&quot;335559739&quot;:0,&quot;335559740&quot;:276}\">\u00a0<\/span><\/h2>\n<p><span data-contrast=\"auto\">The diagram below shows the overall architecture of Pyroscope and the flow of profiling data from applications to Grafana. It highlights the main components involved in collecting, storing and analyzing profiling data.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-32274 size-large\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/10\/pyroscope_image_4-1024x423.png\" alt=\"\" width=\"1024\" height=\"423\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/10\/pyroscope_image_4-1024x423.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/10\/pyroscope_image_4-300x124.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/10\/pyroscope_image_4-768x317.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/10\/pyroscope_image_4.png 1042w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<h3 aria-level=\"3\"><b><span data-contrast=\"none\">Architecture Flow<\/span><\/b><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:200,&quot;335559739&quot;:0,&quot;335559740&quot;:276}\">\u00a0<\/span><\/h3>\n<ol>\n<li><span data-contrast=\"auto\">Applications generate profiling data.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/li>\n<li><span data-contrast=\"auto\">The Profile Collection Layer collects and sends the data to the Pyroscope Server.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/li>\n<li><span data-contrast=\"auto\">The Pyroscope Server stores and processes the profiling data.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/li>\n<li><span data-contrast=\"auto\">Grafana displays the profiles for analysis by Developers and DevOps engineers.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/li>\n<\/ol>\n<div style=\"border: 1px solid #d1d5db; padding: 16px; margin: 20px 0; background-color: #f0f4f8;\">\n<p style=\"margin: 0; font-weight: 600; font-size: 16px;\">Also Read: <a href=\"https:\/\/opstree.com\/blog\/enterprise-data-pipelines-fail-at-scale\/\" target=\"_blank\" rel=\"noopener\">Why Enterprise Data Pipelines Fail at Scale and How to Build Reliable Data Engineering<\/a><\/p>\n<\/div>\n<h2 aria-level=\"2\"><b><span data-contrast=\"none\">Instrumentation Methods<\/span><\/b><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:200,&quot;335559739&quot;:0,&quot;335559740&quot;:276}\">\u00a0<\/span><\/h2>\n<p><span data-contrast=\"auto\">Pyroscope supports multiple methods to collect profiling data. The collection method depends on your application and deployment environment<\/span><\/p>\n<div style=\"overflow-x: auto; width: 100%; margin: 25px 0; -webkit-overflow-scrolling: touch;\">\n<table style=\"width: 100%; min-width: 800px; border-collapse: collapse; font-family: Arial,Helvetica,sans-serif; font-size: 14px; line-height: 1.6; color: #374151;\">\n<thead>\n<tr style=\"background: #f5f7fa;\">\n<th style=\"border: 1px solid #ddd; padding: 12px; text-align: left;\">Method<\/th>\n<th style=\"border: 1px solid #ddd; padding: 12px; text-align: left;\">How It Works<\/th>\n<th style=\"border: 1px solid #ddd; padding: 12px; text-align: left;\">Best For<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">SDK-Based (Push Model)<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">The application uses the Pyroscope SDK to send profiling data directly to the Pyroscope Server.<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">Applications where the SDK can be added.<\/td>\n<\/tr>\n<tr style=\"background: #fafafa;\">\n<td style=\"border: 1px solid #ddd; padding: 12px;\">Grafana Alloy (Pull Model)<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">Grafana Alloy collects profiling data from applications and forwards it to the Pyroscope Server.<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">Kubernetes and centralized profile collection.<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">OpenTelemetry (OTLP)<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">OpenTelemetry collects and exports profiling data to the Pyroscope Server using OTLP.<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">Environments already using OpenTelemetry.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h2 aria-level=\"2\"><b><span data-contrast=\"none\">eBPF vs. SDK: The Memory Trap<\/span><\/b><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:200,&quot;335559739&quot;:0,&quot;335559740&quot;:276}\">\u00a0<\/span><\/h2>\n<ul>\n<li><span data-contrast=\"auto\">Pyroscope supports two profiling methods in Kubernetes: **eBPF (via Grafana Alloy)** and **SDK-based push profiling**.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/li>\n<li><span data-contrast=\"auto\">Choosing the right method is important because the wrong approach can prevent **memory profiling data from being collected**.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/li>\n<\/ul>\n<h3 aria-level=\"3\"><b><span data-contrast=\"none\">The Kernel Boundary Limitation<\/span><\/b><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:200,&quot;335559739&quot;:0,&quot;335559740&quot;:276}\">\u00a0<\/span><\/h3>\n<ul>\n<li><b><span data-contrast=\"auto\">eBPF profiling with Alloy <\/span><\/b><span data-contrast=\"auto\">is easy to deploy because it requires\u00a0 <\/span><b><span data-contrast=\"auto\">no code changes<\/span><\/b><span data-contrast=\"auto\">\u00a0and can cover the entire Kubernetes cluster.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/li>\n<li><span data-contrast=\"auto\">It mainly collects <\/span><b><span data-contrast=\"auto\">CPU profiling data <\/span><\/b><span data-contrast=\"auto\">at the kernel level.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/li>\n<li><span data-contrast=\"auto\">It cannot directly track <\/span><b><span data-contrast=\"auto\">memory usage, lock contention or garbage collection (GC)<\/span><\/b><span data-contrast=\"auto\"> inside the application.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/li>\n<\/ul>\n<div style=\"overflow-x: auto; width: 100%; margin: 25px 0; -webkit-overflow-scrolling: touch;\">\n<table style=\"width: 100%; min-width: 700px; border-collapse: collapse; font-family: Arial,Helvetica,sans-serif; font-size: 14px; line-height: 1.6; color: #374151;\">\n<thead>\n<tr style=\"background: #f5f7fa;\">\n<th style=\"border: 1px solid #ddd; padding: 12px; text-align: left;\">Point<\/th>\n<th style=\"border: 1px solid #ddd; padding: 12px; text-align: left;\">Explanation<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">What eBPF supports<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">CPU profiling only<\/td>\n<\/tr>\n<tr style=\"background: #fafafa;\">\n<td style=\"border: 1px solid #ddd; padding: 12px;\">What eBPF does not support<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">Memory, lock, and contention profiling<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">If your dashboard shows CPU but memory is empty<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">This is expected behavior, not a bug<\/td>\n<\/tr>\n<tr style=\"background: #fafafa;\">\n<td style=\"border: 1px solid #ddd; padding: 12px;\">Can this be fixed with config?<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">No \u2014 this is a fundamental eBPF limitation, not a settings issue.<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">How to get memory profiling<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">Switch to SDK-based (push model) \u2014 requires adding the SDK to the application<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h2 aria-level=\"2\"><b><span data-contrast=\"none\">Implementation<\/span><\/b><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:200,&quot;335559739&quot;:0,&quot;335559740&quot;:276}\">\u00a0<\/span><\/h2>\n<p><span data-contrast=\"auto\">This section covers the steps to set up Pyroscope profiling <\/span><b><span data-contrast=\"auto\">(server + SDK-based application profiling)<\/span><\/b><span data-contrast=\"auto\"> in a Kubernetes environment.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">Prerequisites:<\/span><\/b><\/p>\n<div style=\"overflow-x: auto; width: 100%; margin: 25px 0; -webkit-overflow-scrolling: touch;\">\n<table style=\"width: 100%; min-width: 750px; border-collapse: collapse; font-family: Arial,Helvetica,sans-serif; font-size: 14px; line-height: 1.6; color: #374151;\">\n<thead>\n<tr style=\"background: #f5f7fa;\">\n<th style=\"border: 1px solid #ddd; padding: 12px; text-align: left;\">Requirement<\/th>\n<th style=\"border: 1px solid #ddd; padding: 12px; text-align: left;\">Details<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">Kubernetes cluster<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">A running cluster with kubectl access<\/td>\n<\/tr>\n<tr style=\"background: #fafafa;\">\n<td style=\"border: 1px solid #ddd; padding: 12px;\">Helm<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">Helm v3+ installed (helm version to check)<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">Namespace<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">A namespace to deploy Pyroscope into (e.g. observability) \u2014 can be created automatically during install<\/td>\n<\/tr>\n<tr style=\"background: #fafafa;\">\n<td style=\"border: 1px solid #ddd; padding: 12px;\">Grafana<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">An existing Grafana instance in the cluster (or accessible externally) to visualize profiling data<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">Application access<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">For SDK-based profiling: access to the target application&#8217;s codebase (e.g. REMS) and its requirements.txt \/ equivalent dependency file<\/td>\n<\/tr>\n<tr style=\"background: #fafafa;\">\n<td style=\"border: 1px solid #ddd; padding: 12px;\">Network<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">The application and the Pyroscope server must be able to reach each other over the cluster network<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p><b><span data-contrast=\"auto\">Note:<\/span><\/b><span data-contrast=\"auto\">\u00a0\u00a0 OTel is not a prerequisite for this POC \u2014 the data flow is App SDK \u2192 Pyroscope server directly <\/span><b><span data-contrast=\"auto\">(port 4040)<\/span><\/b><span data-contrast=\"auto\">. No OTel Collector pipeline is involved in between.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p aria-level=\"3\"><b><span data-contrast=\"none\">Chart location:<\/span><\/b><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:200,&quot;335559739&quot;:0,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p><a href=\"https:\/\/github.com\/bhanukumari\/profilling-repo\" target=\"_blank\" rel=\"noopener\"><span data-contrast=\"none\">https:\/\/github.com\/bhanukumari\/profilling-repo<\/span><\/a><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">The chart includes the following files:<\/span><\/b><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<div style=\"overflow-x: auto; width: 100%; margin: 25px 0; -webkit-overflow-scrolling: touch;\">\n<table style=\"width: 100%; min-width: 650px; border-collapse: collapse; font-family: Arial,Helvetica,sans-serif; font-size: 14px; line-height: 1.6; color: #374151;\">\n<thead>\n<tr style=\"background: #f5f7fa;\">\n<th style=\"border: 1px solid #ddd; padding: 12px; text-align: left;\">File<\/th>\n<th style=\"border: 1px solid #ddd; padding: 12px; text-align: left;\">Purpose<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">Chart.yaml<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">Declares the official Grafana Pyroscope chart as a dependency<\/td>\n<\/tr>\n<tr style=\"background: #fafafa;\">\n<td style=\"border: 1px solid #ddd; padding: 12px;\">values.yaml<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">Configuration for the deployment (single-binary mode, resources, persistence, ingress)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p aria-level=\"3\"><b><span data-contrast=\"none\">1. Clone the repo and go to the Pyroscope chart directory<\/span><\/b><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:200,&quot;335559739&quot;:0,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">git clone <\/span><a href=\"https:\/\/github.com\/OT-COE\/o11y.git\" target=\"_blank\" rel=\"noopener\"><span data-contrast=\"none\">https:\/\/github.com\/OT-COE\/o11y.git<\/span><\/a><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">cd o11y\/Installation\/K8s\/charts\/observability\/profiling<\/span><\/b><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p aria-level=\"3\"><b><span data-contrast=\"none\">2. Pull the official Pyroscope chart as a dependency<\/span><\/b><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:200,&quot;335559739&quot;:0,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">helm dependency update<\/span><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p aria-level=\"3\"><b><span data-contrast=\"none\">3. Install into the observability namespace<\/span><\/b><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:200,&quot;335559739&quot;:0,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">helm install pyroscope-server . -n observability &#8211;create-namespace<\/span><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p aria-level=\"3\"><b><span data-contrast=\"none\">4. Verify the pod and service came up<\/span><\/b><\/p>\n<p><span data-contrast=\"auto\">kubectl get pods -n observability | grep pyroscope<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-32273\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/10\/pyroscope_image_1.png\" alt=\"\" width=\"977\" height=\"102\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/10\/pyroscope_image_1.png 977w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/10\/pyroscope_image_1-300x31.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/10\/pyroscope_image_1-768x80.png 768w\" sizes=\"auto, (max-width: 977px) 100vw, 977px\" \/><\/p>\n<p><span class=\"NormalTextRun SpellingErrorV2Themed SCXW43428524 BCX0\">kubectl<\/span><span class=\"NormalTextRun SCXW43428524 BCX0\"> get <\/span><span class=\"NormalTextRun ContextualSpellingAndGrammarErrorV2Themed SCXW43428524 BCX0\">svc\u00a0 &#8211;<\/span><span class=\"NormalTextRun SCXW43428524 BCX0\">n observability | grep <\/span><span class=\"NormalTextRun SpellingErrorV2Themed SCXW43428524 BCX0\">pyroscope<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-32275\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/10\/pyroscope_image_2.png\" alt=\"\" width=\"941\" height=\"113\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/10\/pyroscope_image_2.png 941w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/10\/pyroscope_image_2-300x36.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/10\/pyroscope_image_2-768x92.png 768w\" sizes=\"auto, (max-width: 941px) 100vw, 941px\" \/><\/p>\n<p><span class=\"TextRun SCXW64529158 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW64529158 BCX0\" data-ccp-parastyle=\"heading 3\">Endpoint<\/span><\/span><\/p>\n<p aria-level=\"3\"><b><span data-contrast=\"none\">Any application instrumented with the SDK sends profiles to:<\/span><\/b><\/p>\n<p><span data-contrast=\"none\">http:\/\/pyroscope-server.observability.svc.cluster.local:4040<\/span><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">Note<\/span><\/b><span data-contrast=\"auto\">:\u00a0\u00a0\u00a0 All environment-specific config (resources, ingress, persistence) lives in values.yaml customize the deployment there instead of editing the chart directly.<\/span><\/p>\n<h2 aria-level=\"2\"><b><span data-contrast=\"none\">Enabling Profiling on an Application (SDK-Based, for CPU + Memory)<\/span><\/b><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:200,&quot;335559739&quot;:0,&quot;335559740&quot;:276}\">\u00a0<\/span><\/h2>\n<ul>\n<li><span data-contrast=\"auto\">This is where Pyroscope becomes more than just a deployed tool and starts providing **real profiling insights**.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/li>\n<li><span data-contrast=\"auto\">The basic setup is simple: **install the SDK, initialize it, and start profiling the application**.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/li>\n<li><span data-contrast=\"auto\">You can use it to profile different workloads, such as **CPU-intensive and memory-intensive applications**.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/li>\n<\/ul>\n<p aria-level=\"3\"><b><span data-contrast=\"none\">Step 1: Install the SDK<\/span><\/b><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:200,&quot;335559739&quot;:0,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">pip install pyroscope-io<\/span><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p aria-level=\"3\"><b><span data-contrast=\"none\">Step 2: Create a file named\u00a0 app.py<\/span><\/b><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:200,&quot;335559739&quot;:0,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">Create a new file called app.py in your project and paste the following code into it:<\/span><\/p>\n<div style=\"margin: 20px 0;\">\n<pre style=\"background: #1e1e1e !important; color: #d4d4d4 !important; padding: 18px; border-radius: 8px; overflow-x: auto; font-family: Consolas,'Courier New',monospace; font-size: 14px; line-height: 1.6;\"><code style=\"background: transparent !important; color: inherit !important; padding: 0 !important; margin: 0 !important; border: none !important; box-shadow: none !important;\"># app.py\r\n\r\nimport os\r\nimport time\r\nimport pyroscope\r\n\r\n\r\n# 1. Initialize the SDK \u2014 do this once, at process startup\r\n\r\npyroscope.configure(\r\n    application_name = \"reporting-service.python.app\",\r\n    server_address    = \"http:\/\/pyroscope-server.observability.svc.cluster.local:4040\",\r\n    sample_rate       = 100,             # samples per second\r\n\r\n    # --- CPU profiling ---\r\n    cpu_enabled       = True,            # turn CPU profiling on\r\n    oncpu             = True,            # only count actual CPU time (ignore idle\/wait time)\r\n    gil_only          = True,            # only sample threads holding the GIL (relevant to Python's threading model)\r\n\r\n    # --- Memory profiling ---\r\n    mem_enabled       = True,            # turn memory\/heap profiling on (OFF by default!)\r\n    mem_max_nframe    = 128,             # how many stack frames to capture per allocation\r\n    mem_heap_sample_size = 512 * 1024,   # sample roughly every 512 KB allocated (lower = more detail, more overhead)\r\n\r\n    detect_subprocesses = False,         # set True only if this process spawns child workers you also want profiled\r\n\r\n    tags = {\r\n        \"env\":     os.getenv(\"ENV\", \"poc\"),\r\n        \"region\":  \"in-noida\",\r\n    },\r\n)\r\n\r\n\r\n# 2. A CPU-heavy function \u2014 tag it so it's filterable in Grafana\r\n\r\ndef cpu_intensive_task(n=2_000_000):\r\n    with pyroscope.tag_wrapper({\"workload\": \"cpu_bound\"}):\r\n        total = 0\r\n        for i in range(n):\r\n            total += i * i\r\n        return total\r\n\r\n\r\n# 3. A memory-heavy function \u2014 allocates and holds a large list\r\n\r\ndef memory_intensive_task(size_mb=50):\r\n    with pyroscope.tag_wrapper({\"workload\": \"memory_bound\"}):\r\n        # roughly size_mb worth of integers\r\n        data = [0] * (size_mb * 1_000_000 \/\/ 8)\r\n\r\n        time.sleep(2)   # hold the allocation so it's visible in a sample window\r\n\r\n        return len(data)\r\n\r\n\r\nif __name__ == \"__main__\":\r\n    while True:\r\n        cpu_intensive_task()\r\n        memory_intensive_task()\r\n        time.sleep(1)<\/code><\/pre>\n<\/div>\n<p aria-level=\"3\"><b><span data-contrast=\"none\">What the Code Is Doing<\/span><\/b><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;134245418&quot;:true,&quot;134245529&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:200,&quot;335559739&quot;:0,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<ul>\n<li><b><span data-contrast=\"auto\">pyroscope.configure(&#8230;)\u00a0 <\/span><\/b><span data-contrast=\"auto\">\u2014 Runs once when the application starts. It defines the Pyroscope server address and the application name shown in Grafana.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/li>\n<li><b><span data-contrast=\"auto\">cpu_enabled<\/span><\/b><span data-contrast=\"auto\">=True\u00a0 \u2014 Enables CPU profiling.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/li>\n<li><b><span data-contrast=\"auto\">mem_enabled<\/span><\/b><span data-contrast=\"auto\">=True\u00a0 \u2014 Enables memory profiling. It is disabled by default, so it must be enabled explicitly.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/li>\n<li><b><span data-contrast=\"auto\">cpu_intensive_task()\u00a0<\/span><\/b><span data-contrast=\"auto\"> \u2014 Runs a CPU-heavy loop to generate CPU profiling data.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/li>\n<li><b><span data-contrast=\"auto\">memory_intensive_task()\u00a0 <\/span><\/b><span data-contrast=\"auto\">\u2014 Allocates a large amount of memory to generate memory profiling data.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/li>\n<li><b><span data-contrast=\"auto\">tag_wrapper({\u2026})\u00a0 <\/span><\/b><span data-contrast=\"auto\">\u2014 Adds labels to the profiling data, making it easier to identify and filter CPU and memory workloads in Grafana.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/li>\n<li><b><span data-contrast=\"auto\">while True loop\u00a0<\/span><\/b><span data-contrast=\"auto\"> \u2014 Continuously runs both functions so that profiling data is collected and sent to Pyroscope continuously.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/li>\n<\/ul>\n<p><b><span data-contrast=\"auto\">What this achieves:<\/span><\/b> <b><span data-contrast=\"auto\">a running Python app that automatically sends its own CPU and memory usage to the Pyroscope server \u2014 no manual steps needed.<\/span><\/b><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">Step 3: Run it<\/span><\/b><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">PYROSCOPE_SERVER_ADDRESS=http:\/\/pyroscope-server.observability.svc.cluster.local:4040 python app.py<\/span><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">Note:<\/span><\/b><span data-contrast=\"auto\"> mem_enabled=True is what actually turns memory profiling on\u00a0 it&#8217;s easy to assume the SDK captures memory automatically just by being installed, but it doesn&#8217;t. Always cross-check against the <\/span><b><span data-contrast=\"auto\">Pyroscope Python SDK config reference<\/span><\/b><span data-contrast=\"auto\"> for the version pinned in your <\/span><b><span data-contrast=\"auto\">requirements.txt,<\/span><\/b><span data-contrast=\"auto\"> since default values have changed across SDK releases.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p><b><span data-contrast=\"auto\">Step 4: Verify the Profiling Data in Grafana<\/span><\/b><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">5. Open Grafana and navigate to <\/span><b><span data-contrast=\"auto\">Explore<\/span><\/b><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">6. Select the **<\/span><b><span data-contrast=\"auto\">Pyroscope<\/span><\/b><span data-contrast=\"auto\">** data source.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">7. Choose the required profile type, such as: **<\/span><b><span data-contrast=\"auto\">process_cpu\\:cpu , memory\\:alloc_space<\/span><\/b><span data-contrast=\"auto\">**<\/span><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">8. Filter the profiles using your application name **(<\/span><b><span data-contrast=\"auto\">for example, {service_name=&#8221;\\&lt;service-name&gt;&#8221;})<\/span><\/b><span data-contrast=\"auto\">.**<\/span><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">9. Confirm that CPU and memory profiling data is available and that flame graphs are displayed for the selected application.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">10. Verify the Profiling Data in Grafana like this :<\/span><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-32277\" src=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/10\/pyroscope_image_3-1024x467.png\" alt=\"\" width=\"1024\" height=\"467\" srcset=\"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/10\/pyroscope_image_3-1024x467.png 1024w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/10\/pyroscope_image_3-300x137.png 300w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/10\/pyroscope_image_3-768x350.png 768w, https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/10\/pyroscope_image_3.png 1203w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p><span class=\"TextRun SCXW16373227 BCX0\" lang=\"EN-US\" xml:lang=\"EN-US\" data-contrast=\"none\"><span class=\"NormalTextRun SCXW16373227 BCX0\" data-ccp-parastyle=\"heading 3\">Validation Checklist<\/span><\/span><\/p>\n<div style=\"overflow-x: auto; width: 100%; margin: 25px 0; -webkit-overflow-scrolling: touch;\">\n<table style=\"width: 100%; min-width: 900px; border-collapse: collapse; font-family: Arial,Helvetica,sans-serif; font-size: 14px; line-height: 1.6; color: #374151;\">\n<thead>\n<tr style=\"background: #f5f7fa;\">\n<th style=\"border: 1px solid #ddd; padding: 12px; text-align: left;\">Validation Check<\/th>\n<th style=\"border: 1px solid #ddd; padding: 12px; text-align: left;\">Verification Method<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">Pyroscope server is running<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">Run <code>kubectl get pods -n observability<\/code> and verify that the Pyroscope server pods are in the Running state.<\/td>\n<\/tr>\n<tr style=\"background: #fafafa;\">\n<td style=\"border: 1px solid #ddd; padding: 12px;\">Pyroscope service is reachable<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">Run <code>kubectl get svc -n observability<\/code> and confirm that the pyroscope-server service is available and exposed on port 4040.<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">Application is sending profiling data<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">In Grafana Explore, query the application using <code>{service_name=\"&lt;service-name&gt;\"}<\/code> and verify that profiling samples are returned.<\/td>\n<\/tr>\n<tr style=\"background: #fafafa;\">\n<td style=\"border: 1px solid #ddd; padding: 12px;\">CPU profiling data is available<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">Select the process_cpu:cpu profile type in Grafana Explore and confirm that CPU flame graphs and function-level profiling data are displayed.<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">Memory profiling data is available (SDK-based profiling)<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">Select the memory:alloc_space profile type and verify that memory flame graphs and function-level profiling data are displayed.<\/td>\n<\/tr>\n<tr style=\"background: #fafafa;\">\n<td style=\"border: 1px solid #ddd; padding: 12px;\">Profiling data is valid<\/td>\n<td style=\"border: 1px solid #ddd; padding: 12px;\">Verify that the CPU and memory flame graphs reflect the application&#8217;s expected behavior (for example, functions performing heavier operations consume more CPU time or allocate more memory).<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h2 aria-level=\"2\">Best Practices<\/h2>\n<p><span data-contrast=\"auto\">Follow these best practices to get accurate profiling data and maintain good application performance.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/p>\n<ul>\n<li><span data-contrast=\"auto\">Enable profiling only for the required applications and services.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/li>\n<li><span data-contrast=\"auto\">Review profiling data regularly to identify performance bottlenecks.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/li>\n<li><span data-contrast=\"auto\">Use Grafana dashboards to monitor and analyze profiling data.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/li>\n<li><span data-contrast=\"auto\">Monitor CPU and memory profiles periodically.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/li>\n<li><span data-contrast=\"auto\">Use continuous profiling for production workloads.<\/span><span data-ccp-props=\"{&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/li>\n<li><span data-contrast=\"auto\">Keep profiling configurations consistent across all environments.<\/span><span data-ccp-props=\"{&quot;134233279&quot;:true,&quot;134245417&quot;:true,&quot;201341983&quot;:0,&quot;335551550&quot;:1,&quot;335551620&quot;:1,&quot;335559738&quot;:0,&quot;335559739&quot;:200,&quot;335559740&quot;:276}\">\u00a0<\/span><\/li>\n<\/ul>\n<h2><span data-ccp-props=\"{}\">Related Searches<\/span><\/h2>\n<ul>\n<li><a href=\"https:\/\/opstree.com\/blog\/leading-telecom-enterprise-transformed-enterprise-analytics-fractal-gpt\/\" target=\"_blank\" rel=\"noopener\">How Leading Telecom Enterprise Transformed Enterprise Analytics with Fractal GPT<\/a><\/li>\n<li><a href=\"https:\/\/opstree.com\/blog\/real-time-banking-ai-mule-detection-confluent\/\" target=\"_blank\" rel=\"noopener\">Real-Time Banking Data And AI-Powered Mule Detection with Confluent Platform<\/a><\/li>\n<li><a href=\"https:\/\/opstree.com\/blog\/data-integration-with-azure-event\/\" target=\"_blank\" rel=\"noopener\">Modernizing Healthcare Data Integration with Azure Event Hubs \u2013 OpsTree<\/a><\/li>\n<li><a href=\"https:\/\/opstree.com\/blog\/supervisor-process-monitoring-with-open-telemetry\/\" target=\"_blank\" rel=\"noopener\">Implementing Supervisor Process Monitoring with Open Telemetry<\/a><\/li>\n<\/ul>\n<h2>Related Solutions<\/h2>\n<ul>\n<li><a href=\"https:\/\/opstree.com\/services\/database-and-data-engineering\/\" target=\"_blank\" rel=\"noopener\">Cloud-native data warehouse optimization<\/a><\/li>\n<li><a href=\"https:\/\/opstree.com\/services\/cloud-migration-and-modernization-services\/\" target=\"_blank\" rel=\"noopener\">Cloud security posture management implementation<\/a><\/li>\n<li><a href=\"https:\/\/opstree.com\/services\/devops-and-devsecops-services\/\" target=\"_blank\" rel=\"noopener\">Zero Trust readiness assessment<\/a><\/li>\n<li><a href=\"https:\/\/opstree.com\/services\/cloud-migration-and-modernization-services\/\" target=\"_blank\" rel=\"noopener\">Enterprise Cloud FinOps Implementation Services<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Introduction\u00a0 Grafana Pyroscope is a continuous profiling tool that helps monitor and optimize application performance. It continuously collects profiling data from running applications, such as CPU, memory, and execution time, to identify performance bottlenecks. By integrating with Grafana, it provides clear visualizations that help developers and DevOps engineers analyze application performance and troubleshoot issues more [&hellip;]<\/p>\n","protected":false},"author":241065127,"featured_media":32278,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[46713213],"tags":[768739750,768739751,768739747,768739749,768739746,768739748,768739752],"class_list":["post-32272","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-kubernetes","tag-application-performance-profiling","tag-cpu-profiling","tag-grafana-pyroscope","tag-grafana-pyroscope-kubernetes","tag-kubernetes-application-performance-optimization","tag-kubernetes-continuous-profiling","tag-memory-profiling"],"blocksy_meta":[],"jetpack_publicize_connections":[],"acf":[],"jetpack_featured_media_url":"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2026\/10\/Kubernetes-Performance-Optimization-Guide.webp","jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pfDBOm-8ow","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts\/32272","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/users\/241065127"}],"replies":[{"embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/comments?post=32272"}],"version-history":[{"count":2,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts\/32272\/revisions"}],"predecessor-version":[{"id":32280,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts\/32272\/revisions\/32280"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/media\/32278"}],"wp:attachment":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/media?parent=32272"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/categories?post=32272"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/tags?post=32272"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}