Skip to content

Commit 37c9248

Browse files
Updating Public Docs to include new exponent function in metrics querying (#30342)
* first change for exponent docs * exponentiation public doc updates * Apply suggestions from code review Co-authored-by: Alicia Scott <[email protected]> --------- Co-authored-by: Alicia Scott <[email protected]>
1 parent 853486c commit 37c9248

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

content/en/dashboards/functions/arithmetic.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ into this one `abs(sin{*})`:
1818

1919
{{< img src="dashboards/functions/arithmetic/sinus_abs.png" alt="Sinus function with abs" style="width:80%;">}}
2020

21+
## Exponent
22+
23+
| Function | Description | Example |
24+
| :---- | :------- | :--------- |
25+
| `pow()` | Graph the exponent of the metric. | `pow(<METRIC_NAME>{*}, INT)` |
26+
2127
## Logarithm
2228

2329
### Log base 2

content/en/dashboards/querying/_index.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,24 @@ min(status:error, status:warn)
199199

200200
{{< img src="dashboards/querying/minmax_logs_platform_example.png" alt="Formula example for 'min' showing min count value between two log queries" style="width:75%;" >}}
201201

202+
#### Exponentiation
203+
204+
You can now use the `pow()` function to raise a constant or a metric to the power of another constant or metric. This allows you to model exponential growth or decay.
205+
206+
Here is an example of how to forecast user growth by applying an exponential growth factor to a prior time window:
207+
208+
```text
209+
users.sessions{*} * pow(1.1, timeshift(-1))
210+
```
211+
212+
Here is an example of how to surface anomalies by amplifying value using exponentiation:
213+
214+
```text
215+
pow(ping{region:*}, 2)
216+
```
217+
218+
To use `pow(a, b)`, `a`, and `b` can be constants or metrics. This function is only available on metrics.
219+
202220
### Create an alias
203221

204222
You can create a custom alias for your data sources to make it easier for your users to interpret the graph results.

0 commit comments

Comments
 (0)