#6671·shenyu

[BUG] — Prometheus 以原始请求 `path` 标记的 `counter` — 高卡数量的子映射无限增长

作者: Aias00创建于 2026年8月3日更新于 2026年9月9日
标签type: performancemetrics: prometheuspriority: high
  • 严重性: 高
  • 文件: shenyu-plugin/shenyu-plugin-metrics/src/main/java/org/apache/shenyu/plugin/metrics/MetricsPlugin.java:49 (counterIncrement(LabelNames.REQUEST_TYPE_TOTAL, new String[]{exchange.getRequest().getURI().getRawPath(), shenyuContext.getRpcType()})); 标签注册 MetricsReporter.java:43 (名称为 {"path","type"}); 实现 PrometheusMetricsRegister.java:64 (counter.labels(labelValues) 根据不同的向量动态创建一个 Counter.Child)。