The only tool you need to know what is happening and how to fix it.
Go alertingexception-trackerissue-trackinglogsmetricsmonitoringobservability-platformopen-telemetryotelsession-replaytelemetrytraces
fixes
ddux1b89cac50927
diff --git a/backend/app/controllers/widget_group.controller.go b/backend/app/controllers/widget_group.controller.goindex 5224750b..d5dcf8f5 100644--- a/backend/app/controllers/widget_group.controller.go+++ b/backend/app/controllers/widget_group.controller.go@@ -287,8 +287,12 @@ func (c *widgetGroupController) Delete(ctx *gin.Context) {return}- if existing.IsDefault {- ctx.JSON(http.StatusUnprocessableEntity, gin.H{"error": "Default groups cannot be deleted."})+ // Same transaction handles children + parent: delete child widgets first,+ // then the group itself. Don't lean on the FK cascade — explicit deletes+ // are easier to audit and survive future schema migrations that might+ // drop or alter the cascade rule.+ if err := repositories.WidgetGroupRepository.DeleteWidgetsByGroup(tx, id); err != nil {+ ctx.AbortWithError(http.StatusInternalServerError, traceway.NewStackTraceErrorf("failed to delete widget group widgets: %w", err))return}diff --git a/backend/app/repositories/widget_group.repository.go b/backend/app/repositories/widget_group.repository.goindex b1de1f0c..164d8ff7 100644--- a/backend/app/repositories/widget_group.repository.go+++ b/backend/app/repositories/widget_group.repository.go@@ -68,4 +68,16 @@ func (r *widgetGroupRepository) DeleteWidget(tx *sql.Tx, id int) error {return lit.DeleteNamed(db.Driver, tx, "DELETE FROM widget_group_widgets WHERE id = :id", lit.P{"id": id})}+// DeleteWidgetsByGroup removes every widget belonging to the group. Use this+// before WidgetGroupRepository.Delete so the group + child widgets disappear+// together within the same transaction (rather than relying on the FK cascade+// — explicit is cheaper to audit and makes the SQL log self-explanatory).+func (r *widgetGroupRepository) DeleteWidgetsByGroup(tx *sql.Tx, widgetGroupId int) error {+ return lit.DeleteNamed(+ db.Driver, tx,+ "DELETE FROM widget_group_widgets WHERE widget_group_id = :wg_id",+ lit.P{"wg_id": widgetGroupId},+ )+}+var WidgetGroupRepository = widgetGroupRepository{}diff --git a/docs/pages/learn/_meta.json b/docs/pages/learn/_meta.jsonindex b7c5c453..692da3d5 100644--- a/docs/pages/learn/_meta.json+++ b/docs/pages/learn/_meta.json@@ -10,6 +10,7 @@"logs": "Logs","alerts": "Alerts","embedded-mode": "Embedded Mode",+ "otel-agent": "OTel Agent","build-tags": "Build Tags","contributing": "Contributing"}diff --git a/docs/pages/learn/metrics.mdx b/docs/pages/learn/metrics.mdxindex 90dcd3e4..6c070693 100644--- a/docs/pages/learn/metrics.mdx+++ b/docs/pages/learn/metrics.mdx@@ -98,3 +98,7 @@ This keeps queries fast regardless of the time window.2. **Add a widget** — Click **Add Widget**, pick a metric from the dropdown, choose an aggregation, and optionally add tag filters or a group-by3. **Adjust the time range** — Use the preset buttons or select a custom range to see the data window you need4. **Interact** — Hover over data points for exact values, drag-select a region to zoom in, and use the widget menu to move, edit, or delete widgets++## Host-level metrics++To collect **host-level** metrics (CPU, memory, disk, network, filesystem, processes) from a server and ship them to a Traceway project with a one-line install, see the [OTel Agent](/learn/otel-agent).diff --git a/docs/pages/learn/otel-agent.mdx b/docs/pages/learn/otel-agent.mdxnew file mode 100644index 00000000..4857eee5--- /dev/null+++ b/docs/pages/learn/otel-agent.mdx@@ -0,0 +1,94 @@+# OTel Agent++import { Callout, Steps } from "nextra/components";++The **Traceway OTel Agent** is a tiny, pre-configured OpenTelemetry Collector that pulls host metrics (CPU, memory, disk, filesystem, network, processes) from a server every 60 seconds and ships them to your Traceway project over OTLP/HTTP. Runs as a background service via `systemd`, `launchd`, or the Windows Service Manager — nothing to write, nothing to tune.++<Callout type="info">+ Full source, advanced config, and the contributor guide live at+ [github.com/tracewayapp/traceway-otel-agent](https://github.com/tracewayapp/traceway-otel-agent).+</Callout>++## Install++<Steps>++### Grab a project token++Open your Traceway dashboard → the project you want metrics to land in → **Settings** → copy the **project token**. You'll pass it to the installer on the next step.++### Run the installer on your server++**Linux / macOS** (requires `curl`, `tar`, `sudo` or root):++```bash+curl -fsSL https://install.tracewayapp.com/install.sh | TRACEWAY_TOKEN=<your-token> bash+```++**Windows** (PowerShell, run as Administrator):++```powershell+$env:TRACEWAY_TOKEN = "<your-token>"+iwr -useb https://install.tracewayapp.com/install.ps1 | iex+```++</Steps>++That's it. The installer downloads the agent, verifies its checksum, writes a systemd unit / launchd plist / Windows service, and starts it. Metrics begin arriving in your dashboard within about 60 seconds — the first scrape interval.++## What gets captured++Every 60 seconds the agent scrapes:++- **CPU** — utilization (% per core per state), load averages (1m / 5m / 15m).+- **Memory** — usage in bytes, utilization %.+- **Disk** — throughput bytes, IOPS, I/O time per device.+- **Filesystem** — usage bytes and utilization % per mount.+- **Network** — throughput bytes, packets, errors, and open connections per interface.+- **Process** — per-process CPU time, RSS, and virtual memory.++Every signal is tagged with resource attributes so you can filter in the dashboard — `service.name`, `host.name`, `host.id`, `host.arch`, `os.type`, and on cloud VMs, `cloud.provider`, `cloud.region`, and `cloud.account.id` (EC2 / GCE / Azure are auto-detected).++## Options++Set these env vars alongside `TRACEWAY_TOKEN` before piping into the shell:++| Var | Purpose |+| ----------------------- | ------------------------------------------------------------------------------------------------------ |+| `TRACEWAY_SERVICE_NAME` | `service.name` label for this host. Default: the machine's hostname. |+| `TRACEWAY_ENDPOINT` | OTLP/HTTP base URL. Override when running against self-hosted Traceway. |+| `TRACEWAY_LOG_PATHS` | Comma-separated file globs to tail as logs (e.g. `/var/log/app/*.log`). Leave unset to ship metrics only. |++Example — named host, app logs, self-hosted Traceway:++```bash+curl -fsSL https://install.tracewayapp.com/install.sh | \+ TRACEWAY_TOKEN=<token> \+ TRACEWAY_SERVICE_NAME=api-prod-eu-1 \+ TRACEWAY_ENDPOINT=https://traceway.mycompany.com/api/otel \+ TRACEWAY_LOG_PATHS="/var/log/app/*.log,/var/log/nginx/access.log" \+ bash+```++Re-running the installer with the same env vars upgrades in place.++## Uninstall++**Linux / macOS:**++```bash+curl -fsSL https://install.tracewayapp.com/uninstall.sh | bash+```++**Windows** (admin PowerShell):++```powershell+Stop-Service TracewayOtelAgent; sc.exe delete TracewayOtelAgent+Remove-Item -Recurse -Force 'C:\Program Files\TracewayOtelAgent', 'C:\ProgramData\TracewayOtelAgent'+```++Stops and removes the service, binary, and config directory. Your Traceway project data is untouched.++---++For deeper configuration — tuning the scrape interval, writing filelog operators, air-gapped and manual installs, signed releases, or contributing support for additional auth modes — see the agent repo: [github.com/tracewayapp/traceway-otel-agent](https://github.com/tracewayapp/traceway-otel-agent).diff --git a/frontend/src/routes/metrics/+page.svelte b/frontend/src/routes/metrics/+page.svelteindex 796d0960..f784fdaa 100644--- a/frontend/src/routes/metrics/+page.svelte+++ b/frontend/src/routes/metrics/+page.svelte@@ -399,10 +399,6 @@}}- const activeIsDefault = $derived(- widgetGroups.find((g) => String(g.id) === activeTabId)?.isDefault ?? false- );-const activeTabName = $derived(widgetGroups.find((g) => String(g.id) === activeTabId)?.name ?? '');@@ -492,7 +488,7 @@{#each widgetGroups as group (group.id)}<Tabs.Trigger value={String(group.id)}>{group.name}- {#if !group.isDefault && String(group.id) === activeTabId}+ {#if String(group.id) === activeTabId}<DropdownMenu.Root><DropdownMenu.Trigger>{#snippet child({ props })}@@ -531,7 +527,7 @@><Plus class="h-4 w-4" /></button>- {#if hasOverflow && !activeIsDefault && activeTabId}+ {#if hasOverflow && activeTabId}<DropdownMenu.Root><DropdownMenu.Triggerclass="inline-flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"