promql.labelReplace() 函数
promql.labelReplace() 实现了等同于
PromQL 的 label_replace() 函数 的功能。
重要:internal/promql 包不适用于外部使用。
函数类型签名
(
<-tables: stream[{A with _value: float}],
destination: string,
regex: string,
replacement: string,
source: string,
) => stream[{B with _value: float}]
有关更多信息,请参见 Function type signatures。
参数
表格
输入数据。默认是管道转发数据 (<-).
来源
(必填) 输入标签。
目的地
(必填) 输出标签。
正则表达式
(必需) 模式作为正则表达式字符串。
替换
(必填) 替换值。