CompCode Academy

Lesson 2 of 4 · Free to read

Exercises

Exercises — Profiling, eBPF, Beyla & Hubble

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.

Keep a lab notebook: hypothesis → command → result. Speed without evidence is not a skill.

How to use this file

  • Work Lab A → B → C on the same orders-lab repo
  • Prefer Docker Desktop; use Kind when the lab says so
  • Definition of Done at the bottom is the phase gate

Lab A — First flamegraph

Time: 45–60 min
Goal: Pyroscope shows worker CPU profile under load.

Setup

Pyroscope in stack; load generator.

Steps

  1. Enable profiling export from worker or Alloy pull.
  2. Generate CPU load.
  3. Open flamegraph; identify top frames.

Success criteria

  • Flamegraph captured with readable frames

If stuck

No data? Check scrape interval and that the process exposes pprof/Pyroscope agent.


Lab B — Hunt a planted bug

Time: 60–90 min
Goal: Find and fix a leak or hot path using profiles + traces.

Setup

Intentionally buggy worker branch.

Steps

  1. Reproduce with steady traffic.
  2. Correlate slow Tempo span with Pyroscope hotspot.
  3. Fix and re-measure.

Success criteria

  • Before/after profiles saved
  • Latency improved

If stuck

Always compare same load script before/after.


Lab C — Beyla zero-code floor

Time: 45–60 min
Goal: See RED/traces without SDK on a throwaway service.

Setup

Kind + Beyla DaemonSet or compose sidecar.

Steps

  1. Deploy Beyla targeting your api labels.
  2. Export OTLP to Collector.
  3. Write a comparison table: SDK vs Beyla coverage for SNS→SQS.

Success criteria

  • Beyla signals visible
  • Honest gap table committed

If stuck

Kernel/permissions issues are common on Docker Desktop — document what you could/couldn’t run.


Stretch goals

  • Explore Hubble flows for worker → LocalStack path

Definition of Done

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

Exercises — Profiling, eBPF, Beyla & Hubble.

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