Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add docs for enabling monitoring for nakama #803

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions docs/client/nakama/monitoring-nakama.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
title: 'Monitoring Nakama'
description: 'Enable monitoring for Nakama with Jaeger and Prometheus'
---

<Note>
The Jaeger and Prometheus integration is only available in World CLI starting
from version v1.3.1.
</Note>
rmrt1n marked this conversation as resolved.
Show resolved Hide resolved

## Enabling Monitoring

You can enable this feature, run the following command:
rmrt1n marked this conversation as resolved.
Show resolved Hide resolved
rmrt1n marked this conversation as resolved.
Show resolved Hide resolved

```bash
world cardinal start --telemetry
```

By default this will start both the [Jaeger](https://www.jaegertracing.io/) and
[Prometheus](https://prometheus.io/) containers.
rmrt1n marked this conversation as resolved.
Show resolved Hide resolved

You can access the Jaeger Web UI at `http://localhost:16686`:

![Screenshot of Jaeger UI](/images/jaeger-ui.png)

And the Prometheus Web UI at `http://localhost:9090`:

![Screenshot of Prometheus UI](/images/prometheus-ui.png)

## Configuration

You can configure some of the behavior of Jaeger and Prometheus by editing your
`world.toml` file. Currently only these options are supported:
rmrt1n marked this conversation as resolved.
Show resolved Hide resolved

### NAKAMA_TRACE_ENABLED

Enable tracing with Jaeger. Defaults to `false`.

### NAKAMA_TRACE_SAMPLE_RATE

The trace sample rate. Defaults to `0.6`. Only float values between `0` and `1`
are accepted.

### NAKAMA_METRICS_ENABLED

Enable metrics collection with Prometheus. Defaults to `false`.

### NAKAMA_METRICS_INTERVAL

How frequently should the metrics be updated, in seconds. Defaults to every `30`
seconds.

rmrt1n marked this conversation as resolved.
Show resolved Hide resolved
Binary file added docs/images/jaeger-ui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/prometheus-ui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion docs/mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@
"pages": [
"client/nakama/overview",
"client/nakama/getting-started",
"client/nakama/relay"
"client/nakama/relay",
"client/nakama/monitoring-nakama"
rmrt1n marked this conversation as resolved.
Show resolved Hide resolved
]
},
{
Expand Down
Loading