# OpenTelemetry trace lab This small, profile-independent lab is managed by `./jeannie apps` through Argo CD in the existing `monitoring` namespace. It adds a single OpenTelemetry Collector, a single Tempo server, a Grafana `Tempo Lab` datasource, and a five-minute synthetic trace job. Existing Prometheus and Loki are unchanged. The path is **synthetic trace job → OTLP/HTTP collector → OTLP/gRPC Tempo → Grafana Explore**. The job emits a parent span and child span for two simulated services; it does not make real service calls or use the OpenTelemetry SDK. This isolates the first lesson—trace IDs, span IDs, parent/child relationships, collection and storage. The next step is instrumenting real applications. Tempo stores traces in a size-limited `emptyDir`. Traces are disposable and disappear when the Tempo pod is replaced or the node is lost; this is not a backup or production storage. Retention is at most 24 hours while the pod and its local volume survive, subject to the storage limit. The lab adds workload resource requests and image pulls on every cluster profile. Neither endpoint is published as an Ingress or NodePort; cluster-internal OTLP is unauthenticated and unencrypted, so send only non-sensitive learning data. After pushing the repository changes, on Debian select the intended profile and apply the apps pipeline: ```bash cd ~/my-homelab-configs git pull --ff-only gitea main ./jeannie cluster-profile select k3s ./jeannie apps ``` Use `debian` or `pimox` instead of `k3s` when that profile is your intended active cluster. On Debian, check the workloads and datasource: ```bash kubectl --kubeconfig="$HOME/.kube/opi5-k3s-config" -n monitoring \ get deployment otel-lab-collector otel-lab-tempo kubectl --kubeconfig="$HOME/.kube/opi5-k3s-config" -n monitoring \ get cronjob otel-lab-demo ``` The job runs every five minutes. Open the provisioned **OpenTelemetry Trace Lab** dashboard at `https://grafana.lab2025.duckdns.org/d/otel-lab` to see recent synthetic traces automatically. Select a table row to display its parent and child in the timeline. The dashboard and datasource rely on the Grafana sidecars enabled by the platform chart. For immediate testing, create one job and inspect its trace ID: ```bash kubectl --kubeconfig="$HOME/.kube/opi5-k3s-config" -n monitoring \ create job --from=cronjob/otel-lab-demo otel-lab-demo-manual kubectl --kubeconfig="$HOME/.kube/opi5-k3s-config" -n monitoring \ logs job/otel-lab-demo-manual ``` The printed trace ID can also be entered in the dashboard's **Selected trace** field. A successful generator job confirms the collector accepted the request; check the dashboard as well to establish end-to-end visibility. Manual job names must be unique, or wait for Kubernetes' job TTL to remove the previous one. ConfigMaps are mounted as files; restart the relevant deployment after changing its configuration because these binaries do not automatically reload it.