Commit 521c6507 authored by David O'Regan's avatar David O'Regan Committed by Amy Qualls

Update prometheus dashboard unit format documentation

parent d3264cca
......@@ -296,10 +296,10 @@ The following tables outline the details of expected properties.
**Axis (`panels[].y_axis`) properties:**
| Property | Type | Required | Description |
| ----------- | ------ | ------------------------- | -------------------------------------------------------------------- |
| `name` | string | no, but highly encouraged | Y-Axis label for the panel, it will replace `y_label` if set. |
| `format` | string | no, defaults to `number` | Unit format used. See the [full list of units](prometheus_units.md). |
| `precision` | number | no, defaults to `2` | Number of decimals to display in the number. |
| ----------- | ------ | ----------------------------- | -------------------------------------------------------------------- |
| `name` | string | no, but highly encouraged | Y-Axis label for the panel. Replaces `y_label` if set. |
| `format` | string | no, defaults to `engineering` | Unit format used. See the [full list of units](prometheus_units.md). |
| `precision` | number | no, defaults to `2` | Number of decimal places to display in the number. | |
**Metrics (`metrics`) properties:**
......
......@@ -5,16 +5,75 @@
You can select units to format your charts by adding `format` to your
[axis configuration](prometheus.md#dashboard-yaml-properties).
## Internationalization and localization
Currently, your [internationalization and localization options](https://en.wikipedia.org/wiki/Internationalization_and_localization) for number formatting are dependent on the system you are using i.e. your OS or browser.
## Engineering Notation
For generic or default data, numbers are formatted according to the current locale in [engineering notation](https://en.wikipedia.org/wiki/Engineering_notation).
While an [engineering notation exists for the web](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NumberFormat), GitLab uses a version based off the [scientific notation](https://en.wikipedia.org/wiki/Scientific_notation). GitLab formatting acts in accordance with SI prefixes. For example, using GitLab notation, `1500.00` becomes `1.5k` instead of `1.5E3`. Keep this distinction in mind when using the engineering notation for your metrics.
Formats: `engineering`
SI prefixes:
| Name | Symbol | Value |
| ---------- | ------- | -------------------------- |
| `yotta` | Y | 1000000000000000000000000 |
| `zetta` | Z | 1000000000000000000000 |
| `exa` | E | 1000000000000000000 |
| `peta` | P | 1000000000000000 |
| `tera` | T | 1000000000000 |
| `giga` | G | 1000000000 |
| `mega` | M | 1000000 |
| `kilo` | k | 1000 |
| `milli` | m | 0.001 |
| `micro` | μ | 0.000001 |
| `nano` | n | 0.000000001 |
| `pico` | p | 0.000000000001 |
| `femto` | f | 0.000000000000001 |
| `atto` | a | 0.000000000000000001 |
| `zepto` | z | 0.000000000000000000001 |
| `yocto` | y | 0.000000000000000000000001 |
**Examples:**
| Data | Displayed |
| --------------------------------- | --------- |
| `0.000000000000000000000008` | 8y |
| `0.000000000000000000008` | 8z |
| `0.000000000000000008` | 8a |
| `0.000000000000008` | 8f |
| `0.000000000008` | 8p |
| `0.000000008` | 8n |
| `0.000008` | 8μ |
| `0.008` | 8m |
| `10` | 10 |
| `1080` | 1.08k |
| `18000` | 18k |
| `18888` | 18.9k |
| `188888` | 189k |
| `18888888` | 18.9M |
| `1888888888` | 1.89G |
| `1888888888888` | 1.89T |
| `1888888888888888` | 1.89P |
| `1888888888888888888` | 1.89E |
| `1888888888888888888888` | 1.89Z |
| `1888888888888888888888888` | 1.89Y |
| `1888888888888888888888888888` | 1.89e+27 |
## Numbers
For generic data, numbers are formatted according to the current locale.
For number data, numbers are formatted according to the current locale.
Formats: `number`
**Examples:**
| Data | Displayed |
| --------- | --------- |
| ---------- | --------- |
| `10` | 1 |
| `1000` | 1,000 |
| `1000000` | 1,000,000 |
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment