Continuous profiling has evolved from a managed-language exclusive practice to a universal observability signal through eBPF technology. This approach enables sampling-based performance monitoring of native code applications in production with minimal overhead (within a few percentage points). The article demonstrates profiling DuckDB and PostgreSQL using Grafana Alloy and OpenTelemetry Collector, showing how teams can identify CPU-intensive functions and optimization targets without code changes. Key benefits include proactive issue detection, differential performance analysis, cost savings in cloud environments, and uncovering unknown performance bottlenecks that traditional instrumentation might miss.
Table of contents
Benefits of continuous profilingContinuous profiling for native codeA step-by-step example: profiling CPU usage of a native, off-the-shelf applicationWrapping upSort: