|
| 1 | +# Observability |
| 2 | + |
| 3 | +Platform Mesh provides telemetry collection infrastructure to help operators monitor the health and performance of their Platform Mesh installation. The observability architecture separates collection from storage, giving operators flexibility to integrate with their existing monitoring systems. |
| 4 | + |
| 5 | +## Collection vs. storage |
| 6 | + |
| 7 | +Platform Mesh takes an opinionated approach to observability: it owns the collection side but leaves storage to operators. |
| 8 | + |
| 9 | +**Platform Mesh provides:** |
| 10 | + |
| 11 | +- ServiceMonitors that define what metrics to scrape from each component |
| 12 | +- An OpenTelemetry Collector that aggregates metrics and traces |
| 13 | +- A Target Allocator that discovers scrape targets |
| 14 | +- Prometheus remote write and OTLP exporters for forwarding telemetry |
| 15 | + |
| 16 | +**Operators provide:** |
| 17 | + |
| 18 | +- A metrics backend (Prometheus, Thanos, Mimir, Cortex, or a cloud provider solution) |
| 19 | +- A trace backend (Jaeger, Tempo, or any OTLP-compatible system) |
| 20 | +- Long-term storage and retention policies |
| 21 | +- Alerting rules and notification channels |
| 22 | +- Dashboards and visualization |
| 23 | + |
| 24 | +This separation exists for several reasons: |
| 25 | + |
| 26 | +1. **Enterprise integration** – Most organizations already have monitoring infrastructure. Platform Mesh integrates with what exists rather than requiring a parallel stack. |
| 27 | + |
| 28 | +2. **Flexibility** – Operators choose their storage backend, retention policies, and high-availability setup based on their requirements. |
| 29 | + |
| 30 | +3. **Resource efficiency** – Running a production-grade metrics backend requires significant resources. Operators can share infrastructure across multiple Platform Mesh installations or other workloads. |
| 31 | + |
| 32 | +4. **Operational ownership** – Metrics storage, backup, and scaling are operational concerns that belong with the team running the infrastructure. |
| 33 | + |
| 34 | +For development and testing, Platform Mesh includes a bundled Prometheus instance for metrics. This instance is configured for convenience, not production use – it has no persistent storage by default and is not configured for high availability. |
| 35 | + |
| 36 | +## What Platform Mesh collects |
| 37 | + |
| 38 | +Platform Mesh collects telemetry from its core components: |
| 39 | + |
| 40 | +### Metrics |
| 41 | + |
| 42 | +Platform Mesh scrapes Prometheus-format metrics from four categories of components: |
| 43 | + |
| 44 | +**Control plane metrics** – The kcp control plane exposes metrics about workspace operations, API request handling, and internal state. These help operators understand control plane load and identify performance bottlenecks. Scraping kcp requires client certificate authentication, which the observability stack handles automatically. |
| 45 | + |
| 46 | +**Operator metrics** – The account-operator and security-operator expose standard controller-runtime metrics, including reconciliation counts, queue depths, and error rates. |
| 47 | + |
| 48 | +**Authorization metrics** – OpenFGA exposes metrics about authorization check latency, cache hit rates, and store operations. |
| 49 | + |
| 50 | +### Traces |
| 51 | + |
| 52 | +Platform Mesh components can emit distributed traces via OTLP (OpenTelemetry Protocol). Traces help operators debug request flows across components and identify latency bottlenecks. |
| 53 | + |
| 54 | +Tracing is disabled by default and must be enabled per-component. When enabled, components send spans to the OpenTelemetry Collector, which forwards them to the configured trace backend. |
| 55 | + |
| 56 | +### What is not collected |
| 57 | + |
| 58 | +Platform Mesh does not currently collect: |
| 59 | + |
| 60 | +- Application-level metrics from provider workloads |
| 61 | +- Network traffic metrics |
| 62 | +- Resource usage metrics (CPU, memory) – these come from standard Kubernetes monitoring |
| 63 | + |
| 64 | +## OpenTelemetry architecture |
| 65 | + |
| 66 | +Platform Mesh uses OpenTelemetry as its telemetry collection framework. OpenTelemetry provides a vendor-neutral way to collect, process, and export metrics and traces. |
| 67 | + |
| 68 | +### OpenTelemetry Operator |
| 69 | + |
| 70 | +The OpenTelemetry Operator manages collector instances declaratively. It handles collector deployment, configuration updates, and scaling. The operator also manages the Target Allocator that distributes scrape targets across collector replicas. |
| 71 | + |
| 72 | +### Target Allocator |
| 73 | + |
| 74 | +The Target Allocator watches ServiceMonitor resources and discovers scrape targets. It distributes targets across collector replicas to balance load and avoid duplicate scraping. This approach scales better than static scrape configurations as the number of targets grows. |
| 75 | + |
| 76 | +### Collector as aggregation point |
| 77 | + |
| 78 | +The OpenTelemetry Collector serves as the central aggregation point for all telemetry: |
| 79 | + |
| 80 | +- **Metrics** – The collector scrapes Prometheus endpoints (via Target Allocator), batches metrics, and forwards them via Prometheus remote write. |
| 81 | +- **Traces** – The collector receives spans via OTLP from instrumented components, batches them, and forwards to trace backends. |
| 82 | + |
| 83 | +Batching reduces network overhead when sending telemetry to remote backends. The collector can also perform filtering, relabeling, and other transformations before forwarding. |
| 84 | + |
| 85 | +## Integration patterns |
| 86 | + |
| 87 | +Operators typically integrate Platform Mesh telemetry using these patterns: |
| 88 | + |
| 89 | +### Metrics: Prometheus remote write |
| 90 | + |
| 91 | +The most common pattern – configure the OTel Collector to forward metrics to a Prometheus-compatible backend via the remote write API. This works with: |
| 92 | + |
| 93 | +- Self-hosted Prometheus with remote write receiver enabled |
| 94 | +- Thanos Receive |
| 95 | +- Grafana Mimir |
| 96 | +- Cortex |
| 97 | +- Cloud provider managed services (Amazon Managed Prometheus, Google Cloud Managed Prometheus, Azure Monitor) |
| 98 | + |
| 99 | +### Traces: OTLP export |
| 100 | + |
| 101 | +Configure the OTel Collector to forward traces to any OTLP-compatible backend: |
| 102 | + |
| 103 | +- Jaeger |
| 104 | +- Grafana Tempo |
| 105 | +- Honeycomb |
| 106 | +- Lightstep |
| 107 | +- Cloud provider tracing services |
| 108 | + |
| 109 | +### Metrics: Federation |
| 110 | + |
| 111 | +If your existing Prometheus cannot receive remote writes, configure it to federate metrics from the bundled development Prometheus. This pattern is less efficient but works with older Prometheus setups. |
| 112 | + |
| 113 | +### Metrics: Direct scraping |
| 114 | + |
| 115 | +For maximum control, configure your existing Prometheus to scrape Platform Mesh component endpoints directly. The ServiceMonitors in the observability namespace document available targets and authentication requirements. This bypasses the OTel Collector entirely. |
| 116 | + |
| 117 | +## Related |
| 118 | + |
| 119 | +- [Observability reference](/reference/components/observability.md) |
| 120 | +- [Access the observability stack](/how-to-guides/access-observability.md) |
| 121 | +- [Architecture](/concepts/architecture.md) |
0 commit comments