Skip to content

Add observability documentation for self-hosted deployments#772

Merged
mlsmaycon merged 4 commits into
mainfrom
add-metrics-information
May 29, 2026
Merged

Add observability documentation for self-hosted deployments#772
mlsmaycon merged 4 commits into
mainfrom
add-metrics-information

Conversation

@mlsmaycon
Copy link
Copy Markdown
Contributor

@mlsmaycon mlsmaycon commented May 29, 2026

Summary by CodeRabbit

  • Documentation
    • Added a new "Observability" section in self-hosted docs and navigation.
    • Comprehensive observability docs for Management, Signal, Relay, and Proxy: metrics endpoints, naming conventions, and combined-container behavior.
    • New pages cover Prometheus scrape examples, Grafana dashboard imports and available dashboards, dashboard variables, and service-specific metric reference and configuration guidance.

Review Change Stack

@mlsmaycon mlsmaycon requested a review from SunsetDrifter May 29, 2026 10:48
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 29, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f8219244-de11-4b95-be18-e7f48a963bf5

📥 Commits

Reviewing files that changed from the base of the PR and between b52f62e and 0edefba.

📒 Files selected for processing (6)
  • src/pages/selfhosted/observability/combined.mdx
  • src/pages/selfhosted/observability/index.mdx
  • src/pages/selfhosted/observability/management.mdx
  • src/pages/selfhosted/observability/proxy.mdx
  • src/pages/selfhosted/observability/relay.mdx
  • src/pages/selfhosted/observability/signal.mdx
✅ Files skipped from review due to trivial changes (5)
  • src/pages/selfhosted/observability/signal.mdx
  • src/pages/selfhosted/observability/relay.mdx
  • src/pages/selfhosted/observability/proxy.mdx
  • src/pages/selfhosted/observability/combined.mdx
  • src/pages/selfhosted/observability/index.mdx
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/pages/selfhosted/observability/management.mdx

📝 Walkthrough

Walkthrough

Adds an "Observability" docs section and eight MDX pages detailing OpenTelemetry/Prometheus metrics for Management, Signal, Relay, Proxy, combined deployments, naming conventions, Prometheus scrape examples, and Grafana dashboards.

Changes

Observability Documentation

Layer / File(s) Summary
Navigation and observability overview
src/components/NavigationDocs.jsx, src/pages/selfhosted/observability/index.mdx
Adds "Observability" to docs navigation and an index page explaining which services expose /metrics, default endpoints and ports, combined vs multi-container behavior, Prometheus/OpenMetrics examples, naming conventions, and links to dashboards.
Combined deployment metrics configuration
src/pages/selfhosted/observability/combined.mdx
Documents combined-container behavior where Management, Signal, and Relay share a single OpenTelemetry meter and /metrics endpoint; describes server.metricsPort, Prometheus scrape examples, and conditional Relay metric emission.
Grafana dashboards guide
src/pages/selfhosted/observability/dashboards.mdx
Provides prebuilt Grafana dashboard JSONs for Management, Signal, and Relay, import instructions, template variables (datasource, cluster, environment, job, host), and a Management-specific label note.
Management service metrics reference
src/pages/selfhosted/observability/management.mdx
Detailed Management metrics reference covering HTTP/gRPC APIs, IdP, store/database histograms, update-channel and account-manager workflows, ephemeral peer cleanup metrics, and dashboard link.
Signal service metrics reference
src/pages/selfhosted/observability/signal.mdx
Signal metrics page with /metrics defaults/CLI example, prefixing rules for standalone vs combined, gRPC instrumentation note, and peer/message-forwarding metric tables.
Relay service metrics reference
src/pages/selfhosted/observability/relay.mdx
Relay metrics page describing /metrics and --metrics-port, combined deployment sharing, healthcheck separation, Relay metric groups, and dashboard link.
Proxy service metrics reference
src/pages/selfhosted/observability/proxy.mdx
Proxy metrics page documenting shared health/metrics server, HTTP and L4 metrics, ACME/certificate metrics, Management sync timing metrics, and security guidance about probe exposure.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • SunsetDrifter
  • braginini
  • lixmal

Poem

🐰 In docs where metrics softly hum,
The dashboards wake, the probes become,
Management, Signal, Relay in line,
Prometheus sings each stat and time,
A rabbit cheers: observability—✨ done!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and accurately summarizes the main change: adding comprehensive observability documentation covering metrics configuration, dashboards, and detailed documentation for Management, Signal, Relay, and Proxy services in self-hosted deployments.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add-metrics-information

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

src/pages/selfhosted/observability/combined.mdx

Oops! Something went wrong! :(

ESLint: 9.39.4

TypeError: Converting circular structure to JSON
--> starting at object with constructor 'Object'
| property 'configs' -> object with constructor 'Object'
| property 'flat' -> object with constructor 'Object'
| ...
| property 'plugins' -> object with constructor 'Object'
--- property 'react' closes the circle
Referenced from:
at JSON.stringify ()
at file:///node_modules/.pnpm/@eslint+eslintrc@3.3.5/node_modules/@eslint/eslintrc/lib/shared/config-validator.js:308:45
at Array.map ()
at ConfigValidator.formatErrors (file:///node_modules/.pnpm/@eslint+eslintrc@3.3.5/node_modules/@eslint/eslintrc/lib/shared/config-validator.js:299:23)
at ConfigValidator.validateConfigSchema (file:///node_modules/.pnpm/@eslint+eslintrc@3.3.5/node_modules/@eslint/eslintrc/lib/shared/config-validator.js:330:84)
at ConfigArrayFactory._normalizeConfigData (file:///node_modules/.pnpm/@eslint+eslintrc@3.3.5/node_modules/@eslint/eslintrc/lib/config-array-factory.js:676:19)
at ConfigArrayFactory._loadConfigData (file:///node_modules/.pnpm/@eslint+eslintrc@3.3.5/node_modules/@eslint/eslintrc/lib/config-array-factory.js:641:21)
at ConfigArrayFactory._loadExtendedShareableConfig (file:///node_modules/.pnpm/@eslint+eslintrc@3.3.5/node_modules/@eslint/eslintrc/lib/config-array-factory.js:946:21)
at ConfigArrayFactory._loadExtends (file:///node_modules/.pnpm/@eslint+eslintrc@3.3.5/node_modules/@eslint/eslintrc/lib/config-array-factory.js:814:25)
at ConfigArrayFactory._normalizeObjectConfigDataBody (file:///node_modules/.pnpm/@eslint+eslintrc@3.3.5/node_modules/@eslint/eslintrc/lib/config-array-factory.js:752:25)

src/pages/selfhosted/observability/index.mdx

Oops! Something went wrong! :(

ESLint: 9.39.4

TypeError: Converting circular structure to JSON
--> starting at object with constructor 'Object'
| property 'configs' -> object with constructor 'Object'
| property 'flat' -> object with constructor 'Object'
| ...
| property 'plugins' -> object with constructor 'Object'
--- property 'react' closes the circle
Referenced from:
at JSON.stringify ()
at file:///node_modules/.pnpm/@eslint+eslintrc@3.3.5/node_modules/@eslint/eslintrc/lib/shared/config-validator.js:308:45
at Array.map ()
at ConfigValidator.formatErrors (file:///node_modules/.pnpm/@eslint+eslintrc@3.3.5/node_modules/@eslint/eslintrc/lib/shared/config-validator.js:299:23)
at ConfigValidator.validateConfigSchema (file:///node_modules/.pnpm/@eslint+eslintrc@3.3.5/node_modules/@eslint/eslintrc/lib/shared/config-validator.js:330:84)
at ConfigArrayFactory._normalizeConfigData (file:///node_modules/.pnpm/@eslint+eslintrc@3.3.5/node_modules/@eslint/eslintrc/lib/config-array-factory.js:676:19)
at ConfigArrayFactory._loadConfigData (file:///node_modules/.pnpm/@eslint+eslintrc@3.3.5/node_modules/@eslint/eslintrc/lib/config-array-factory.js:641:21)
at ConfigArrayFactory._loadExtendedShareableConfig (file:///node_modules/.pnpm/@eslint+eslintrc@3.3.5/node_modules/@eslint/eslintrc/lib/config-array-factory.js:946:21)
at ConfigArrayFactory._loadExtends (file:///node_modules/.pnpm/@eslint+eslintrc@3.3.5/node_modules/@eslint/eslintrc/lib/config-array-factory.js:814:25)
at ConfigArrayFactory._normalizeObjectConfigDataBody (file:///node_modules/.pnpm/@eslint+eslintrc@3.3.5/node_modules/@eslint/eslintrc/lib/config-array-factory.js:752:25)

src/pages/selfhosted/observability/management.mdx

Oops! Something went wrong! :(

ESLint: 9.39.4

TypeError: Converting circular structure to JSON
--> starting at object with constructor 'Object'
| property 'configs' -> object with constructor 'Object'
| property 'flat' -> object with constructor 'Object'
| ...
| property 'plugins' -> object with constructor 'Object'
--- property 'react' closes the circle
Referenced from:
at JSON.stringify ()
at file:///node_modules/.pnpm/@eslint+eslintrc@3.3.5/node_modules/@eslint/eslintrc/lib/shared/config-validator.js:308:45
at Array.map ()
at ConfigValidator.formatErrors (file:///node_modules/.pnpm/@eslint+eslintrc@3.3.5/node_modules/@eslint/eslintrc/lib/shared/config-validator.js:299:23)
at ConfigValidator.validateConfigSchema (file:///node_modules/.pnpm/@eslint+eslintrc@3.3.5/node_modules/@eslint/eslintrc/lib/shared/config-validator.js:330:84)
at ConfigArrayFactory._normalizeConfigData (file:///node_modules/.pnpm/@eslint+eslintrc@3.3.5/node_modules/@eslint/eslintrc/lib/config-array-factory.js:676:19)
at ConfigArrayFactory._loadConfigData (file:///node_modules/.pnpm/@eslint+eslintrc@3.3.5/node_modules/@eslint/eslintrc/lib/config-array-factory.js:641:21)
at ConfigArrayFactory._loadExtendedShareableConfig (file:///node_modules/.pnpm/@eslint+eslintrc@3.3.5/node_modules/@eslint/eslintrc/lib/config-array-factory.js:946:21)
at ConfigArrayFactory._loadExtends (file:///node_modules/.pnpm/@eslint+eslintrc@3.3.5/node_modules/@eslint/eslintrc/lib/config-array-factory.js:814:25)
at ConfigArrayFactory._normalizeObjectConfigDataBody (file:///node_modules/.pnpm/@eslint+eslintrc@3.3.5/node_modules/@eslint/eslintrc/lib/config-array-factory.js:752:25)

  • 3 others

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
src/pages/selfhosted/observability/proxy.mdx (1)

1-67: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add missing import for the <Warning> component.

The file uses <Warning> on lines 24-26 but does not import it. As per coding guidelines, custom components must be imported from @/components/mdx.

📦 Proposed fix

Add this import at the top of the file after the description export:

 export const description = 'Metrics recorded by the NetBird Proxy service.'
+
+import { Warning } from '`@/components/mdx`'

 # Proxy metrics

As per coding guidelines: "Import custom components from @/components/mdx (Note, Warning, Success)".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/pages/selfhosted/observability/proxy.mdx` around lines 1 - 67, The
document uses the custom MDX component Warning but never imports it; add an
import for Warning from "`@/components/mdx`" near the top of the file (after
export const description) so the <Warning> tag resolves; update the import block
to include Warning alongside any existing MDX component imports (referencing the
Warning symbol and the file's top-level export description for placement).
src/pages/selfhosted/observability/relay.mdx (1)

1-47: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add missing import for the <Note> component.

The file uses <Note> on lines 22-24 but does not import it. As per coding guidelines, custom components must be imported from @/components/mdx.

📦 Proposed fix

Add this import at the top of the file after the description export:

 export const description = 'Metrics recorded by the NetBird Relay service.'
+
+import { Note } from '`@/components/mdx`'

 # Relay metrics

As per coding guidelines: "Import custom components from @/components/mdx (Note, Warning, Success)".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/pages/selfhosted/observability/relay.mdx` around lines 1 - 47, The MDX
uses the custom <Note> component but doesn't import it; add an import for Note
from "`@/components/mdx`" near the top of the file (after the existing export
const description line) so the <Note> component is available during rendering;
ensure the import references the named export Note from "`@/components/mdx`".
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/pages/selfhosted/observability/index.mdx`:
- Line 11: The sentence in src/pages/selfhosted/observability/index.mdx stating
"Every server-side component exposes a `/metrics` HTTP endpoint. By default,
each listens on port `9090`." is inaccurate; update that sentence to clarify
that most components default to 9090 but the Proxy service defaults to 8080 (as
shown in the table). Edit the line containing that sentence so it either says
"most" instead of "each" or explicitly notes the Proxy exception (e.g., "By
default, most components listen on port 9090; the Proxy defaults to 8080"),
ensuring consistency with the table below.
- Line 67: Replace the incorrect sentence "metrics endpoints listen on all
interfaces" with accurate wording that reflects the table: mention that the
Proxy service listens on localhost (127.0.0.1) while other metrics endpoints may
be reachable externally depending on service configuration, and advise to
restrict access at the firewall/reverse-proxy/service-mesh so only Prometheus
and operators can scrape them; specifically update the sentence referencing
"metrics endpoints listen on all interfaces" and refer to the "Proxy service"
and the table that shows it bound to localhost to avoid the misleading blanket
statement.

---

Outside diff comments:
In `@src/pages/selfhosted/observability/proxy.mdx`:
- Around line 1-67: The document uses the custom MDX component Warning but never
imports it; add an import for Warning from "`@/components/mdx`" near the top of
the file (after export const description) so the <Warning> tag resolves; update
the import block to include Warning alongside any existing MDX component imports
(referencing the Warning symbol and the file's top-level export description for
placement).

In `@src/pages/selfhosted/observability/relay.mdx`:
- Around line 1-47: The MDX uses the custom <Note> component but doesn't import
it; add an import for Note from "`@/components/mdx`" near the top of the file
(after the existing export const description line) so the <Note> component is
available during rendering; ensure the import references the named export Note
from "`@/components/mdx`".
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8cd2d4b5-8dec-47c3-ba3e-350855c98888

📥 Commits

Reviewing files that changed from the base of the PR and between 9e09fa6 and b52f62e.

📒 Files selected for processing (8)
  • src/components/NavigationDocs.jsx
  • src/pages/selfhosted/observability/combined.mdx
  • src/pages/selfhosted/observability/dashboards.mdx
  • src/pages/selfhosted/observability/index.mdx
  • src/pages/selfhosted/observability/management.mdx
  • src/pages/selfhosted/observability/proxy.mdx
  • src/pages/selfhosted/observability/relay.mdx
  • src/pages/selfhosted/observability/signal.mdx

Comment thread src/pages/selfhosted/observability/index.mdx Outdated
Comment thread src/pages/selfhosted/observability/index.mdx Outdated
mlsmaycon and others added 3 commits May 29, 2026 13:02
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@mlsmaycon mlsmaycon merged commit 109140a into main May 29, 2026
3 checks passed
@mlsmaycon mlsmaycon deleted the add-metrics-information branch May 29, 2026 14:04
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.

2 participants