Pick a depth. Each prompt opens in your AI pre-loaded with the lesson. Click a row to preview the prompt.
Agent instrumentation is fiddly enough that you want a fast loop, and waiting on a vendor account is the slowest possible start. Everything in this course can be developed against a local stack: a Jaeger container gives you a real waterfall for span topology, a Collector container lets you test redaction and sampling policies, and the console exporter lets you assert on span attributes in a unit test. Working locally is also better pedagogy, because you see the raw gen_ai.* attributes rather than a vendor's interpretation of them — which matters when you later need to know whether a missing field is your instrumentation or their rendering.
The compose file and the assertion pattern. The test is the part worth keeping: agent instrumentation is exactly the kind of thing that silently rots when someone refactors the loop, and a test on span structure catches it.
# docker-compose.telemetry.yml — everything you need, locally.
services:
jaeger:
image: jaegertracing/all-in-one:latest
ports:
- "16686:16686" # UI
- "4317:4317" # OTLP grpc, direct from the SDK
- "4318:4318" # OTLP http
environment:
COLLECTOR_OTLP_ENABLED: "true"
# Optional but worth adding early: you will want to test redaction
# and sampling policies, and those live here.
collector:
image: otel/opentelemetry-collector-contrib:latest
command: ["--config=/etc/otel/config.yaml"]
volumes:
- ./otel-collector.dev.yaml:/etc/otel/config.yaml:ro
ports:
- "14317:4317"
- "8888:8888" # the Collector's own metrics
depends_on: [jaeger]
prometheus:
image: prom/prometheus:latest
ports: ["9090:9090"]
volumes:
- ./prometheus.dev.yml:/etc/prometheus/prometheus.yml:ro
# Run the app against the Collector, and the Collector against Jaeger:
# OTEL_SERVICE_NAME=research-agent \
# OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:14317 \
# OTEL_TRACES_SAMPLER=always_on \
# python agent.py
#
# open http://localhost:16686
#
# Note OTEL_TRACES_SAMPLER=always_on for development. With a 2%
# sampler you will run your agent twenty times wondering why the
# trace is not there — a genuinely common waste of an afternoon.