Skip to content

Commit 99be1c4

Browse files
authored
docs: fix template function (#18)
1 parent 0d455c1 commit 99be1c4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ Both schema adapters (loki VARIANT labels and flat wide tables) translate the me
208208
`line_format` and `label_format` now ship with a lightweight template engine that supports field interpolation (`{{ .message }}`) plus the full set of [Grafana Loki template string functions](https://grafana.com/docs/loki/latest/query/template_functions/). Supported functions are listed below:
209209

210210
| Function | Status | Notes |
211-
| ----------------------------------------------------------------- | ------ | --------------------------------------------------------------------------------------- | ----------------- |
211+
| ----------------------------------------------------------------- | ------ | --------------------------------------------------------------------------------------- |
212212
| `__line__`, `__timestamp__`, `now` || Expose the raw line, the row timestamp, and the adapter host's current time. |
213213
| `date`, `toDate`, `toDateInZone` || Go-style datetime formatting and parsing (supports IANA zones). |
214214
| `duration`, `duration_seconds` || Parse Go duration strings into seconds (positive/negative). |
@@ -230,7 +230,7 @@ Both schema adapters (loki VARIANT labels and flat wide tables) translate the me
230230
| `add`, `addf`, `sub`, `subf`, `mul`, `mulf`, `div`, `divf`, `mod` || Integer and floating-point arithmetic. |
231231
| `ceil`, `floor`, `round` || Floating-point rounding helpers. |
232232
| `max`, `min`, `maxf`, `minf` || Extremum helpers for integers/floats. |
233-
| `count` || Count regex matches (`{{ **line** | count "foo" }}`). |
233+
| `count` || Count regex matches (`{{ **line** count "foo" }}`). |
234234
| `regexReplaceAll`, `regexReplaceAllLiteral` || Regex replacement helpers (literal and capture-aware). |
235235

236236
`fromJson` currently only validates and re-serializes JSON strings because the template engine has no looping constructs yet. For advanced constructs (e.g., `range`), preprocess data upstream or continue to rely on Grafana/Loki-native features until control flow support arrives.

0 commit comments

Comments
 (0)