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}]
有关更多信息,请参阅函数类型签名。
参数
tables
输入数据。默认为管道转发数据 (<-
)。
source
(必需) 输入标签。
destination
(必需) 输出标签。
regex
(必需) 正则表达式模式字符串。
replacement
(必需) 替换值。
此页是否对您有帮助?
感谢您的反馈!