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

OTEL采集直方图指标无法导入Prometheus问题排查求助

OTEL直方图指标无法在Prometheus中显示的问题排查求助

我从服务中采集OpenTelemetry(OTEL)指标,通过OTEL Collector转发后,再经OTEL端点发送到Prometheus。使用的Collector配置如下:

# Receivers
receivers:
  otlp:
    protocols:
      http:
        endpoint: 0.0.0.0:4318
        auth:
          authenticator: bearertokenauth

# Processors
processors:
  batch: {}

# Exporters
exporters:
  otlphttp/logs:
    endpoint: "http://loki-write:3100/otlp"
  otlphttp/metrics:
    endpoint: "http://prometheus-server/api/v1/otlp"
  otlphttp/traces:
    endpoint: "http://tempo-distributor:4318" 

# Pipelines
service:
  extensions:
    - health_check
    - bearertokenauth
  pipelines:
    logs:
      receivers: [otlp]
      processors: [batch]
      exporters: [otlphttp/logs]
    metrics:
      receivers: [otlp]
      processors: [batch]
      exporters: [otlphttp/metrics]
    traces:
      receivers: [otlp]
      processors: [batch]
      exporters: [otlphttp/traces]

问题描述

我能在Prometheus(通过Grafana)查看多数指标,但直方图指标缺失,例如http_server_request_duration_sum未出现在Prometheus中。

已执行排查步骤

  • 将相同指标发送至VictoriaMetrics后端,可看到所有指标(包括直方图),仅指标名称中的.未被替换为_,排除OTEL链路本身的问题;
  • 修改Prometheus部署配置启用原生直方图,问题未解决;
  • 使用Helm在EKS集群部署了最新版Prometheus。

补充信息

  • 除直方图外,其余OTEL指标可在Prometheus中正常查看;
  • 环境基于Kubernetes,通过Helm集成Prometheus;
  • 已查阅多篇技术文章及GitHub问题,未找到有效解决方案。

求助

直方图指标无法显示在Prometheus中的原因是什么?需检查OTEL Collector、Prometheus或Grafana的哪些特定配置?

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.06.15 08:27:07