03 — Example Lesson#
A complete minimal lesson that stitches all block types together. This page is the pattern to copy when building your first real lesson. Every block is live and runnable.
Scenario: "Verify the TODO Application is Instrumented with Dynatrace" — a realistic lesson that walks a learner through deploying OneAgent, restarting the app, and confirming observability is active.
Example: Verify Application Observability#
In this example lesson, you will deploy the Dynatrace Operator, instrument the TODO application, and confirm that Dynatrace is collecting data from your cluster.
Before you start
Click Start Environment in the status bar above to provision your live environment. The checks below will not be active until the environment is ready.
1. Deploy the Dynatrace Operator (Helm)#
Open the Terminal tab and run these three commands:
kubectl create namespace dynatrace
helm repo add dynatrace \
https://raw.githubusercontent.com/Dynatrace/dynatrace-operator/main/config/helm/repos/stable
helm repo update
helm install dynatrace-operator dynatrace/dynatrace-operator \
-n dynatrace
Wait a few seconds, then click Check Operator below.
2. Apply the DynaKube#
The STEP_SETUP at the top of this page already ran dynatraceEvalReadSaveCredentials && generateDynakube, which created .devcontainer/yaml/gen/dynakube.yaml from your tenant credentials. Apply it now:
Then monitor progress:
Open the Kubernetes app to see your cluster topology:
dt-app|dynatrace.kubernetes|Open Kubernetes App
3. Restart the Application#
The TODO application was running before the Dynatrace webhook was deployed. Restart it so the webhook can inject OneAgent:
kubectl rollout restart deployment -n todoapp
kubectl rollout status deployment -n todoapp --timeout=120s
4. Call a Custom Helper Function#
This template includes an example custom function. In your own training, you would add functions to .devcontainer/util/my_functions.sh for scenario setup, fault injection, or environment manipulation.
Open the Terminal tab and run:
Expected output: a section header and a math result (1 + 1 = 2).
5. Verify Observability in Dynatrace (DQL)#
Generate some log data by interacting with the TODO application in the Apps tab. Add a new TODO item, then wait 1–2 minutes for Dynatrace to ingest the logs.
Open Notebooks in Dynatrace and run this query to explore your logs:
fetch logs
| filter k8s.namespace.name == "todoapp"
| filter contains(content, "Adding a new todo: ")
| filter timestamp > now() - 10m
| limit 5
Then validate with the button below:
Explore your services:
dt-app|dynatrace.services|Open Services App
6. Knowledge Assessment#
Answer these questions to complete the example lesson:
Example lesson complete!
You have seen every interactive block type working end-to-end. Use 03-example-lesson.md as your starting pattern when building real lessons.