From 9898f28b6eb80b642bcca237f65011b62088a70e Mon Sep 17 00:00:00 2001 From: Marin N Date: Mon, 8 Apr 2024 18:06:09 +0300 Subject: [PATCH] Update functions.md Added a note on the Alias functions (e.g. `replaceAlias`) explaining a possible conflict with other Transforms applied on the Grafana Dashboard. --- docs/sources/reference/functions.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/sources/reference/functions.md b/docs/sources/reference/functions.md index c2f1bb3..2e38dff 100644 --- a/docs/sources/reference/functions.md +++ b/docs/sources/reference/functions.md @@ -326,6 +326,13 @@ Replace metric name using pattern. Pattern is regex or regular string. If regex For more details see [String.prototype.replace()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace) function. +**NOTE:** Other transforms in Grafana Dashboard, like ["Join by label"](https://grafana.com/docs/grafana/latest/panels-visualizations/query-transform-data/transform-data/#join-by-labels) will overwrite the alias functions. +This will happen because the Grafana Dashboard transforms will be applied on the raw data returned by a query. +If such issues arise, you can always use other Dashboard transforms, like: +* [Rename by regex](https://grafana.com/docs/grafana/latest/panels-visualizations/query-transform-data/transform-data/#rename-by-regex) for fields names +* [Value mappings > Regex ](https://grafana.com/docs/grafana/latest/panels-visualizations/configure-value-mappings/#regex) for cell values + + Examples: ``` CPU system time