1
0

docs: adjust documentation to reflect single-binary deployments

This commit is contained in:
kolaente
2024-02-09 19:09:19 +01:00
parent 11b72765c9
commit 1984527fae
28 changed files with 732 additions and 1226 deletions

View File

@ -23,7 +23,7 @@ First, define a `const` with the metric key in redis. This is done in `pkg/metri
To expose a new metric, you need to register it in the `init` function inside of the `metrics` package like so:
{{< highlight golang >}}
```go
// Register total user count metric
promauto.NewGaugeFunc(prometheus.GaugeOpts{
Name: "vikunja_team_count", // The key of the metric. Must be unique.
@ -32,7 +32,7 @@ promauto.NewGaugeFunc(prometheus.GaugeOpts{
count, _ := GetCount(TeamCountKey) // TeamCountKey is the const we defined earlier.
return float64(count)
})
{{< /highlight >}}
```
Then you'll need to set the metrics initial value on every startup of Vikunja.
This is done in `pkg/routes/routes.go` to avoid cyclic imports.