- The author treats an espresso machine as a distributed system, instrumenting it with OpenTelemetry to debug shot quality issues.
- Challenges include fitting OTLP protobuf on an ESP32, avoiding network I/O blocking the brew control loop, and ensuring clock accuracy via NTP before exporting.
- Derived metrics like puck resistance coefficient of variation are computed on-device to detect channeling without storing full timeseries.
- High-resolution shot curves are achieved using a ring buffer and concatenated protobuf messages to stay within memory limits.
- ClickHouse handles high-cardinality attributes (e.g., unique shot IDs) without TSDB-style explosion, enabling trace-to-metric joins.
- A Home Assistant MQTT receiver is added via a custom OpenTelemetry Collector to ingest house sensor data into the same backend.
- An LLM agent queries ClickHouse with espresso domain knowledge to analyze shots and provide actionable fixes, closing the feedback loop.