Skip to content

docs(observability): fix frontend + apm review findings#880

Merged
Starefossen merged 1 commit into
mainfrom
docs/fix-frontend-apm-review
Jul 6, 2026
Merged

docs(observability): fix frontend + apm review findings#880
Starefossen merged 1 commit into
mainfrom
docs/fix-frontend-apm-review

Conversation

@Starefossen

@Starefossen Starefossen commented Jul 6, 2026

Copy link
Copy Markdown
Member

Fixes verified review findings in the frontend and APM observability docs. Code claims were grounded against the @nais/apm SDK source (apm-client/src) and the plugin (pkg/plugin/alerttemplates.go, src/pages/tabs/AlertsTab.tsx).

Frontend (docs/observability/frontend/)

  1. README.md, setup-faro.md, setup-nextjs.md — removed the stale framing that raw Faro is needed for trace propagation. Tracing shipped in @nais/apm via init({ tracing: true }) (lazy @grafana/faro-web-tracing, same-origin + *.nav.no propagation floor). Raw Faro is now framed only as the lower-level path.
  2. Same files — dropped the stale 0.1.0 version markers (docs track 0.4.0).
  3. custom-metrics.md — the render-time example put context inside the measurement payload (no context field there → silently dropped). Moved it to the second argument (PushMeasurementOptions), matching the correct earlier example.
  4. trace-propagation.md — added the required namespace to the Faro app init example.
  5. setup-nextjs.md — standardized the init guard on if (faro.api) return; (matches reference/troubleshooting.md).

APM (docs/observability/apm/)

  1. reference/apm-client-api.md — documented namespace (team), effectively required (without it telemetry resolves to unknown-team): added it to the InitOptions table, the meta-tag block (nais-team/nais-namespace), the env-var list (NAIS_TEAM/NAIS_NAMESPACE), the resolution sentences, and the init example. Left the limitations / version-marker sections untouched to minimize conflict with the unmerged DRY PR docs: Sentry to @nais/apm migration guide #877.
  2. how-to/create-alerts.mdslo-burn-rate is a shipped template (fast/slow buttons in AlertsTab.tsx, sloBurnRateDefaults in alerttemplates.go). Corrected the false "not shipped / only four templates" note and added the 5th row to the templates table.

Verification

  • mise run build nav ssb — green.
  • Links on the changed pages resolve to existing pages.
  • Corrected code examples validated against the SDK signatures.

- frontend: reframe raw Faro as the lower-level path; @nais/apm now wraps
  trace propagation (init({ tracing: true })), so drop the stale 'doesn't
  wrap tracing' framing and 0.1.0 version markers
- custom-metrics: move context to PushMeasurementOptions (second arg) in the
  render-time example so it is no longer silently dropped
- trace-propagation: add required namespace to the Faro init example
- setup-nextjs: standardize the init guard on if (faro.api) return
- apm-client-api: document namespace (team) in InitOptions, the meta-tag
  block (nais-team/nais-namespace) and env list (NAIS_TEAM/NAIS_NAMESPACE)
- create-alerts: slo-burn-rate is shipped — add the 5th template row and
  drop the false 'burn-rate not shipped' note
@Starefossen Starefossen merged commit ad2e15c into main Jul 6, 2026
6 checks passed
@Starefossen Starefossen deleted the docs/fix-frontend-apm-review branch July 6, 2026 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant