You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

OTel Contrib连接器路由配置语法错误排查求助

问题定位与修复方案

错误提示明确指出路由语句存在语法问题,核心原因是括号不匹配,具体问题点及修正如下:

错误点梳理

  1. 第一条路由语句末尾缺失闭合括号 )
  2. 第二条路由语句中IsMatch函数被多套了一层冗余括号
  3. 第三条路由语句末尾缺失闭合括号 )

修正后的connectors配置

connectors:
  routing/logs:
      default_pipelines: [logs/otlp-all]
      error_mode: propagate
      table:
        - statement: route() where IsMatch(attributes["FileName"],".*access*.log")
          pipelines: [logs/container, logs/access]
        - statement: route() where (IsMatch(attributes["FileName"],".*.log") and not IsMatch(attributes["FileName"],".*access*.log") and not IsMatch(attributes["FileName"],".*waf*.log"))
          pipelines: [logs/container]
        - statement: route() where IsMatch(attributes["FileName"],".*waf*.log")
          pipelines: [logs/waf]
  routing/metrics:
      default_pipelines: [metrics/1]
      error_mode: propagate
      table:
        - statement: route() where attributes["dataType"] == "type1"
          pipelines: [metrics/1]
        - statement: route() where attributes["dataType"] == "type2"
          pipelines: [metrics/2]
        - statement: route() where attributes["dataType"] == "type3"
          pipelines: [metrics/3]

内容的提问来源于stack exchange,提问作者yana_mg

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.07 20:25:57