Skip to content

Commit bfd755c

Browse files
xrstfntnn
authored andcommitted
add basic documentation for observability
Signed-off-by: Christoph Mewes <christoph@kubermatic.com>
1 parent ac83946 commit bfd755c

8 files changed

Lines changed: 410 additions & 0 deletions

File tree

.vitepress/config.mts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ export default withMermaid({
130130
{ text: 'Access the Keycloak admin console', link: '/how-to-guides/access-keycloak' },
131131
{ text: 'Access the OpenFGA playground', link: '/how-to-guides/access-openfga' },
132132
{ text: 'Access the kcp admin workspace', link: '/how-to-guides/access-kcp-admin' },
133+
{ text: 'Access the observability stack', link: '/how-to-guides/access-observability' },
133134
]
134135
},
135136
{
@@ -186,6 +187,12 @@ export default withMermaid({
186187
{ text: 'api-syncagent', link: '/concepts/integration/api-syncagent' },
187188
{ text: 'multicluster-runtime', link: '/concepts/integration/multicluster-runtime' },
188189
]
190+
},
191+
{
192+
text: 'Operations',
193+
items: [
194+
{ text: 'Observability', link: '/concepts/observability' },
195+
]
189196
}
190197
],
191198

@@ -219,6 +226,7 @@ export default withMermaid({
219226
{ text: 'Portal', link: '/reference/components/portal' },
220227
{ text: 'Marketplace', link: '/reference/components/marketplace' },
221228
{ text: 'virtual-workspaces', link: '/reference/components/virtual-workspaces' },
229+
{ text: 'Observability', link: '/reference/components/observability' },
222230
]
223231
},
224232
{

concepts/architecture.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,5 @@ When a consumer creates a resource in their workspace, the resource exists in kc
5252
- [Why Platform Mesh?](./why-platform-mesh.md)
5353
- [Control planes](./control-planes.md)
5454
- [Integration paths](./integration-paths.md)
55+
- [Observability](./observability.md)
5556
- [Component reference](/reference/components/)

concepts/observability.md

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
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)
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
title: Access the observability stack
3+
personas: [platform-owner]
4+
---
5+
6+
# Access the observability stack
7+
8+
The observability stack includes a bundled Prometheus instance for metrics during local development and testing. This guide shows how to access it.
9+
10+
::: warning Local setup only
11+
The bundled Prometheus is intended for development and testing. For production deployments, configure the OpenTelemetry Collector to forward metrics and traces to your existing infrastructure.
12+
:::
13+
14+
## Forward the Prometheus service
15+
16+
```bash
17+
kubectl port-forward -n observability svc/observability-prometheus-server 9090:80
18+
```
19+
20+
## Open the Prometheus UI
21+
22+
Open:
23+
24+
```text
25+
http://localhost:9090
26+
```
27+
28+
The Prometheus UI lets you explore metrics, run queries, and verify that Platform Mesh components are being scraped correctly.
29+
30+
## Explore Platform Mesh metrics
31+
32+
Use the Prometheus expression browser to query metrics. Platform Mesh components expose controller-runtime metrics (for operators) and component-specific metrics.
33+
34+
To verify metrics are being collected, try querying for metrics from Platform Mesh components. For example, search for metrics with prefixes like `controller_runtime_` or `openfga_`.
35+
36+
## Related
37+
38+
- [Observability reference](/reference/components/observability.md)
39+
- [Observability concepts](/concepts/observability.md)
40+
- [Access OpenFGA](/how-to-guides/access-openfga.md)

reference/components/account-operator.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,3 +236,4 @@ The deployment chart is **`account-operator`** in [platform-mesh/helm-charts](ht
236236
- [Account resource](/reference/resources/account-resource.md)
237237
- [Security operator](./security-operator.md)
238238
- [Platform Mesh operator](./platform-mesh-operator.md)
239+
- [Observability](./observability.md)

0 commit comments

Comments
 (0)