The only tool you need to know what is happening and how to fix it.
Go alertingexception-trackerissue-trackinglogsmetricsmonitoringobservability-platformopen-telemetryotelsession-replaytelemetrytraces
add: docs & website for the organization level overview
narrow-adventured8d85fefa7d6
diff --git a/CLAUDE.md b/CLAUDE.mdindex 80ffb200..cab4089b 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -646,6 +646,7 @@ backend/| POST | `/api/metrics/query` | App | Custom metric queries || GET | `/api/metrics/discover` | App | Discover available metrics || GET | `/api/metrics/discover/tags` | App | Discover metric tags |+| GET | `/api/metrics/discover/instances` | App | Distinct `server_name` values in a range (dashboard instance filter) || PUT | `/api/metrics/registry` | App+Write | Update metric registry entry |**Dashboards & Templates**@@ -737,6 +738,19 @@ Frontend routes: `/ai-traces` (tabs: Traces, Conversations, Users), `/ai-traces/| GET | `/api/organizations/:orgId/members/:userId/project-roles` | Admin | List member's per-project role overrides || PUT | `/api/organizations/:orgId/members/:userId/project-roles/:projectId` | Admin | Set/clear a per-project role override |+**Organization Overview** (`/organization` frontend route, tabs Overview | Issues | Monitors | Projects)++Org-wide read views that fan out over every project of the org, in `organization_overview.controller.go`. `RequireOrganizationAccess` (any org role) gates them; the servers/issues/monitors handlers deliberately skip `Transactional` because they run per-project telemetry queries and must not hold the single-connection SQLite main DB across them (they open their own short `db.ExecuteTransaction` for the project list first). The pure main-DB pages endpoint keeps `Transactional`. The frontend renders `/organization` without the project sidebar and auto-lands there after login when the first org has more than one project (`frontend/src/lib/utils/landing.ts`).++| Method | Endpoint | Auth | Purpose |+|--------|----------|------|---------|+| GET | `/api/organizations/:organizationId/overview/servers` | Member | One row per `server_name` per project over the last 30 min: CPU/memory/disk/network + a CPU sparkline, plus host/os/cloud/k8s metadata lifted from metric tags. Reads OTel hostmetrics (`system.cpu.utilization` state=idle inverted, `system.memory.utilization` state=used, `system.filesystem.utilization` state=used, `system.network.io` by direction) and falls back to the legacy SDK names (`cpu.used_pcnt`, `mem.used`/`mem.total`). A project that fails to read sets `partial: true` instead of failing the request |+| GET | `/api/organizations/:organizationId/overview/issues` | Member | Recently active issues across all projects, last 24h, max 50, plus the true `totalGroups` |+| GET | `/api/organizations/:organizationId/overview/pages` | Member | Active on-call pages across all projects + open-page and down-monitor counts |+| GET | `/api/organizations/:organizationId/overview/monitors` | Member | Every synthetic check in the org with 30-day aggregates |++Instance identity is the `server_name` tag, which comes from the OTLP `service.name` resource attribute; grouping by Kubernetes cluster keys off the `k8s.cluster.name` tag and the group selector only offers it when at least one instance carries one. Clicking a row opens `/dashboards?projectId=&server=&preset=30m` (plus `dashboard=` when the project has the `traceway-otel-agent` template applied); `server` scopes every widget query via `scopeTagFilters` in `widget-grid`/`widget-renderer`. Cluster-wide instrumentation manifests live in `examples/kubernetes/`, documented at `docs/pages/learn/kubernetes.mdx`.+**Invitations**| Method | Endpoint | Auth | Purpose ||--------|----------|------|---------|diff --git a/docs/pages/client/otel/metrics.mdx b/docs/pages/client/otel/metrics.mdxindex 1a41b04f..b0935cf2 100644--- a/docs/pages/client/otel/metrics.mdx+++ b/docs/pages/client/otel/metrics.mdx@@ -39,16 +39,24 @@ Histogram bucket boundaries are not stored, so percentiles cannot be computed fr`service.name` is copied onto every metric point as the `server_name` tag.-Some receivers put the identity of the thing being measured on the **Resource** rather than on the data point. The hostmetrics process scraper emits one `ResourceMetrics` block per process, and docker_stats, kubeletstats and the postgresql receiver do the same for containers, pods, nodes and databases. Without lifting those, every `process.cpu.utilization` point would look identical. Traceway copies this fixed list onto each point's tags so you can group and filter by them:+Two other things live on the **Resource** rather than on the data point, and Traceway lifts both onto each point's tags so you can group and filter by them.++The first is the identity of the thing being measured. The hostmetrics process scraper emits one `ResourceMetrics` block per process, and docker_stats, kubeletstats and the postgresql receiver do the same for containers, pods, nodes and databases. Without lifting those, every `process.cpu.utilization` point would look identical.++The second is host and platform metadata, which is what the [organization overview](/learn/organization-overview) shows next to each instance.| Attribute | Typical source ||-----------|----------------|+| `host.name`, `host.id`, `host.arch`, `os.type`, `os.description` | hostmetrics receiver / `resourcedetection` processor |+| `cloud.provider`, `cloud.region`, `cloud.availability_zone` | `resourcedetection` processor on cloud VMs || `process.pid`, `process.executable.name`, `process.command_line`, `process.owner` | hostmetrics process scraper || `container.name`, `container.image.name` | docker_stats receiver |-| `k8s.pod.name`, `k8s.namespace.name`, `k8s.node.name`, `k8s.deployment.name`, `k8s.container.name` | kubeletstats and k8s receivers |+| `k8s.cluster.name`, `k8s.pod.name`, `k8s.namespace.name`, `k8s.node.name`, `k8s.deployment.name`, `k8s.container.name` | kubeletstats and k8s receivers, see [Kubernetes](/learn/kubernetes) || `postgresql.database.name` | postgresql receiver |-This is a fixed allowlist, not a passthrough, because each distinct tag value multiplies the number of stored series. Notably `host.name` and `deployment.environment` are **not** lifted, so you cannot group by them. If you need to slice by something outside the list, set it as a data-point attribute in your instrumentation, or add it with the Collector's `attributes` processor, rather than as a resource attribute.+This is a fixed allowlist, not a passthrough, because each distinct tag value multiplies the number of stored series. Anything outside it, `deployment.environment` for example, is dropped. If you need to slice by something not on the list, set it as a data-point attribute in your instrumentation, or add it with the Collector's `attributes` processor, rather than as a resource attribute.++A data-point attribute wins when both carry the same key, except `server_name`, which `service.name` always overwrites.As with all attributes, only strings, numbers and booleans survive. Array and map values are dropped.diff --git a/docs/pages/learn/_meta.json b/docs/pages/learn/_meta.jsonindex 1e0a8538..0ca55353 100644--- a/docs/pages/learn/_meta.json+++ b/docs/pages/learn/_meta.json@@ -2,6 +2,7 @@"index": "Overview","data-flow": "Data Flow","projects": "Project Structure",+ "organization-overview": "Organization Overview","traces": "Traces","ai-tracing": "AI Tracing","issues": "Issues",@@ -25,6 +26,7 @@"mcp": "MCP Server","embedded-mode": "Embedded Mode","otel-agent": "OTel Agent",+ "kubernetes": "Kubernetes","build-tags": "Build Tags","hardware-requirements": "Hardware Requirements","contributing": "Contributing"diff --git a/docs/pages/learn/dashboards.mdx b/docs/pages/learn/dashboards.mdxindex 4958df58..18b34c48 100644--- a/docs/pages/learn/dashboards.mdx+++ b/docs/pages/learn/dashboards.mdx@@ -42,6 +42,14 @@ Templates are ready-made dashboards you install and then customize freely. The mWidgets can group series by resource tags such as `container.name`, `k8s.pod.name`, `k8s.node.name`, or `postgresql.database.name`, so one widget shows one line per container, pod, node, or database. Point the matching OpenTelemetry Collector receiver at your Traceway project's OTLP endpoint and build widgets on the metrics it reports.+## Filtering by instance++The instance picker in the dashboard header narrows every widget on the page to one reporting machine. It lists the `server_name` values seen in the selected time range, so it stays in step with what is actually reporting rather than with a static list.++The scope is applied as an extra tag filter on each widget's queries, on top of whatever filters the widget already has. Nothing is saved to the dashboard, so it does not change what teammates see; it lives in the URL as `?server=<name>` and survives time-range changes, which makes the filtered view shareable.++This is where a row in the [organization overview](/learn/organization-overview) leads. Selecting an instance there opens its project's dashboards already scoped to that machine over the last 30 minutes, jumping straight to the **OTelemetry Server Agent** tab when the project has it installed. Clear the picker to go back to the whole project.+## Dashboards as codeEvery dashboard is a single JSON document. Widget order in the array is the display order, and each widget carries its own config:diff --git a/docs/pages/learn/index.mdx b/docs/pages/learn/index.mdxindex eed6cef1..3921f50c 100644--- a/docs/pages/learn/index.mdx+++ b/docs/pages/learn/index.mdx@@ -38,6 +38,10 @@ Endpoints, Tasks, and AI Traces all carry an `is_root` flag. A row is **non-rootSee [Data Flow](/learn/data-flow) for how these connect during request processing, task execution, and metrics collection, and [Project Structure](/learn/projects) for how to split an application across Traceway projects before you instrument it.+## Above a single project++Everything above is scoped to one project. The [Organization Overview](/learn/organization-overview) sits above them all: every instance reporting into the organization, every recently active issue, every monitor, and every open on-call page, on one page. It is how a fleet of servers or a [Kubernetes cluster](/learn/kubernetes) is read at a glance before you drill into the project that owns the problem.+## AuthenticationEvery way in has its own credential: SDKs and OTel exporters use the project token, CI uses the source map token for symbol uploads, the dashboard uses a JWT or a personal access token, the [CLI](/learn/cli-auth) uses a device flow, and [MCP clients](/learn/mcp) use OAuth with PKCE. Role middleware scopes what an authenticated user can do.diff --git a/docs/pages/learn/kubernetes.mdx b/docs/pages/learn/kubernetes.mdxnew file mode 100644index 00000000..0bc94cda--- /dev/null+++ b/docs/pages/learn/kubernetes.mdx@@ -0,0 +1,285 @@+# Kubernetes++import { Callout, Steps, Tabs } from "nextra/components";++Two OpenTelemetry Collector workloads cover an entire cluster: a DaemonSet on every node and one small Deployment for cluster-wide state. Together they give Traceway node health, pod resource usage, container logs, cluster state, and Kubernetes events, under one project token.++Ready-to-apply manifests live in the repository at [`examples/kubernetes`](https://github.com/tracewayapp/traceway/tree/main/examples/kubernetes).++## What you get++| Workload | Reads | Shows up as |+|---|---|---|+| `traceway-node-agent` (DaemonSet) | Host CPU, memory, disk, filesystem, network of each node | One [instance row per node](/learn/organization-overview#instances), grouped by cluster |+| `traceway-node-agent` | Kubelet node and pod resource usage | `k8s.pod.*` metrics for [dashboard widgets](/learn/dashboards) |+| `traceway-node-agent` | Every container's stdout and stderr | The [Logs](/learn/logs) page, tagged with pod, namespace and container |+| `traceway-cluster-agent` (Deployment) | Pod phases, deployment replicas, node conditions, allocatable resources | `k8s.*` cluster metrics |+| `traceway-cluster-agent` | Kubernetes events | The Logs page: scheduling failures, `OOMKilled`, image pull errors |+| Your applications | Traces, exceptions, application metrics, logs | Endpoints, Issues, Tasks, AI Traces |++The applications keep their own instrumentation. The collectors describe the cluster the applications run on; they do not replace [OpenTelemetry in the app](/client/otel).++<img src="/organization-overview.png" alt="The organization overview with instances grouped by Kubernetes cluster, plus plain hosts under Not in a Kubernetes cluster" style={{ maxWidth: '100%', height: 'auto', marginTop: '16px', borderRadius: '8px', border: '1px solid #e5e7eb' }} />++Nodes from every cluster and every plain host land in the same table, grouped by cluster. Machines with no `k8s.cluster.name` collect under **Not in a Kubernetes cluster**, so a half-migrated fleet still reads as one fleet.++## Install++<Steps>++### Pick the project++Cluster telemetry belongs in the same Traceway project as the backend running on it, exactly like host metrics on a plain server. See [Project Structure](/learn/projects) for when to split. Copy the project token from **Settings**.++<Callout type="info">+ One project can hold several clusters. `k8s.cluster.name` keeps them apart in+ the overview and in every widget that groups by it.+</Callout>++### Create the namespace and the token secret++The token lives in a Secret rather than in the manifest, so the manifest stays safe to commit and to review.++```bash+kubectl create namespace traceway++kubectl create secret generic traceway-token \+ --namespace traceway \+ --from-literal=token='<your-project-token>'+```++### Set the cluster name and endpoint++Download the manifest and edit the two values in the `traceway-settings` ConfigMap at the top of it:++```bash+curl -O https://raw.githubusercontent.com/tracewayapp/traceway/main/examples/kubernetes/traceway-kubernetes.yaml+```++```yaml+data:+ TRACEWAY_CLUSTER_NAME: production-eu+ TRACEWAY_ENDPOINT: https://traceway.mycompany.com/api/otel+```++`TRACEWAY_CLUSTER_NAME` becomes `k8s.cluster.name` on everything the cluster reports, and it is the string the organization overview groups instances by. Give every cluster a distinct one.++`TRACEWAY_ENDPOINT` is the OTLP/HTTP base URL of your instance, ending in `/api/otel`. On Traceway Cloud that is `https://cloud.tracewayapp.com/api/otel`. The collector appends `/v1/metrics`, `/v1/logs` and `/v1/traces` itself.++### Apply++```bash+kubectl apply -f traceway-kubernetes.yaml+```++Everything lands in the `traceway` namespace: a ServiceAccount with read-only cluster RBAC, the two collector configs, the DaemonSet and the Deployment.++### Watch it come up++```bash+kubectl -n traceway rollout status daemonset/traceway-node-agent+kubectl -n traceway logs -l app.kubernetes.io/name=traceway-node-agent --tail=50+```++Metrics arrive within about 30 seconds. Open the organization overview: every node appears as its own instance, grouped under your cluster name.++</Steps>++## With Helm++If you already run the upstream OpenTelemetry Collector chart, the same setup is two releases. The values files in [`examples/kubernetes/helm`](https://github.com/tracewayapp/traceway/tree/main/examples/kubernetes/helm) use the chart's presets and add only what Traceway needs.++```bash+helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts+helm repo update++helm upgrade --install traceway-node-agent \+ open-telemetry/opentelemetry-collector \+ --namespace traceway --create-namespace \+ --values node-agent-values.yaml++helm upgrade --install traceway-cluster-agent \+ open-telemetry/opentelemetry-collector \+ --namespace traceway \+ --values cluster-agent-values.yaml+```++The same `traceway-token` Secret and `traceway-settings` ConfigMap are expected.++<Callout type="warning">+ The chart's `hostMetrics` preset wires up the scrapers but leaves+ `system.cpu.utilization`, `system.memory.utilization` and+ `system.filesystem.utilization` **disabled**, because that is the receiver's+ default. Those three are exactly what the organization overview reads. Both+ values files turn them on; if you write your own, do the same or the instance+ rings stay empty.+</Callout>++## Naming: what becomes an instance++Traceway's identity for a reporting machine is the `server_name` tag, and `server_name` comes from the `service.name` resource attribute. Nothing else creates or names an instance.++The node agent therefore sets `service.name` to the node name:++```yaml+resource/node:+ attributes:+ - key: service.name+ value: ${env:K8S_NODE_NAME}+ action: upsert+```++with `K8S_NODE_NAME` injected from the downward API (`spec.nodeName`). One node, one `service.name`, one instance row. Skip this and every node in the cluster reports under the collector's own service name and collapses into a single row.++The same rule is why applications must keep their own `service.name`. A pod exporting as `checkout-api` stays `checkout-api` in Endpoints, Issues and Tasks, whatever node it lands on. Pods are not instances in the overview; nodes are.++## Which Kubernetes attributes survive++Traceway does not copy arbitrary resource attributes onto stored telemetry, because every distinct value multiplies the number of series it keeps. What it keeps depends on the signal:++| Signal | Kubernetes attributes kept |+|---|---|+| **Metrics** | `k8s.cluster.name`, `k8s.pod.name`, `k8s.namespace.name`, `k8s.node.name`, `k8s.deployment.name`, `k8s.container.name`, plus `container.name`, `container.image.name`, `host.*`, `os.*` and `cloud.*` (full list under [Resource Attributes](/client/otel/metrics#resource-attributes)) |+| **Logs** | All of them. Log records store the whole resource attribute map |+| **Traces** | None. Spans keep only `service.name` and `service.version` |++That shapes how you instrument:++- **Group metric widgets** by `k8s.pod.name`, `k8s.node.name`, `k8s.namespace.name` or `k8s.deployment.name`. All four are available as tags.+- **Filter logs** by any Kubernetes attribute; they are all in the record.+- **Do not expect pod names on spans.** If a trace needs to carry which pod served it, set it as a span attribute in the application, not as a resource attribute. `service.name` is what distinguishes services on the trace side.++## Application telemetry++Applications in the cluster export OpenTelemetry as they normally would. Two ways to wire it:++<Tabs items={['Direct to Traceway', 'Through the gateway']}>+<Tabs.Tab>++Each deployment carries the project token and points at the instance. Secrets are namespaced, so create one in every namespace that reports:++```bash+kubectl create secret generic traceway-otlp -n checkout \+ --from-literal=headers='Authorization=Bearer <your-project-token>'+```++```yaml+env:+ - name: OTEL_EXPORTER_OTLP_ENDPOINT+ value: https://traceway.mycompany.com/api/otel+ - name: OTEL_EXPORTER_OTLP_HEADERS+ valueFrom:+ secretKeyRef:+ name: traceway-otlp+ key: headers+ - name: OTEL_SERVICE_NAME+ value: checkout-api+```++Simplest, and it keeps applications independent of the collectors. The cost is the token existing in every reporting namespace.++</Tabs.Tab>+<Tabs.Tab>++Deploy the optional gateway and let applications export to a plain in-cluster address with no credentials:++```bash+kubectl apply -f https://raw.githubusercontent.com/tracewayapp/traceway/main/examples/kubernetes/traceway-gateway.yaml+```++```yaml+env:+ - name: OTEL_EXPORTER_OTLP_ENDPOINT+ value: http://traceway-gateway.traceway.svc.cluster.local:4318+ - name: OTEL_SERVICE_NAME+ value: checkout-api+```++The gateway holds the only copy of the token, adds `k8s.pod.name`, `k8s.namespace.name` and `k8s.deployment.name` to application metrics and logs, and gives you one place to change the Traceway URL, batching or retries. It is a normal Deployment, so scale it with traffic.++</Tabs.Tab>+</Tabs>++Traceway's ingest URL is the same OTLP/HTTP endpoint documented in the [OpenTelemetry guide](/client/otel); nothing about it is Kubernetes-specific.++## Dashboards++Open the command palette with <kbd>⌘K</kbd> and install the **OTelemetry Server Agent** template. It is already wired to the hostmetrics names the node agent reports, so it works unchanged for nodes.++For pod-level views, build widgets on the kubelet metrics and group by a Kubernetes tag: `k8s.pod.cpu.utilization` grouped by `k8s.pod.name`, `k8s.pod.memory.usage` grouped by `k8s.namespace.name`, and so on. Grouping by tag is described in [Dashboards](/learn/dashboards).++Dashboards belong to the organization, so one Kubernetes dashboard applies to every project that reports a cluster.++## Cardinality++Kubernetes generates a lot of distinct values, and each combination of tag values is a stored series.++- `metric_groups: [node, pod]` is the default in the manifests. Adding `container` multiplies pod series by the number of containers per pod.+- Pod names change on every rollout. A deployment that ships ten times a day leaves ten times as many `k8s.pod.name` values behind in a week. Group dashboards by `k8s.deployment.name` for anything you want stable over time, and reach for `k8s.pod.name` when debugging a specific pod.+- Wide time ranges read pre-aggregated rollups rather than raw points, so cardinality costs storage more than it costs query speed. See [Metrics](/learn/metrics).++## Logs++The node agent tails `/var/log/pods/*/*/*.log` and uses the collector's `container` operator, so containerd, CRI-O and Docker formats all parse, and `k8s.pod.name`, `k8s.namespace.name` and `k8s.container.name` come off the file path.++Pod logs have no `service.name` of their own, and the Logs page filters by service, so the config falls back to the container name:++```yaml+transform/log_service_name:+ error_mode: ignore+ log_statements:+ - context: resource+ statements:+ - set(attributes["service.name"], attributes["k8s.container.name"]) where attributes["service.name"] == nil+```++Two things worth knowing:++- The agent starts at the **end** of each file, so it does not replay history on first install. A checkpoint file under `/var/lib/traceway-collector` on each node keeps its position across restarts.+- The `traceway` namespace is excluded from log collection. Without it the collector's own output becomes logs, which become collector output.++Application logs that already carry a trace id join up with their trace on the Logs page. Container stdout does not, unless the application writes the trace id into the line. Exporting logs through OpenTelemetry from inside the app is what gives you that linkage; see [OTel Logs](/client/otel/logs).++## Alerting on the cluster++Cluster telemetry feeds the same [alerting](/learn/alerts) and [on-call](/learn/on-call) machinery as everything else. Useful rules:++- A metric rule on `k8s.container.restarts`, to page on a crash-looping deployment before anyone notices the 500s.+- A metric rule on `system.memory.utilization` per node, ahead of the eviction threshold.+- A [Monitor](/learn/monitors) probing an Ingress hostname, so you find out when the cluster is reachable but the application is not.++## Troubleshooting++**No instances in the overview.** The rows come from `system.cpu.utilization`. Check it is enabled:++```bash+kubectl -n traceway exec ds/traceway-node-agent -- \+ sh -c 'grep -A3 "cpu:" /conf/config.yaml'+```++**One instance instead of one per node.** `service.name` is not per node. Confirm `K8S_NODE_NAME` reaches the container:++```bash+kubectl -n traceway exec ds/traceway-node-agent -- printenv K8S_NODE_NAME+```++**Instances are not grouped by cluster.** The **Group by Kubernetes cluster** option only appears once at least one instance carries `k8s.cluster.name`. Check `TRACEWAY_CLUSTER_NAME` is set in the `traceway-settings` ConfigMap and the pods were restarted after it changed.++**CPU shows but memory and disk are blank.** `system.memory.utilization` and `system.filesystem.utilization` are separately opt-in and are easy to miss when adapting an existing collector config.++**401 from the exporter.** The collector logs the status code. The token must be the **project token** from the project's Settings page, not a personal access token or an upload token.++**No pod logs.** Confirm `/var/log/pods` is mounted and readable. On a node with a read-only root filesystem the checkpoint hostPath may also fail to create; the collector logs that at startup.++**Exporter looks healthy but nothing appears.** Check the project, not the collector. Open **Dashboards**, add a widget, and search the metric dropdown for `system.cpu.utilization`: if the name is not there, the points are landing in a different project than the one you are looking at.++## Running Traceway itself on Kubernetes++Separate from monitoring a cluster, Traceway can run in one. The repository ships a Helm chart at [`helm/traceway`](https://github.com/tracewayapp/traceway/tree/main/helm/traceway) with three variants: `minimal` against external ClickHouse and PostgreSQL (the production shape), `sqlite` for the embedded single-container deployment, and `full` for the all-in-one image. See [Self Host](/server) for the trade-offs between them.++## Next steps++- [Organization Overview](/learn/organization-overview) for what the instance table does with all this+- [OpenTelemetry](/client/otel) for instrumenting the applications+- [Resource Attributes](/client/otel/metrics#resource-attributes) for the full allowlist+- [Dashboards](/learn/dashboards) for building pod and namespace viewsdiff --git a/docs/pages/learn/metrics.mdx b/docs/pages/learn/metrics.mdxindex c6882edf..5219ff5d 100644--- a/docs/pages/learn/metrics.mdx+++ b/docs/pages/learn/metrics.mdx@@ -38,6 +38,8 @@ Tags come from the data-point attributes you pass when recording a value, plus t## Visualizing Metrics+Server metrics also drive the instance table on the [Organization Overview](/learn/organization-overview), which reads `system.cpu.utilization`, `system.memory.utilization`, `system.filesystem.utilization` and `system.network.io` per `server_name`.+Metrics are visualized on [Dashboards](/learn/dashboards): organization-owned, JSON-defined tabs of chart widgets that you can apply to any of your projects, install from the built-in template marketplace (host metrics, Go runtime, Traceway self-monitoring), or import from Grafana.<img src="/dashboards/dashboards-page.png" alt="Dashboards page" style={{ maxWidth: '100%', height: 'auto', marginTop: '16px', borderRadius: '8px', border: '1px solid #e5e7eb' }} />diff --git a/docs/pages/learn/organization-overview.mdx b/docs/pages/learn/organization-overview.mdxnew file mode 100644index 00000000..f77dccbf--- /dev/null+++ b/docs/pages/learn/organization-overview.mdx@@ -0,0 +1,133 @@+# Organization Overview++import { Callout } from "nextra/components";++Every other page in Traceway is scoped to one project. The organization overview is the one that is not: it puts every instance, issue, monitor, and open on-call page across all of your organization's projects on a single screen.++It is the page for the question a project view cannot answer. Which box is about to run out of memory? What is already paging someone? Is anything on fire anywhere?++<img src="/organization-overview.png" alt="The Traceway organization overview: operational pulse counters, an instance table grouped by Kubernetes cluster, and open on-call pages" style={{ maxWidth: '100%', height: 'auto', marginTop: '16px', borderRadius: '8px', border: '1px solid #e5e7eb' }} />++## Getting there++Open the switcher in the top-left header. Organizations are the headings; their projects are listed underneath. Selecting the organization itself opens the overview, selecting a project opens that project's dashboard.++<img src="/organization-switcher.png" alt="The header switcher, listing organizations with their projects nested underneath" style={{ maxWidth: '100%', height: 'auto', marginTop: '16px', borderRadius: '8px', border: '1px solid #e5e7eb' }} />++The overview replaces the project sidebar with a plain header, because nothing on it is project-scoped. Pick a project from the switcher to get the sidebar back.++After signing in you land on the overview automatically when your first organization has more than one project. With a single project you go straight to that project's dashboard, since an overview of one thing is not worth a click.++Every organization member can open it, read-only members included. It shows the projects you can already see, so it grants no access you did not have.++<Callout type="info">+ The overview is per organization, not global. If you belong to more than one,+ each has its own page; switch between them from the same menu.+</Callout>++## Operational pulse++The strip across the top is the summary you read first.++| Counter | Meaning |+|---|---|+| **Reporting now** | Instances whose last metric arrived within 3 minutes |+| **Needs attention** | Instances that are critical, warning, or stale |+| **Stale signals** | Instances that have gone quiet for more than 3 minutes |+| **Network I/O** | Combined receive plus transmit rate across every instance |+| **Issues · 24h** | Distinct issues seen across all projects in the last 24 hours; opens the Issues tab |+| **Active response** | Open on-call pages plus monitors currently down; opens the Monitors tab |++The whole page refreshes itself every minute, and **Refresh** forces it. A refresh that fails leaves the last good snapshot on screen with a warning rather than blanking the page, and if one project's telemetry cannot be read the others still render.++## Instances++The instance table is a live view of every server reporting into the organization, over the last 30 minutes. One row per distinct `server_name`, per project.++Rows come from server metrics, not from any registry, so an instance appears when it starts reporting and disappears when it stops. Nothing to register, nothing to clean up.++| Column | Source |+|---|---|+| CPU | `system.cpu.utilization` where `state=idle`, inverted, with a 30-minute sparkline |+| Memory | `system.memory.utilization` where `state=used` |+| Disk | `system.filesystem.utilization` where `state=used` |+| Network | `system.network.io` split by `direction`, as a rate |+| Last signal | Most recent metric point from that instance |++Hosts running the [Traceway OTel Agent](/learn/otel-agent) or any OpenTelemetry Collector with the hostmetrics receiver fill in all four. Instances still on the older Traceway Go SDK metric names (`cpu.used_pcnt`, `mem.used`, `mem.total`) fill in CPU and memory, and the row is labelled **SDK metrics** instead of **OTel Agent**.++<Callout type="warning">+ The three `system.*.utilization` metrics are **off by default** in the+ OpenTelemetry hostmetrics receiver. If you configure a collector by hand,+ enable them explicitly or the rings stay empty. The Traceway OTel Agent and+ the [Kubernetes manifests](/learn/kubernetes) already do.+</Callout>++### Health states++Each row carries a state, computed from the latest values:++| State | Condition |+|---|---|+| **Critical** | CPU ≥ 95%, memory ≥ 95%, or disk ≥ 90% |+| **Warning** | CPU ≥ 80%, memory ≥ 85%, or disk ≥ 80% |+| **Stale** | No metric in the last 3 minutes, whatever the last values were |+| **Healthy** | Everything else |++Rows sort worst-first inside their group: critical, then stale, then warning, then healthy. Stale outranks warning deliberately. An instance that stopped talking is a bigger unknown than one running warm.++### The metadata line++Under each instance name is whatever the telemetry knows about it: the project, the host name when it differs from the instance name, OS and architecture, cloud region, the Kubernetes node, and whether the numbers came from the OTel Agent or the SDK. All of it comes from resource attributes on the metrics themselves (see [Resource Attributes](/client/otel/metrics#resource-attributes)), so richer instrumentation means a more useful line, and nothing needs configuring in Traceway.++### Search, filter, group++- **Find an instance** matches the instance name, project, host name, host id, OS, architecture, cloud region, Kubernetes cluster, and node name.+- **Health state** narrows to needs attention, stale, or healthy.+- **Project** appears once instances span more than one project.+- **Group by** switches between project, Kubernetes cluster, and no grouping.++Grouping defaults to project. When any instance carries a `k8s.cluster.name` attribute, the page starts grouped by Kubernetes cluster instead, and instances without one collect under **Not in a Kubernetes cluster**. See [Kubernetes](/learn/kubernetes) for how that attribute gets set.++### Clicking through++Selecting a row opens that instance's dashboard: the project's dashboards page, scoped to that one `server_name`, over the last 30 minutes. If the project has the **OTelemetry Server Agent** dashboard installed, that tab opens directly.++The scope is a normal URL parameter (`?server=<name>`), so the link is shareable and the page keeps the filter while you change the time range. Clear it from the instance picker in the dashboard header. See [Dashboards](/learn/dashboards#filtering-by-instance).++## Active on-call response++Under the instances is every page that still needs acknowledgement or resolution, across all projects: title, project, severity, status, and how long it has been open. It is the same queue as the [On-Call](/learn/on-call) page, without the per-project filter. Acknowledged pages stay listed until they are resolved, so nothing quietly falls off the screen.++## Issues++<img src="/organization-issues.png" alt="The organization Issues tab: recently active issues from every project" style={{ maxWidth: '100%', height: 'auto', marginTop: '16px', borderRadius: '8px', border: '1px solid #e5e7eb' }} />++Recently active issues from every project in the last 24 hours, newest event first, with the project each belongs to. Capped at 50 rows; the counter above the table is the true total across the organization. This is a triage feed, not the [Issues](/learn/issues) page, which is where you filter, search, and archive.++## Monitors++<img src="/organization-monitors.png" alt="The organization Monitors tab: every monitor across projects with status, uptime and average latency, plus recent incidents" style={{ maxWidth: '100%', height: 'auto', marginTop: '16px', borderRadius: '8px', border: '1px solid #e5e7eb' }} />++Every [monitor](/learn/monitors) in the organization in one sortable list: type, project, current status, 30-day uptime, 30-day average latency, and when it last had an incident. Underneath is the organization's incident history for the last 90 days, across monitors and status pages, with the ongoing ones marked.++Uptime excludes missed probes, so a window where Traceway itself was down reads as unknown rather than as a fabricated 100%.++## Projects++<img src="/organization-projects.png" alt="The organization Projects tab, listing each project with its framework and your effective access level" style={{ maxWidth: '100%', height: 'auto', marginTop: '16px', borderRadius: '8px', border: '1px solid #e5e7eb' }} />++Every project in the organization with its framework, when it was added, and your **effective** access level on it: your organization role, unless a [per-project override](/learn/projects) changes it. Selecting a row opens that project.++## Multi-organization setups++A user can belong to several organizations, and each carries its own overview, members, dashboards, teams, schedules, and escalation policies. Nothing is shared across the boundary, which is what makes an organization the right shape for an agency's clients or a company's independent business units.++Within one organization, prefer more projects over more organizations. Projects are the isolation boundary for telemetry, but the overview, dashboards, on-call rotations, and status pages are all organization-wide, so splitting a fleet across organizations means giving up exactly the view that makes a fleet manageable.++## Next steps++- [Kubernetes](/learn/kubernetes) for cluster-wide instrumentation and cluster grouping+- [Traceway OTel Agent](/learn/otel-agent) for host metrics on a plain server+- [Project Structure](/learn/projects) for splitting an application across projects+- [On-Call](/learn/on-call) for the paging that fills the response queuediff --git a/docs/pages/learn/otel-agent.mdx b/docs/pages/learn/otel-agent.mdxindex e6b33fa6..31accc12 100644--- a/docs/pages/learn/otel-agent.mdx+++ b/docs/pages/learn/otel-agent.mdx@@ -9,6 +9,13 @@ The **Traceway OTel Agent** is a tiny, pre-configured OpenTelemetry Collector th[github.com/tracewayapp/traceway-otel-agent](https://github.com/tracewayapp/traceway-otel-agent).</Callout>+<Callout type="warning">+ The agent installs as a host service, so it is not the way to cover a+ Kubernetes cluster. Use the DaemonSet in [Kubernetes](/learn/kubernetes)+ instead; it reports the same hostmetrics per node, plus pod metrics, container+ logs, and cluster state.+</Callout>+## Install<Steps>@@ -51,7 +58,9 @@ Every 60 seconds the agent scrapes:Metrics are tagged with `server_name`, which comes from `TRACEWAY_SERVICE_NAME` (default: the machine's hostname). Give every host a distinct `TRACEWAY_SERVICE_NAME` or the hosts cannot be told apart. You can also group and filter by the attributes each scraper puts on its own data points, for example `cpu` and `state` on CPU metrics, `device` and `direction` on disk and network metrics, and `device` and `mountpoint` on filesystem metrics.-The agent also attaches resource attributes to the OTLP payload: `service.name`, `host.name`, `os.type`, and on cloud VMs `cloud.provider`, `cloud.region`, and `cloud.account.id` (EC2 / GCE / Azure are auto-detected). Traceway lifts `service.name` onto metric tags, renamed to `server_name`. Every other resource attribute is dropped unless it is on a fixed allowlist. For this agent the allowlist matters only when `TRACEWAY_PROCESS_NAMES` is set: `process.pid`, `process.executable.name`, `process.command_line` and `process.owner` are lifted, which is what keeps the per-process series apart. `host.name`, `os.type` and the `cloud.*` attributes are never stored as tags. See [Resource Attributes](/client/otel/metrics#resource-attributes) for the full allowlist.+The agent also attaches resource attributes to the OTLP payload: `service.name`, `host.name`, `os.type`, and on cloud VMs `cloud.provider`, `cloud.region`, and `cloud.account.id` (EC2 / GCE / Azure are auto-detected). Traceway lifts `service.name` onto metric tags, renamed to `server_name`. Every other resource attribute is dropped unless it is on a fixed allowlist, which covers host and platform metadata (`host.name`, `host.id`, `host.arch`, `os.type`, `os.description`, `cloud.provider`, `cloud.region`, `cloud.availability_zone`) and per-process identity when `TRACEWAY_PROCESS_NAMES` is set (`process.pid`, `process.executable.name`, `process.command_line`, `process.owner`, which is what keeps the per-process series apart). See [Resource Attributes](/client/otel/metrics#resource-attributes) for the full allowlist.++The retained metadata is what the [organization overview](/learn/organization-overview) shows beside each instance: OS, architecture, cloud region, and the host name when it differs from `TRACEWAY_SERVICE_NAME`. It is descriptive only. `server_name` remains the identity, so two hosts sharing a `TRACEWAY_SERVICE_NAME` still collapse into one instance no matter how different their metadata is.## What it opensdiff --git a/docs/pages/learn/projects.mdx b/docs/pages/learn/projects.mdxindex b82b91e7..40b49916 100644--- a/docs/pages/learn/projects.mdx+++ b/docs/pages/learn/projects.mdx@@ -25,6 +25,12 @@ The framework picker offers exactly nine options, and every backend takes the saThere is no Gin, Django, Laravel, or Hono entry, because the language and web framework are chosen later on the project's **Connection** page, which then shows the exact install and exporter setup. A meta-framework picks the framework it renders with: Next.js and Remix select **React**, SvelteKit selects **Svelte**, Nuxt selects **Vue.js**.+## Organizations++Projects live inside an **organization**, which is the boundary for everything that is not telemetry: members and roles, dashboards, teams, on-call schedules, escalation policies, and status pages. It is also what the [organization overview](/learn/organization-overview) summarizes, putting every instance, issue, monitor, and open page across all of the organization's projects on one screen.++Split by project first. A second organization is right when two groups of projects should share no members, no dashboards, and no on-call rotation, an agency's separate clients for example. Splitting one fleet across organizations costs you the single view of it.+## Keep Backend Signals TogetherThe main backend project should receive all server-side signals:@@ -34,7 +40,7 @@ The main backend project should receive all server-side signals:- AI and LLM spans- Exceptions and OTel logs- Application and runtime metrics-- Host CPU, memory, disk, filesystem, network, and process metrics from the [Traceway OTel Agent](/learn/otel-agent)+- Host CPU, memory, disk, filesystem, network, and process metrics from the [Traceway OTel Agent](/learn/otel-agent), or from the [Kubernetes collectors](/learn/kubernetes) when the backend runs in a clusterAPIs, workers, schedulers, and the host agent use the same backend project token. Give each process or host a stable `service.name` so it remains filterable inside the project:@@ -131,6 +137,8 @@ The API and worker use different `service.name` values but the same backend proj## Next Steps+- [Organization Overview](/learn/organization-overview)+- [Kubernetes](/learn/kubernetes)- [OpenTelemetry integration](/client/otel)- [OTel span mapping](/client/otel/traces)- [Traceway OTel Agent](/learn/otel-agent)diff --git a/docs/public/organization-issues.png b/docs/public/organization-issues.pngnew file mode 100644index 00000000..db20c63aBinary files /dev/null and b/docs/public/organization-issues.png differdiff --git a/docs/public/organization-monitors.png b/docs/public/organization-monitors.pngnew file mode 100644index 00000000..3dd4d1d9Binary files /dev/null and b/docs/public/organization-monitors.png differdiff --git a/docs/public/organization-overview.png b/docs/public/organization-overview.pngnew file mode 100644index 00000000..3ce8ba33Binary files /dev/null and b/docs/public/organization-overview.png differdiff --git a/docs/public/organization-projects.png b/docs/public/organization-projects.pngnew file mode 100644index 00000000..56208d2aBinary files /dev/null and b/docs/public/organization-projects.png differdiff --git a/docs/public/organization-switcher.png b/docs/public/organization-switcher.pngnew file mode 100644index 00000000..d39802b9Binary files /dev/null and b/docs/public/organization-switcher.png differdiff --git a/examples/kubernetes/README.md b/examples/kubernetes/README.mdnew file mode 100644index 00000000..8decf9ad--- /dev/null+++ b/examples/kubernetes/README.md@@ -0,0 +1,53 @@+# Traceway for Kubernetes++Ready-to-apply OpenTelemetry Collector manifests that report a whole cluster to a+Traceway project: host metrics per node, pod resource usage, pod logs, cluster+state, and Kubernetes events.++Full walkthrough: [docs.tracewayapp.com/learn/kubernetes](https://docs.tracewayapp.com/learn/kubernetes)++## Files++| File | What it deploys |+|---|---|+| `traceway-kubernetes.yaml` | `traceway-node-agent` (DaemonSet) and `traceway-cluster-agent` (Deployment), plus namespace, ServiceAccount and RBAC |+| `traceway-gateway.yaml` | Optional in-cluster OTLP endpoint your applications export to, so the project token lives in one Secret |+| `helm/node-agent-values.yaml` | The same node agent as values for the upstream `open-telemetry/opentelemetry-collector` chart |+| `helm/cluster-agent-values.yaml` | The same cluster agent as chart values |++## Install++```bash+kubectl create namespace traceway++kubectl create secret generic traceway-token \+ --namespace traceway \+ --from-literal=token='<your-project-token>'++# Set TRACEWAY_CLUSTER_NAME and TRACEWAY_ENDPOINT in the traceway-settings+# ConfigMap at the top of the file first.+kubectl apply -f traceway-kubernetes.yaml+```++The project token is the one from your Traceway project's **Settings** page.+`TRACEWAY_ENDPOINT` is your instance's OTLP base URL, ending in `/api/otel`.++## What you get++- One instance row per node in the organization overview, grouped under+ `TRACEWAY_CLUSTER_NAME`, with CPU, memory, disk and network.+- `k8s.pod.*` metrics for per-pod dashboards.+- Container stdout/stderr on the Logs page.+- Cluster state metrics and Kubernetes events.++## Notes++- `TRACEWAY_CLUSTER_NAME` becomes `k8s.cluster.name`. Use a distinct value per+ cluster; that string is what the overview groups by.+- The node agent sets `service.name` to the node name, which becomes the+ `server_name` tag. That is what gives one instance row per node.+- The three `system.*.utilization` metrics are off by default in the hostmetrics+ receiver and are enabled explicitly in these configs. Without them the+ organization overview has no CPU, memory or disk to show.+- Keep `traceway-cluster-agent` at one replica.+- The collector image is pinned to a released version. Bump it deliberately.diff --git a/examples/kubernetes/helm/cluster-agent-values.yaml b/examples/kubernetes/helm/cluster-agent-values.yamlnew file mode 100644index 00000000..095ddbd5--- /dev/null+++ b/examples/kubernetes/helm/cluster-agent-values.yaml@@ -0,0 +1,84 @@+# Traceway cluster agent, as values for the upstream OpenTelemetry Collector chart.+#+# helm upgrade --install traceway-cluster-agent \+# open-telemetry/opentelemetry-collector \+# --namespace traceway \+# --values cluster-agent-values.yaml+#+# Reports cluster state metrics and Kubernetes events. Keep it at one replica:+# a second copy would report every cluster metric twice.+mode: deployment+replicaCount: 1++image:+ repository: otel/opentelemetry-collector-contrib++presets:+ clusterMetrics:+ enabled: true+ kubernetesEvents:+ enabled: true++extraEnvs:+ - name: TRACEWAY_TOKEN+ valueFrom:+ secretKeyRef:+ name: traceway-token+ key: token+ - name: TRACEWAY_ENDPOINT+ valueFrom:+ configMapKeyRef:+ name: traceway-settings+ key: TRACEWAY_ENDPOINT+ - name: TRACEWAY_CLUSTER_NAME+ valueFrom:+ configMapKeyRef:+ name: traceway-settings+ key: TRACEWAY_CLUSTER_NAME++config:+ receivers:+ k8s_cluster:+ collection_interval: 30s+ node_conditions_to_report: [Ready, MemoryPressure, DiskPressure, PIDPressure]+ allocatable_types_to_report: [cpu, memory, storage, ephemeral-storage]++ processors:+ resource/cluster:+ attributes:+ - key: k8s.cluster.name+ value: ${env:TRACEWAY_CLUSTER_NAME}+ action: upsert+ # Cluster-wide series belong to no node, so they report under the+ # cluster's own name rather than any instance.+ - key: service.name+ value: ${env:TRACEWAY_CLUSTER_NAME}+ action: upsert++ exporters:+ otlphttp/traceway:+ endpoint: ${env:TRACEWAY_ENDPOINT}+ headers:+ Authorization: Bearer ${env:TRACEWAY_TOKEN}+ compression: gzip+ retry_on_failure:+ enabled: true++ service:+ pipelines:+ traces: null+ metrics:+ receivers: [k8s_cluster]+ processors: [memory_limiter, resource/cluster, batch]+ exporters: [otlphttp/traceway]+ logs:+ receivers: [k8sobjects]+ processors: [memory_limiter, resource/cluster, batch]+ exporters: [otlphttp/traceway]++resources:+ requests:+ cpu: 100m+ memory: 200Mi+ limits:+ memory: 500Midiff --git a/examples/kubernetes/helm/node-agent-values.yaml b/examples/kubernetes/helm/node-agent-values.yamlnew file mode 100644index 00000000..ef01d94c--- /dev/null+++ b/examples/kubernetes/helm/node-agent-values.yaml@@ -0,0 +1,137 @@+# Traceway node agent, as values for the upstream OpenTelemetry Collector chart.+#+# helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts+# helm upgrade --install traceway-node-agent \+# open-telemetry/opentelemetry-collector \+# --namespace traceway --create-namespace \+# --values node-agent-values.yaml+#+# Expects the same Secret and ConfigMap as the plain manifests:+#+# kubectl create secret generic traceway-token -n traceway \+# --from-literal=token='<your-project-token>'+# kubectl create configmap traceway-settings -n traceway \+# --from-literal=TRACEWAY_CLUSTER_NAME=production-eu \+# --from-literal=TRACEWAY_ENDPOINT=https://cloud.tracewayapp.com/api/otel+mode: daemonset++image:+ repository: otel/opentelemetry-collector-contrib++presets:+ hostMetrics:+ enabled: true+ kubeletMetrics:+ enabled: true+ logsCollection:+ enabled: true+ kubernetesAttributes:+ enabled: true++extraEnvs:+ - name: TRACEWAY_TOKEN+ valueFrom:+ secretKeyRef:+ name: traceway-token+ key: token+ - name: TRACEWAY_ENDPOINT+ valueFrom:+ configMapKeyRef:+ name: traceway-settings+ key: TRACEWAY_ENDPOINT+ - name: TRACEWAY_CLUSTER_NAME+ valueFrom:+ configMapKeyRef:+ name: traceway-settings+ key: TRACEWAY_CLUSTER_NAME++config:+ receivers:+ # The hostMetrics preset wires up the scrapers and the /hostfs mount, but+ # leaves the three *.utilization metrics off. Traceway's organization+ # overview reads exactly those, so turn them on.+ hostmetrics:+ collection_interval: 30s+ scrapers:+ cpu:+ metrics:+ system.cpu.utilization:+ enabled: true+ memory:+ metrics:+ system.memory.utilization:+ enabled: true+ filesystem:+ metrics:+ system.filesystem.utilization:+ enabled: true+ kubeletstats:+ collection_interval: 30s+ metric_groups: [node, pod]++ processors:+ resource/cluster:+ attributes:+ - key: k8s.cluster.name+ value: ${env:TRACEWAY_CLUSTER_NAME}+ action: upsert+ - key: k8s.node.name+ value: ${env:K8S_NODE_NAME}+ action: upsert+ # service.name becomes the server_name tag in Traceway. Naming it after the+ # node gives one instance row per node in the organization overview.+ resource/node:+ attributes:+ - key: service.name+ value: ${env:K8S_NODE_NAME}+ action: upsert+ - key: host.name+ value: ${env:K8S_NODE_NAME}+ action: upsert+ transform/log_service_name:+ error_mode: ignore+ log_statements:+ - context: resource+ statements:+ - set(attributes["service.name"], attributes["k8s.container.name"]) where attributes["service.name"] == nil++ exporters:+ otlphttp/traceway:+ endpoint: ${env:TRACEWAY_ENDPOINT}+ headers:+ Authorization: Bearer ${env:TRACEWAY_TOKEN}+ compression: gzip+ retry_on_failure:+ enabled: true+ sending_queue:+ enabled: true+ queue_size: 1000++ service:+ pipelines:+ # The node agent ships no traces of its own; applications export those+ # directly or through the gateway.+ traces: null+ metrics:+ receivers: [hostmetrics, kubeletstats]+ processors:+ [memory_limiter, k8sattributes, resource/cluster, resource/node, batch]+ exporters: [otlphttp/traceway]+ logs:+ receivers: [filelog]+ processors:+ [+ memory_limiter,+ k8sattributes,+ resource/cluster,+ transform/log_service_name,+ batch,+ ]+ exporters: [otlphttp/traceway]++resources:+ requests:+ cpu: 100m+ memory: 200Mi+ limits:+ memory: 500Midiff --git a/examples/kubernetes/traceway-gateway.yaml b/examples/kubernetes/traceway-gateway.yamlnew file mode 100644index 00000000..fa0d7e55--- /dev/null+++ b/examples/kubernetes/traceway-gateway.yaml@@ -0,0 +1,179 @@+# Traceway OTLP gateway (optional)+#+# An in-cluster OTLP endpoint your applications export to instead of talking to+# Traceway directly. Worth deploying when you want:+#+# - the project token in one Secret instead of in every application's env+# - k8s.pod.name / k8s.namespace.name / k8s.deployment.name added to+# application metrics and logs automatically+# - one place to change the Traceway URL, batching, or retry behaviour+#+# Requires traceway-kubernetes.yaml to be applied first: it reuses the+# traceway namespace, the traceway-collector ServiceAccount and RBAC, the+# traceway-settings ConfigMap, and the traceway-token Secret.+#+# kubectl apply -f traceway-gateway.yaml+#+# Then point applications at it:+#+# OTEL_EXPORTER_OTLP_ENDPOINT=http://traceway-gateway.traceway.svc.cluster.local:4318+#+# and drop the Authorization header from the application; the gateway adds it.+#+# Docs: https://docs.tracewayapp.com/learn/kubernetes+---+apiVersion: v1+kind: ConfigMap+metadata:+ name: traceway-gateway+ namespace: traceway+data:+ config.yaml: |+ extensions:+ health_check:+ endpoint: 0.0.0.0:13133++ receivers:+ otlp:+ protocols:+ grpc:+ endpoint: 0.0.0.0:4317+ http:+ endpoint: 0.0.0.0:4318++ processors:+ memory_limiter:+ check_interval: 2s+ limit_percentage: 80+ spike_limit_percentage: 20++ batch:+ send_batch_size: 512+ timeout: 5s++ k8sattributes:+ auth_type: serviceAccount+ passthrough: false+ extract:+ metadata:+ - k8s.namespace.name+ - k8s.pod.name+ - k8s.pod.uid+ - k8s.deployment.name+ - k8s.node.name+ - container.image.name+ pod_association:+ - sources:+ - from: resource_attribute+ name: k8s.pod.uid+ - sources:+ - from: connection++ # Applications set their own service.name; only cluster identity is added+ # here. Traceway groups instances by k8s.cluster.name.+ resource/cluster:+ attributes:+ - key: k8s.cluster.name+ value: ${env:TRACEWAY_CLUSTER_NAME}+ action: upsert++ exporters:+ otlphttp/traceway:+ endpoint: ${env:TRACEWAY_ENDPOINT}+ headers:+ Authorization: Bearer ${env:TRACEWAY_TOKEN}+ compression: gzip+ retry_on_failure:+ enabled: true+ sending_queue:+ enabled: true+ queue_size: 2000++ service:+ extensions: [health_check]+ pipelines:+ traces:+ receivers: [otlp]+ processors: [memory_limiter, k8sattributes, resource/cluster, batch]+ exporters: [otlphttp/traceway]+ metrics:+ receivers: [otlp]+ processors: [memory_limiter, k8sattributes, resource/cluster, batch]+ exporters: [otlphttp/traceway]+ logs:+ receivers: [otlp]+ processors: [memory_limiter, k8sattributes, resource/cluster, batch]+ exporters: [otlphttp/traceway]+---+apiVersion: apps/v1+kind: Deployment+metadata:+ name: traceway-gateway+ namespace: traceway+ labels:+ app.kubernetes.io/name: traceway-gateway+spec:+ replicas: 2+ selector:+ matchLabels:+ app.kubernetes.io/name: traceway-gateway+ template:+ metadata:+ labels:+ app.kubernetes.io/name: traceway-gateway+ spec:+ serviceAccountName: traceway-collector+ containers:+ - name: collector+ image: otel/opentelemetry-collector-contrib:0.154.0+ args: ["--config=/conf/config.yaml"]+ env:+ - name: TRACEWAY_TOKEN+ valueFrom:+ secretKeyRef:+ name: traceway-token+ key: token+ envFrom:+ - configMapRef:+ name: traceway-settings+ ports:+ - name: otlp-grpc+ containerPort: 4317+ - name: otlp-http+ containerPort: 4318+ - name: health+ containerPort: 13133+ livenessProbe:+ httpGet:+ path: /+ port: health+ initialDelaySeconds: 15+ resources:+ requests:+ cpu: 200m+ memory: 400Mi+ limits:+ memory: 1Gi+ volumeMounts:+ - name: config+ mountPath: /conf+ volumes:+ - name: config+ configMap:+ name: traceway-gateway+---+apiVersion: v1+kind: Service+metadata:+ name: traceway-gateway+ namespace: traceway+spec:+ selector:+ app.kubernetes.io/name: traceway-gateway+ ports:+ - name: otlp-grpc+ port: 4317+ targetPort: otlp-grpc+ - name: otlp-http+ port: 4318+ targetPort: otlp-httpdiff --git a/examples/kubernetes/traceway-kubernetes.yaml b/examples/kubernetes/traceway-kubernetes.yamlnew file mode 100644index 00000000..63c4fcb3--- /dev/null+++ b/examples/kubernetes/traceway-kubernetes.yaml@@ -0,0 +1,465 @@+# Traceway for Kubernetes+#+# Two OpenTelemetry Collector workloads that cover a whole cluster:+#+# traceway-node-agent DaemonSet host metrics per node, kubelet pod metrics, pod logs+# traceway-cluster-agent Deployment cluster state metrics and Kubernetes events+#+# Before applying, create the namespace and the project token secret:+#+# kubectl create namespace traceway+# kubectl create secret generic traceway-token \+# --namespace traceway --from-literal=token='<your-project-token>'+#+# Then set the two values in the traceway-settings ConfigMap below and apply:+#+# kubectl apply -f traceway-kubernetes.yaml+#+# Docs: https://docs.tracewayapp.com/learn/kubernetes+---+apiVersion: v1+kind: Namespace+metadata:+ name: traceway+---+apiVersion: v1+kind: ConfigMap+metadata:+ name: traceway-settings+ namespace: traceway+data:+ # Name this cluster. It becomes k8s.cluster.name on every series and is what+ # the organization overview groups instances by. Use one distinct value per+ # cluster, even across Traceway projects.+ TRACEWAY_CLUSTER_NAME: production-eu+ # OTLP/HTTP base URL of your Traceway instance. The collector appends+ # /v1/metrics, /v1/logs and /v1/traces itself.+ # Traceway Cloud: https://cloud.tracewayapp.com/api/otel+ TRACEWAY_ENDPOINT: https://cloud.tracewayapp.com/api/otel+---+apiVersion: v1+kind: ServiceAccount+metadata:+ name: traceway-collector+ namespace: traceway+---+apiVersion: rbac.authorization.k8s.io/v1+kind: ClusterRole+metadata:+ name: traceway-collector+rules:+ - apiGroups: [""]+ resources:+ - events+ - namespaces+ - namespaces/status+ - nodes+ - nodes/spec+ - nodes/stats+ - nodes/proxy+ - pods+ - pods/status+ - replicationcontrollers+ - replicationcontrollers/status+ - resourcequotas+ - services+ verbs: [get, list, watch]+ - apiGroups: [events.k8s.io]+ resources: [events]+ verbs: [get, list, watch]+ - apiGroups: [apps]+ resources: [daemonsets, deployments, replicasets, statefulsets]+ verbs: [get, list, watch]+ - apiGroups: [batch]+ resources: [jobs, cronjobs]+ verbs: [get, list, watch]+ - apiGroups: [autoscaling]+ resources: [horizontalpodautoscalers]+ verbs: [get, list, watch]+---+apiVersion: rbac.authorization.k8s.io/v1+kind: ClusterRoleBinding+metadata:+ name: traceway-collector+roleRef:+ apiGroup: rbac.authorization.k8s.io+ kind: ClusterRole+ name: traceway-collector+subjects:+ - kind: ServiceAccount+ name: traceway-collector+ namespace: traceway+---+apiVersion: v1+kind: ConfigMap+metadata:+ name: traceway-node-agent+ namespace: traceway+data:+ config.yaml: |+ extensions:+ # Remembers how far each pod log file was read, so a restarted agent does+ # not replay or skip lines.+ file_storage:+ directory: /var/lib/traceway-collector+ health_check:+ endpoint: 0.0.0.0:13133++ receivers:+ # Host metrics for the node itself. These are what the Traceway+ # organization overview reads to build one instance row per node, so the+ # three *.utilization metrics below must be enabled explicitly: the+ # hostmetrics receiver ships them turned off.+ hostmetrics:+ root_path: /hostfs+ collection_interval: 30s+ scrapers:+ cpu:+ metrics:+ system.cpu.utilization:+ enabled: true+ load:+ memory:+ metrics:+ system.memory.utilization:+ enabled: true+ filesystem:+ include_fs_types:+ match_type: strict+ fs_types: [btrfs, ext2, ext3, ext4, xfs, zfs]+ metrics:+ system.filesystem.utilization:+ enabled: true+ disk:+ network:++ # Per-node and per-pod resource usage, straight from the kubelet.+ # Add "container" to metric_groups for per-container series; it multiplies+ # the number of stored series, so turn it on deliberately.+ kubeletstats:+ collection_interval: 30s+ auth_type: serviceAccount+ endpoint: https://${env:K8S_NODE_NAME}:10250+ insecure_skip_verify: true+ metric_groups: [node, pod]++ # Every container's stdout/stderr on this node.+ filelog:+ include: [/var/log/pods/*/*/*.log]+ exclude: [/var/log/pods/traceway_*/*/*.log]+ start_at: end+ include_file_path: true+ storage: file_storage+ operators:+ # Handles containerd, CRI-O and Docker log formats and lifts+ # k8s.pod.name, k8s.namespace.name and k8s.container.name off the path.+ - type: container+ id: container-parser++ processors:+ memory_limiter:+ check_interval: 2s+ limit_percentage: 80+ spike_limit_percentage: 20++ batch:+ send_batch_size: 512+ timeout: 5s++ # Cluster and node identity on everything this agent ships.+ # k8s.cluster.name is what the organization overview groups by.+ resource/cluster:+ attributes:+ - key: k8s.cluster.name+ value: ${env:TRACEWAY_CLUSTER_NAME}+ action: upsert+ - key: k8s.node.name+ value: ${env:K8S_NODE_NAME}+ action: upsert++ # service.name becomes the server_name tag in Traceway, which is the+ # identity of an instance. Naming it after the node gives one row per node.+ resource/node:+ attributes:+ - key: service.name+ value: ${env:K8S_NODE_NAME}+ action: upsert+ - key: host.name+ value: ${env:K8S_NODE_NAME}+ action: upsert++ k8sattributes:+ auth_type: serviceAccount+ passthrough: false+ filter:+ node_from_env_var: K8S_NODE_NAME+ extract:+ metadata:+ - k8s.namespace.name+ - k8s.pod.name+ - k8s.pod.uid+ - k8s.deployment.name+ - k8s.node.name+ - container.image.name+ pod_association:+ - sources:+ - from: resource_attribute+ name: k8s.pod.uid+ - sources:+ - from: resource_attribute+ name: k8s.pod.name+ - from: resource_attribute+ name: k8s.namespace.name+ - sources:+ - from: connection++ # Pod logs have no service.name of their own; the Logs page filters on it,+ # so fall back to the container name.+ transform/log_service_name:+ error_mode: ignore+ log_statements:+ - context: resource+ statements:+ - set(attributes["service.name"], attributes["k8s.container.name"]) where attributes["service.name"] == nil++ exporters:+ otlphttp/traceway:+ endpoint: ${env:TRACEWAY_ENDPOINT}+ headers:+ Authorization: Bearer ${env:TRACEWAY_TOKEN}+ compression: gzip+ retry_on_failure:+ enabled: true+ sending_queue:+ enabled: true+ queue_size: 1000++ service:+ extensions: [file_storage, health_check]+ pipelines:+ metrics/host:+ receivers: [hostmetrics]+ processors: [memory_limiter, resource/cluster, resource/node, batch]+ exporters: [otlphttp/traceway]+ metrics/kubelet:+ receivers: [kubeletstats]+ processors: [memory_limiter, k8sattributes, resource/cluster, resource/node, batch]+ exporters: [otlphttp/traceway]+ logs:+ receivers: [filelog]+ processors:+ [+ memory_limiter,+ k8sattributes,+ resource/cluster,+ transform/log_service_name,+ batch,+ ]+ exporters: [otlphttp/traceway]+---+apiVersion: apps/v1+kind: DaemonSet+metadata:+ name: traceway-node-agent+ namespace: traceway+ labels:+ app.kubernetes.io/name: traceway-node-agent+spec:+ selector:+ matchLabels:+ app.kubernetes.io/name: traceway-node-agent+ updateStrategy:+ type: RollingUpdate+ template:+ metadata:+ labels:+ app.kubernetes.io/name: traceway-node-agent+ spec:+ serviceAccountName: traceway-collector+ # Reading /hostfs and the kubelet's log directory needs uid 0.+ securityContext:+ runAsUser: 0+ runAsGroup: 0+ tolerations:+ - operator: Exists+ containers:+ - name: collector+ image: otel/opentelemetry-collector-contrib:0.154.0+ args: ["--config=/conf/config.yaml"]+ env:+ - name: K8S_NODE_NAME+ valueFrom:+ fieldRef:+ fieldPath: spec.nodeName+ - name: TRACEWAY_TOKEN+ valueFrom:+ secretKeyRef:+ name: traceway-token+ key: token+ envFrom:+ - configMapRef:+ name: traceway-settings+ ports:+ - name: health+ containerPort: 13133+ livenessProbe:+ httpGet:+ path: /+ port: health+ initialDelaySeconds: 15+ resources:+ requests:+ cpu: 100m+ memory: 200Mi+ limits:+ memory: 500Mi+ volumeMounts:+ - name: config+ mountPath: /conf+ - name: hostfs+ mountPath: /hostfs+ readOnly: true+ mountPropagation: HostToContainer+ - name: pod-logs+ mountPath: /var/log/pods+ readOnly: true+ - name: checkpoints+ mountPath: /var/lib/traceway-collector+ volumes:+ - name: config+ configMap:+ name: traceway-node-agent+ - name: hostfs+ hostPath:+ path: /+ - name: pod-logs+ hostPath:+ path: /var/log/pods+ - name: checkpoints+ hostPath:+ path: /var/lib/traceway-collector+ type: DirectoryOrCreate+---+apiVersion: v1+kind: ConfigMap+metadata:+ name: traceway-cluster-agent+ namespace: traceway+data:+ config.yaml: |+ extensions:+ health_check:+ endpoint: 0.0.0.0:13133++ receivers:+ # Cluster state: pod phases, deployment replicas, node conditions,+ # allocatable and requested resources.+ k8s_cluster:+ collection_interval: 30s+ node_conditions_to_report: [Ready, MemoryPressure, DiskPressure, PIDPressure]+ allocatable_types_to_report: [cpu, memory, storage, ephemeral-storage]++ # Kubernetes events (scheduling failures, OOMKilled, image pull errors)+ # arrive on the Traceway Logs page.+ k8sobjects:+ auth_type: serviceAccount+ objects:+ - name: events+ mode: watch+ group: events.k8s.io++ processors:+ memory_limiter:+ check_interval: 2s+ limit_percentage: 80+ spike_limit_percentage: 20++ batch:+ send_batch_size: 512+ timeout: 5s++ resource/cluster:+ attributes:+ - key: k8s.cluster.name+ value: ${env:TRACEWAY_CLUSTER_NAME}+ action: upsert+ # Cluster-wide series are not tied to a node, so they report under the+ # cluster's own name rather than any instance.+ - key: service.name+ value: ${env:TRACEWAY_CLUSTER_NAME}+ action: upsert++ exporters:+ otlphttp/traceway:+ endpoint: ${env:TRACEWAY_ENDPOINT}+ headers:+ Authorization: Bearer ${env:TRACEWAY_TOKEN}+ compression: gzip+ retry_on_failure:+ enabled: true++ service:+ extensions: [health_check]+ pipelines:+ metrics:+ receivers: [k8s_cluster]+ processors: [memory_limiter, resource/cluster, batch]+ exporters: [otlphttp/traceway]+ logs:+ receivers: [k8sobjects]+ processors: [memory_limiter, resource/cluster, batch]+ exporters: [otlphttp/traceway]+---+apiVersion: apps/v1+kind: Deployment+metadata:+ name: traceway-cluster-agent+ namespace: traceway+ labels:+ app.kubernetes.io/name: traceway-cluster-agent+spec:+ # Must stay at 1. Two replicas would report every cluster metric twice.+ replicas: 1+ selector:+ matchLabels:+ app.kubernetes.io/name: traceway-cluster-agent+ template:+ metadata:+ labels:+ app.kubernetes.io/name: traceway-cluster-agent+ spec:+ serviceAccountName: traceway-collector+ containers:+ - name: collector+ image: otel/opentelemetry-collector-contrib:0.154.0+ args: ["--config=/conf/config.yaml"]+ env:+ - name: TRACEWAY_TOKEN+ valueFrom:+ secretKeyRef:+ name: traceway-token+ key: token+ envFrom:+ - configMapRef:+ name: traceway-settings+ ports:+ - name: health+ containerPort: 13133+ livenessProbe:+ httpGet:+ path: /+ port: health+ initialDelaySeconds: 15+ resources:+ requests:+ cpu: 100m+ memory: 200Mi+ limits:+ memory: 500Mi+ volumeMounts:+ - name: config+ mountPath: /conf+ volumes:+ - name: config+ configMap:+ name: traceway-cluster-agentdiff --git a/skills/traceway-setup/SKILL.md b/skills/traceway-setup/SKILL.mdindex be90dea6..30051c67 100644--- a/skills/traceway-setup/SKILL.md+++ b/skills/traceway-setup/SKILL.md@@ -43,7 +43,7 @@ Still run Step 1, because it decides *how* to instrument. Collapse "Propose andBefore changing anything, build a picture of what is deployed and what is already instrumented:1. **Frameworks and languages**: detect them from `package.json`, `go.mod`, `composer.json`, `requirements.txt`/`pyproject.toml`, `pubspec.yaml`, `build.gradle`(`.kts`), `Package.swift`, `*.xcodeproj`/`*.xcworkspace`, `Podfile`, and source extensions. For iOS/Apple targets, note whether the sources are Swift or Objective-C. That choice picks the path in "Frontend and Mobile" (Swift gets the native SDK; Objective-C-only has none and falls back to OTel).-2. **Deployable components and entry points**: inventory APIs, SSR servers, browser apps, workers, schedulers, CLIs, and mobile applications. Treat code organization as evidence, not proof that something is deployed.+2. **Deployable components and entry points**: inventory APIs, SSR servers, browser apps, workers, schedulers, CLIs, and mobile applications. Treat code organization as evidence, not proof that something is deployed. Note the deployment target while you are here: Kubernetes manifests, a Helm chart, Kustomize overlays, `Dockerfile` plus a compose file, or cloud-init / Ansible / Terraform. It decides the host-metrics path in Step 8.3. **Existing observability**: find OpenTelemetry configuration, Traceway SDKs, Sentry, Datadog, New Relic, Honeycomb, logging exporters, tracing middleware, source map or symbol upload steps, and observability environment-variable names. Explain whether Traceway will replace, coexist with, or extend each integration. Never display discovered credential values.4. **Production role of JS meta-frameworks** (Next.js, SvelteKit, Remix, Nuxt): never assume full-stack.- **Frontend-only signals**: `output: 'export'` in `next.config.*` (static export, so there is no server in production); no API routes (`app/api/**/route.*`, `pages/api/*`) or only trivial ones; no `'use server'` server actions; `rewrites`/proxy config or a `NEXT_PUBLIC_API_URL`-style env var pointing the browser at an external API; a separate backend service in this repo, another repo, or another language; static hosting in the deploy config (S3/CloudFront, GitHub Pages, nginx serving `out/`).@@ -660,10 +660,12 @@ Use the deployment and host-metrics choice confirmed in "Propose and Confirm the| Deployment | Wants host metrics | What to do ||---|---|---|| Docker on a VM, or directly on a VM/host | Yes | Install the **Traceway OTel Agent** on the host (below). For Docker deploys this is the default; the agent goes on the host, not in a container. |-| Kubernetes | Any | Agent not applicable (host service, no Docker image or K8s manifests by design). In-process app metrics still flow via the OTLP metrics exporter from "Backend OTel Setup". |+| Kubernetes | Any | Not the agent, which is a host service. Deploy the two collector workloads in `kubernetes.md` in this skill directory: a DaemonSet for node metrics, pod metrics and container logs, and a one-replica Deployment for cluster state and events. In-process app metrics still flow via the OTLP metrics exporter from "Backend OTel Setup". || Serverless / PaaS | Any | No host to install on; skip. || Anything | No | Skip. |+On Kubernetes, stop here and read `kubernetes.md` in this skill directory. The four things that decide whether it works (`service.name` per node, the three `*.utilization` metrics that ship disabled, `k8s.cluster.name`, and `root_path: /hostfs`) are all easy to miss, and getting any of them wrong produces a plausible-looking config that reports nothing useful.+The agent is a tiny pre-configured OTel Collector that scrapes host metrics every 60s. It MUST use the same backend project token as the API, workers, tasks, and AI traces. Install it on the host (Linux systemd / macOS launchd; PowerShell installer exists for Windows):```bash@@ -696,6 +698,7 @@ When the CLI applied the plan, the local env files hold real values, so run loca- If logs were wired, emit one INFO and one ERROR line inside a request, then open `/logs`. Both carry the same trace id as that endpoint.- If "AI Traces" applied, make one model call, then open `/ai-traces`. The call is listed with model, tokens, and cost where available.- Open `/dashboards` and confirm application/runtime metrics arrive. If the OTel Agent was installed, host metrics reach this same backend project within about 60 seconds, each host under its own `server_name` tag.+ - If host or Kubernetes metrics were set up, open `/organization`. Every host and node appears as its own instance row with CPU, memory and disk. Kubernetes nodes are grouped by cluster. One row where you expected several means `service.name` is not distinct per machine; empty rings mean the `*.utilization` metrics are not enabled.2. **Browser project**- Trigger a test browser error and confirm it appears in this project, not the backend project.- Confirm the stack resolves to original source files and lines after the matching source maps and bundles are uploaded.diff --git a/skills/traceway-setup/kubernetes.md b/skills/traceway-setup/kubernetes.mdnew file mode 100644index 00000000..ab698099--- /dev/null+++ b/skills/traceway-setup/kubernetes.md@@ -0,0 +1,118 @@+# Kubernetes++How to report a whole Kubernetes cluster to Traceway. Read this when "Deployment and Server Metrics" resolved the deployment to Kubernetes, or when the repo carries Kubernetes manifests, Helm charts, or Kustomize overlays for the deployed component.++The applications keep their normal OpenTelemetry instrumentation from "Backend OTel Setup". This adds the layer underneath them: node health, pod resource usage, container logs, cluster state and Kubernetes events.++Public docs: https://docs.tracewayapp.com/learn/kubernetes++## What to deploy++Two OpenTelemetry Collector workloads, both using the **same project token as the application**:++| Workload | Reads | Becomes |+|---|---|---|+| `traceway-node-agent` (DaemonSet) | hostmetrics of each node, kubelet node/pod metrics, `/var/log/pods` | One instance row per node in the organization overview, `k8s.pod.*` metrics, container logs |+| `traceway-cluster-agent` (Deployment, 1 replica) | `k8s_cluster` state, Kubernetes events | Cluster metrics, events on the Logs page |++Ready-made manifests: https://github.com/tracewayapp/traceway/tree/main/examples/kubernetes++```bash+kubectl create namespace traceway+kubectl create secret generic traceway-token -n traceway \+ --from-literal=token='<project-token>'+curl -O https://raw.githubusercontent.com/tracewayapp/traceway/main/examples/kubernetes/traceway-kubernetes.yaml+# edit TRACEWAY_CLUSTER_NAME and TRACEWAY_ENDPOINT in the traceway-settings ConfigMap+kubectl apply -f traceway-kubernetes.yaml+```++Do not commit the token. If the repo has a manifests directory, add the collector YAML there with the token referenced from an existing Secret or from the project's sealed-secret / external-secret mechanism, and match the repo's conventions (Kustomize base+overlay, Helm chart, plain manifests). If the repo has no manifests, hand the operator the commands; do not create a manifests directory for them.++## The four rules that decide whether it works++**1. `service.name` on the node agent must be the node name.**++`server_name` in Traceway comes from the `service.name` resource attribute, and `server_name` is the identity of an instance. Set it from the downward API:++```yaml+env:+ - name: K8S_NODE_NAME+ valueFrom:+ fieldRef:+ fieldPath: spec.nodeName+```++```yaml+processors:+ resource/node:+ attributes:+ - key: service.name+ value: ${env:K8S_NODE_NAME}+ action: upsert+```++Without it every node reports under the collector's own service name and the whole cluster collapses into one instance row.++**2. The three `*.utilization` metrics must be enabled explicitly.**++`system.cpu.utilization`, `system.memory.utilization` and `system.filesystem.utilization` ship **disabled** in the hostmetrics receiver, and the OpenTelemetry Helm chart's `hostMetrics` preset does not turn them on. They are exactly what the organization overview reads for the CPU, memory and disk rings.++```yaml+receivers:+ hostmetrics:+ root_path: /hostfs+ scrapers:+ cpu:+ metrics:+ system.cpu.utilization: { enabled: true }+ memory:+ metrics:+ system.memory.utilization: { enabled: true }+ filesystem:+ metrics:+ system.filesystem.utilization: { enabled: true }+```++**3. `k8s.cluster.name` must be set, and distinct per cluster.**++It is on the metric resource-attribute allowlist and is what the organization overview groups instances by. Nothing sets it automatically; add it with a `resource` processor from an env var.++**4. hostmetrics in a container needs `root_path: /hostfs` and the host root mounted there**, read-only, with the pod running as uid 0. Otherwise the numbers describe the collector's container, not the node.++## What survives per signal++Traceway does not store arbitrary resource attributes. Per signal:++- **Metrics**: an allowlist, which includes `k8s.cluster.name`, `k8s.pod.name`, `k8s.namespace.name`, `k8s.node.name`, `k8s.deployment.name`, `k8s.container.name`, `container.name`, `container.image.name`, plus `host.*`, `os.*` and `cloud.*`. Full list in `data-model.md`.+- **Logs**: the entire resource attribute map is stored, so every Kubernetes attribute is filterable.+- **Traces**: only `service.name` and `service.version`. Pod and namespace do **not** reach spans. If a trace must carry which pod served it, set it as a span attribute in the application.++Never promise a user they can group Endpoints or Issues by pod. They cannot.++## Application telemetry: direct or through a gateway++Both are correct; pick by whether the token should exist in every namespace.++**Direct** (default, fewer moving parts): each Deployment sets `OTEL_EXPORTER_OTLP_ENDPOINT=https://<instance>/api/otel` and `OTEL_EXPORTER_OTLP_HEADERS=Authorization=Bearer <token>` from a Secret, exactly as in "Backend OTel Setup".++**Gateway**: deploy `traceway-gateway.yaml`, then applications export to `http://traceway-gateway.traceway.svc.cluster.local:4318` with no credentials. The token exists once, and the gateway adds `k8s.pod.name`, `k8s.namespace.name` and `k8s.deployment.name` to application metrics and logs. Propose this when the repo already has many services or when the user raised secret sprawl.++Either way the application keeps its own `OTEL_SERVICE_NAME`. Pods are not instances; nodes are.++## Cardinality++Pod names change on every rollout, and each distinct tag value is a stored series. Default `kubeletstats` to `metric_groups: [node, pod]`; add `container` only when asked. When building dashboards, group by `k8s.deployment.name` for anything meant to be stable over time and reserve `k8s.pod.name` for debugging.++## Verify++1. `kubectl -n traceway rollout status daemonset/traceway-node-agent`+2. Organization overview: one instance row per node, grouped under the cluster name, with CPU/memory/disk rings filled in.+3. Logs page: container output arriving, filterable by `k8s.namespace.name`.+4. Dashboards: install the **OTelemetry Server Agent** template (Cmd K); it already matches the node agent's metric names.++Common failures, in the order they actually happen: `*.utilization` not enabled (rings empty), `service.name` not per node (one row instead of N), `k8s.cluster.name` missing (no cluster grouping option), token is not the project token (401 in the collector logs).++## Not this++- The Traceway OTel Agent installer (`install.tracewayapp.com/install.sh`) is a host service, systemd/launchd/Windows. It is not for Kubernetes. Do not suggest running it in a container or as a DaemonSet.+- The `helm/traceway` chart in the Traceway repo deploys **Traceway itself** into a cluster. It has nothing to do with monitoring one. Only bring it up if the user is self-hosting Traceway on Kubernetes.diff --git a/website/app/product/fleet/page.tsx b/website/app/product/fleet/page.tsxnew file mode 100644index 00000000..6b577d48--- /dev/null+++ b/website/app/product/fleet/page.tsx@@ -0,0 +1,293 @@+import Link from "next/link";+import type { Metadata } from "next";+import { ArrowRight, Boxes } from "lucide-react";++import { Chip } from "@/components/chip";+import { Eyebrow } from "@/components/eyebrow";+import { SectionHead } from "@/components/section-head";+import { FeatureRow } from "@/components/feature-row";+import { FaqList } from "@/components/faq-list";+import { FinalCTA } from "@/components/final-cta";+import { Terminal } from "@/components/terminal";+import { AuroraBackground } from "@/components/aurora-background";++export const metadata: Metadata = {+ title: "Fleet Overview · Traceway",+ description:+ "One page for every server, Kubernetes node, project, issue, monitor, and open on-call page across your organization. Cluster-wide instrumentation in one kubectl apply.",+};++export default function FleetPage() {+ return (+ <main className="relative">+ <section className="hero hero-product relative">+ <AuroraBackground variant="hero" />+ <div className="wrap relative z-10">+ <Chip variant="ok">+ <Boxes className="h-3 w-3 inline mr-1" />+ Organization Overview & Kubernetes+ </Chip>+ <h1 className="mt-6">+ Ten projects. Sixty machines. <em>One page.</em>+ </h1>+ <p className="hero-sub">+ Per-project dashboards stop working the moment you have more than a+ few. The organization overview sits above all of them: every+ instance reporting in, every issue, every monitor, and every page+ that still needs a human. Kubernetes nodes group by cluster, plain+ hosts sit alongside them, and one click lands you in the dashboard+ for the box that is actually on fire.+ </p>+ <div className="hero-cta-row">+ <Link+ href="https://docs.tracewayapp.com/learn/organization-overview"+ className="btn btn-accent"+ >+ Read the Docs <ArrowRight className="h-4 w-4" />+ </Link>+ <Link+ href="https://cloud.tracewayapp.com/register"+ className="btn btn-ghost"+ >+ Try Traceway Cloud+ </Link>+ </div>+ </div>+ </section>++ <div className="band-light">+ <section className="wrap">+ <FeatureRow+ eyebrow="Operational pulse"+ title={+ <>+ The fleet, <em>as one heartbeat</em>+ </>+ }+ description="CPU, memory, disk, and network for every machine reporting into the organization, refreshed every minute. Rows sort worst-first, and stale outranks warning on purpose: a box that stopped talking is a bigger unknown than one running warm. Nothing to register and nothing to clean up, because an instance exists exactly as long as it reports."+ bullets={[+ "Critical, warning, stale, and healthy computed from live metrics",+ "One counter each for reporting, needs attention, stale, and network I/O",+ "Issues in 24h and open on-call pages across every project",+ "Search by host, OS, architecture, cloud region, cluster, or node",+ ]}+ image={{+ src: "/images/organization-overview.png",+ alt: "The Traceway organization overview: operational pulse counters and an instance table grouped by Kubernetes cluster",+ }}+ />+ </section>++ <section className="wrap">+ <div className="feature-row reverse">+ <div className="feat-copy">+ <Eyebrow>Kubernetes</Eyebrow>+ <h2>+ A whole cluster, <em>in one apply</em>+ </h2>+ <p>+ Two OpenTelemetry Collector workloads cover everything: a+ DaemonSet for node health, pod resource usage, and container+ logs, and one small Deployment for cluster state and Kubernetes+ events. Every node becomes an instance row, grouped under your+ cluster name. Half-migrated fleets still read as one fleet,+ because plain hosts sit in the same table.+ </p>+ <ul className="feat-bullets">+ <li>Node CPU, memory, disk, and network per node</li>+ <li>Pod metrics, container stdout, cluster events</li>+ <li>Group and filter by cluster, namespace, node, deployment</li>+ <li>Optional in-cluster gateway so the token lives in one Secret</li>+ </ul>+ </div>+ <Terminal+ title="bash · cluster instrumentation"+ lines={[+ {+ ln: "1",+ type: "tx",+ content: (+ <>+ <span className="cmd">$</span> kubectl create secret+ generic traceway-token -n traceway \+ </>+ ),+ },+ {+ ln: "2",+ type: "tx",+ content: " --from-literal=token=$TRACEWAY_PROJECT_TOKEN",+ },+ {+ ln: "3",+ type: "tx",+ content: (+ <>+ <span className="cmd">$</span> kubectl apply -f+ traceway-kubernetes.yaml+ </>+ ),+ },+ {+ ln: "4",+ type: "mute",+ content: "daemonset.apps/traceway-node-agent created",+ },+ {+ ln: "5",+ type: "mute",+ content: "deployment.apps/traceway-cluster-agent created",+ },+ {+ ln: "6",+ type: "ok",+ content: "✓ 12 nodes reporting under production-eu",+ },+ ]}+ />+ </div>+ </section>++ <section className="wrap">+ <FeatureRow+ eyebrow="Across every project"+ title={+ <>+ Uptime and incidents, <em>without the project hop</em>+ </>+ }+ description="Every monitor in the organization in one sortable list with its project, status, 30-day uptime, and average latency, over the organization's whole incident history. The Issues tab does the same for exceptions: everything that fired in the last 24 hours, newest first, labelled with the project that owns it. Triage first, drill in second."+ bullets={[+ "Monitors, uptime, latency, and last incident across all projects",+ "90 days of incident history, ongoing ones marked",+ "Recently active issues from every project in one feed",+ "Uptime excludes missed probes, so downtime never reads as 100%",+ ]}+ image={{+ src: "/images/organization-monitors.png",+ alt: "The organization Monitors tab: every monitor across projects with status, uptime, and average latency, plus recent incidents",+ }}+ />+ </section>++ <section className="wrap">+ <FeatureRow+ reverse+ eyebrow="Organizations and projects"+ title={+ <>+ One switcher for <em>everything you can see</em>+ </>+ }+ description="Projects are the isolation boundary for telemetry. Organizations own everything above them: members and roles, dashboards, teams, on-call rotations, escalation policies, and status pages. Belong to several and each keeps its own overview, which is what makes an organization the right shape for an agency's clients or a company's independent units."+ bullets={[+ "Organizations as headings, their projects nested underneath",+ "Every organization member can read the overview, read-only included",+ "Per-project role overrides shown as your effective access",+ "Sign in and land on the overview when you have more than one project",+ ]}+ image={{+ src: "/images/organization-switcher.png",+ alt: "The Traceway header switcher, listing organizations with their projects nested underneath",+ }}+ />+ </section>++ <section className="wrap">+ <FeatureRow+ eyebrow="From fleet to one box"+ title={+ <>+ Click a row, <em>land on the answer</em>+ </>+ }+ description="Selecting an instance opens its project's dashboards already filtered to that one machine over the last 30 minutes, on the server dashboard if the project has one installed. The scope is a URL parameter, so the filtered view is shareable and survives every time-range change you make while digging."+ bullets={[+ "Instance picker lists what actually reported in the range",+ "Applies on top of each widget's own filters, saves nothing",+ "Open on-call pages link straight to the page that fired",+ "Issue rows link to the exception in its own project",+ ]}+ image={{+ src: "/images/organization-issues.png",+ alt: "The organization Issues tab: recently active issues from every project with the project each belongs to",+ }}+ />+ </section>+ </div>++ <FinalCTA+ title={+ <>+ Stop opening <em>ten dashboards</em>+ </>+ }+ description="Fleet health, cross-project triage, Kubernetes, and on-call in the same tool that already holds your traces, logs, and errors. Open source if you self-host."+ primary={{+ label: "Read the Kubernetes docs",+ href: "https://docs.tracewayapp.com/learn/kubernetes",+ }}+ secondary={{+ label: "Start Free",+ href: "https://cloud.tracewayapp.com/register",+ }}+ />++ <section className="wrap pt-10 pb-24">+ <div className="max-w-3xl mx-auto">+ <SectionHead+ align="center"+ eyebrow="FAQ"+ title="Questions about fleets and clusters"+ />+ <div className="mt-4">+ <FaqList+ items={[+ {+ q: "What counts as an instance?",+ a: (+ <>+ <p>+ Anything reporting server metrics under its own{" "}+ <code>service.name</code>, which Traceway stores as the{" "}+ <code>server_name</code> tag. A VM with the OTel Agent, a+ bare-metal box, a Kubernetes node. Instances are+ discovered from the metrics themselves, so there is+ nothing to register and nothing to delete when a machine+ goes away.+ </p>+ </>+ ),+ },+ {+ q: "Are pods instances?",+ a: "No, nodes are. A pod moves, restarts, and gets a new name on every rollout, so a per-pod instance list would be noise. The node agent names each node, and pod identity lives on the metrics as k8s.pod.name, k8s.namespace.name, and k8s.deployment.name, which you group dashboards by. Applications keep their own service.name, so an API stays one service in Endpoints and Issues no matter which node it lands on.",+ },+ {+ q: "Can one organization hold several clusters?",+ a: "Yes, and several clusters can even share one project. Each cluster reports its own k8s.cluster.name, and the overview groups instances by it. Machines with no cluster attribute collect under \"Not in a Kubernetes cluster\", so a migration in progress still shows as one fleet rather than two tools.",+ },+ {+ q: "Do I need the OTel Agent as well as the Kubernetes collectors?",+ a: "Not on the same machine. The agent is a host service for VMs and bare metal; the DaemonSet covers nodes inside a cluster and reports the same hostmetrics, plus pod metrics, container logs, and cluster state. Most fleets run both, just not on the same box.",+ },+ {+ q: "Does the overview leak data across teams?",+ a: "No. It shows the organization's projects, which every member of that organization can already open, and it respects per-project role overrides: the Projects tab lists your effective access on each one. Read-only members can open it; it grants nothing they did not already have. Nothing is shared between separate organizations.",+ },+ {+ q: "How current is it?",+ a: "The instance table covers the last 30 minutes and the page refreshes itself every minute, with a manual refresh button. An instance is stale after three minutes of silence. A refresh that fails leaves the last good snapshot on screen with a warning instead of blanking the page, and one unreadable project never takes down the rest.",+ },+ {+ q: "Is this a paid feature?",+ a: "No. The organization overview and the Kubernetes manifests are part of self-hosted Traceway, which is fully open source, and part of every Traceway Cloud plan. Your plan sizes what you can send, not which views you get.",+ },+ ]}+ />+ </div>+ </div>+ </section>+ </main>+ );+}diff --git a/website/components/site-footer.tsx b/website/components/site-footer.tsxindex 2842e151..255a82c6 100644--- a/website/components/site-footer.tsx+++ b/website/components/site-footer.tsx@@ -20,6 +20,7 @@ const COLUMNS: Column[] = [{ label: "Exceptions / Stack Traces", href: "/product/stack-traces" },{ label: "Monitors", href: "/product/monitors" },{ label: "On-Call", href: "/product/on-call" },+ { label: "Fleet Overview", href: "/product/fleet" },],},{diff --git a/website/components/site-header.tsx b/website/components/site-header.tsxindex 666bf09b..f455ab04 100644--- a/website/components/site-header.tsx+++ b/website/components/site-header.tsx@@ -20,6 +20,7 @@ import {LayoutDashboard,PhoneCall,Radar,+ Boxes,} from "lucide-react";import { MobileNav } from "@/components/mobile-nav";import { DiscordIcon } from "@/components/discord-icon";@@ -77,6 +78,12 @@ const PILLARS: NavItem[] = [href: "/product/on-call",icon: PhoneCall,},+ {+ title: "Fleet Overview",+ description: "Every server, cluster, and project on one page.",+ href: "/product/fleet",+ icon: Boxes,+ },];const SPECIALIZED: NavItem[] = [diff --git a/website/public/images/organization-issues.png b/website/public/images/organization-issues.pngnew file mode 100644index 00000000..db20c63aBinary files /dev/null and b/website/public/images/organization-issues.png differdiff --git a/website/public/images/organization-monitors.png b/website/public/images/organization-monitors.pngnew file mode 100644index 00000000..3dd4d1d9Binary files /dev/null and b/website/public/images/organization-monitors.png differdiff --git a/website/public/images/organization-overview.png b/website/public/images/organization-overview.pngnew file mode 100644index 00000000..3ce8ba33Binary files /dev/null and b/website/public/images/organization-overview.png differdiff --git a/website/public/images/organization-switcher.png b/website/public/images/organization-switcher.pngnew file mode 100644index 00000000..d39802b9Binary files /dev/null and b/website/public/images/organization-switcher.png differ