RousselTMLEARNING

Article · Alloy: From Discovery to Expertise

Continuous Profiling

1. Introduction to continuous profiling #

Continuous profiling with Pyroscope.

The fourth signal #

Available in: ✓ OSS ✓ Enterprise ✓ Cloud

Metrics say that the service consumes too much, traces say where the request loses time, and profiles say which function is responsible. A profile samples what the program does: call stack on the CPU, memory allocations, goroutines.

SignalQuestionExample answer
MetricIs there a problem?CPU at 90%
TraceWhich step is slow?Cart calculation: 800 ms
ProfileWhich line of code?calculTVA(): 60% of CPU

Why “continuous”? #

Classic profiling is started by hand once the problem is spotted, and it is often too late to reproduce it. Continuous profiling records all the time, with low overhead. You can then compare yesterday's version with today's, or examine an incident from last night.

Profile types #

TypeMeasuresTo find
CPUTime spent per functionExpensive computations, loops
Memory (allocations)What gets allocatedGarbage collector pressure
Memory (in use)What stays in memoryLeaks
Goroutines, threadsCount and stacksDeadlocks, goroutine leaks
Mutex, blockWaiting timeContention

Reading a flame graph #

Pyroscope displays profiles as a flame graph: each rectangle is a function, its width shows its share of the total. Look for wide rectangles: those are the ones to optimize. The horizontal axis is not time.

Pyroscope is the successor to Grafana Phlare. See the dedicated Grafana Pyroscope course to go further.

📄 Grafana Alloy: Continuous Profiling with Pyroscope →

My progress

  • ⏱ Estimated time : ≈ 3 min

Sign in to track your progress and take notes. Sign in

⭐ Rate this lesson

5.0 initial rating from the teaching team

Sign in to rate this lesson →

💬 Recent discussions about this course

Ask a question about this lesson →See all discussions about this course

Course Glossary

Grafana Alloy

An open-source, vendor-neutral telemetry collector designed to replace Grafana Agent, fully compatible with OpenTelemetry (OTel).

Recommended Articles

Continuous profiling with Grafana Pyroscope: why and how

The fourth signal of observability: what continuous profiling is, profile types (CPU, memory, loc...

Profiles, OpenTelemetry's fourth signal: continuous profiling and correlation with traces

Understand OpenTelemetry's new profile signal: continuous profiling, flame graphs, data model and...

Continuous profiling with eBPF: Parca, Pyroscope and the OpenTelemetry profiler

Continuously profile every process on a host with eBPF: principle, Parca and parca-agent, Pyrosco...

Grafana Pyroscope best practices: collection, labels, analysis and costs

Production checklist for continuous profiling with Pyroscope: choosing the collection mode, label...

Linking traces and profiles: span profiles with Tempo and Pyroscope

Go from a slow trace to the exact CPU profile of that span: span profiles in Go and Java, configu...

Grafana Alloy: The importance of Self-Monitoring

Discover why and how to configure Grafana Alloy so that it monitors itself, collecting its own lo...

The LGTM stack (Loki, Grafana, Tempo, Mimir): architecture and setup

Grafana Labs' LGTM stack: Loki for logs, Grafana for visualization, Tempo for traces, Mimir for m...

Grafana Alloy: collecting system metrics and local logs

Learn how to configure Grafana Alloy to monitor the server it runs on, with a focus on configurat...

Grafana Alloy: collecting and transforming telemetry

Learn how to use Grafana Alloy to collect, transform and route logs, metrics and traces. Discover...

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!