Skip to content

Commit 9bdcb6c

Browse files
committed
improve readme readability
1 parent 1c3946b commit 9bdcb6c

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ The following default metrics are exposed:
6969

7070
##### Guidelines
7171

72-
Try to come up with meaningful metrics to cover your feature with when developing it. Refer to [Prometheus best practices](https://prometheus.io/docs/practices/naming/) when naming your metric and labels.
72+
Try to come up with meaningful metrics to cover your feature with when developing it. Refer to [Prometheus best practices][1] when naming your metric and labels.
7373

74-
Define your metrics in a `metrics.py` module of your Django application (see [example](https://github.com/Flagsmith/flagsmith-common/blob/main/src/common/gunicorn/metrics.py)). Contrary to Prometheus Python client examples and documentation, please name a metric variable exactly as your metric name.
74+
Define your metrics in a `metrics.py` module of your Django application see [example][2]. Contrary to Prometheus Python client examples and documentation, please name a metric variable exactly as your metric name.
7575

76-
The Prometheus client runs in multi-process mode to accommodate for Gunicorn's [server model](https://docs.gunicorn.org/en/stable/design.html#server-model). When defining a `Gauge` metric, select the appropriate `multiprocess_mode` for it. Refer to the [Metrics tuning](https://prometheus.github.io/client_python/multiprocess/) section of Prometheus Python client documentation. Usually, the appropriate mode is `livesum`, which aggregates values from all live Gunicorn workers.
76+
The Prometheus client runs in multi-process mode to accommodate for [Gunicorn server model][3]. When defining a `Gauge` metric, select the appropriate `multiprocess_mode` for it. Refer to the [Metrics tuning][4] section of Prometheus Python client documentation. Usually, the appropriate mode is `livesum`, which aggregates values from all live Gunicorn workers.
7777

7878
Flagsmith assumes missing or null metric label values as unknown, and converts them to an `"unknown"` constant value. To support the convention, use the `with_labels` utility function when labelling your metric sample:
7979

@@ -89,3 +89,8 @@ with_labels(
8989
galaxy=get_galaxy()
9090
).inc(1)
9191
```
92+
93+
[1]: https://prometheus.io/docs/practices/naming/
94+
[2]: https://github.com/Flagsmith/flagsmith-common/blob/main/src/common/gunicorn/metrics.py
95+
[3]: https://docs.gunicorn.org/en/stable/design.html#server-model
96+
[4]: https://prometheus.github.io/client_python/multiprocess

0 commit comments

Comments
 (0)