CompCode Academy

Lesson 1 of 4 · Free to read

Session lesson

Profiling, eBPF, Beyla & Hubble

Self-paced phase · ~8–12 focused hours across Lab A/B/C
Audience: Final-year students & early-career engineers
Prerequisites: obs-05-k8s-observability

Why this matters (5 minutes)

Traces point at a slow span. Profiles name the function. eBPF (Beyla) gives a zero-code floor when you cannot rebuild every service tomorrow.

Learning outcomes

  • Capture CPU/memory profiles and read a flamegraph
  • Hunt planted leak / hot path / lock issues with profiles
  • Run Beyla as a zero-code signal source
  • Compare SDK vs eBPF coverage honestly

Shared lab constants

Systemapi (Express) → SNS → SQS → worker → S3 (+ Postgres/Redis from phase 07)
StackGrafana · Prometheus/Mimir · Loki · Tempo · Pyroscope · OTel Collector · Alloy
RuleExtend the same repo every phase — never start a new toy app.

What MNCs do in 2026

Continuous profiling (Pyroscope/Grafana), Beyla for RED/traces without SDKs, and Cilium/Hubble for network flows are common in cloud-native platforms.

Teachable chunks (compressed from days 51–60)

Profiles answer which code

Flamegraphs turn “worker is hot” into a function name you can fix.

eBPF strengths and limits

Great floor for HTTP/gRPC; weak on business spans and some async messaging semantics.

Beyla in practice

DaemonSet/sidecar exporting OTLP — pair with Collector, not instead of policy.

Network flows

Hubble shows drops/latency between pods when apps look “fine.”

Mental model

Watch & learn

Course video

Open on YouTube
Introduction to eBPF with Grafana Beyla — Beyla auto-instrumentation with OTel export — MNC zero-code floor.

Course video

Open on YouTube
eBPF for Observability (CNCF) — What eBPF can and cannot see — zero-code signals vs SDK instrumentation.

Worked example

Plant a CPU hot loop in worker, find it in Pyroscope, fix it, confirm flamegraph cools. Optionally run Beyla against an uninstrumented copy and compare spans to SDK traces.

Hands-on path

Open Exercises next. Complete Lab A → B → C in order. Stretch is optional.

Phase checklist

  • Flamegraph interpreted correctly
  • One performance bug fixed with evidence
  • SDK vs eBPF comparison written

Key takeaways

  • Keep the same order pipeline — depth beats new toy apps
  • Correlate signals before you SSH
  • Write policies and catalogs your future on-call self can use

Credit

Curriculum themes inspired by the public Observability100 course (https://observability100.vercel.app/course/index.html); lessons and labs rewritten for AI-Tutor.


Observability phase lesson — Profiling, eBPF, Beyla & Hubble.

New free lessons and course updates. Unsubscribe from any email.