Skip to content

Commit d610bf0

Browse files
committed
add documentation for Scale function
Signed-off-by: Florian Bacher <[email protected]>
1 parent 4ebb38a commit d610bf0

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

pkg/ottl/ottlfuncs/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,7 @@ Available Converters:
424424
- [UnixSeconds](#unixseconds)
425425
- [UUID](#UUID)
426426
- [Year](#year)
427+
- [Scale](#scale)
427428

428429
### Base64Decode
429430

@@ -1343,6 +1344,21 @@ Examples:
13431344

13441345
- `Year(Now())`
13451346

1347+
### Scale
1348+
1349+
`Scale(value, factor)`
1350+
1351+
The `Scale` function returns the original `value`, multiplied by the `factor`.
1352+
The supported data types are:
1353+
1354+
- `int`
1355+
- `double`
1356+
- `metric` - Supported metric types are `Gauge`, `Sum`, and `Histogram`
1357+
1358+
Examples:
1359+
1360+
- `Scale(10.0, 0.1)`
1361+
13461362
## Function syntax
13471363

13481364
Functions should be named and formatted according to the following standards.

0 commit comments

Comments
 (0)