open-telemetry / opentelemetry-collector-contrib

Contrib repository for the OpenTelemetry Collector
https://opentelemetry.io
Apache License 2.0
3k stars 2.32k forks source link

Inconsistent Metric Descriptions Between `dockerstatsreceiver` and `podmanstatsreceiver` Causing `prometheusexporter` Errors #35829

Open bowling233 opened 1 hour ago

bowling233 commented 1 hour ago

Component(s)

receiver/podman

What happened?

I am using dockerstatsreceiver and podmanstatsreceiver simultaneously, but there are inconsistencies in some of the metric descriptions between them. This results in errors from the prometheusexporter (see log output for details).

Differences can be observed here:

Collector version

0.111.0

Environment information

Environment

OS: Debian 12

OpenTelemetry Collector configuration

receivers:
  docker_stats:
  podman_stats:

exporters:
  prometheus:
    endpoint: localhost:9090
    send_timestamps: true
    resource_to_telemetry_conversion:
      enabled: true

service:
  pipelines:
    metrics:
      receivers: [podman_stats, docker_stats]
      processors: [memory_limiter, batch, resourcedetection]
      exporters: [prometheus]

Log output

2024-10-16T10:15:58.991Z   error   prometheusexporter@v0.111.0/log.go:23   error gathering metrics: 12 error(s) occurred:
* collected metric container_memory_usage_total_bytes ... has help "Memory usage of the container." but should have "Memory usage of the container. This excludes the cache."
* collected metric container_network_io_usage_tx_bytes_total ... has help "Bytes sent." but should have "Bytes sent by the container."
......
   {"kind": "exporter", "data_type": "metrics", "name": "prometheus"}
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter.(*promLogger).Println
   github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter@v0.111.0/log.go:23
github.com/prometheus/client_golang/prometheus/promhttp.HandlerForTransactional.func1
   github.com/prometheus/client_golang@v1.20.4/prometheus/promhttp/http.go:169
net/http.HandlerFunc.ServeHTTP
   net/http/server.go:2220
net/http.(*ServeMux).ServeHTTP
   net/http/server.go:2747
go.opentelemetry.io/collector/config/confighttp.(*decompressor).ServeHTTP
   go.opentelemetry.io/collector/config/confighttp@v0.111.0/compression.go:168
go.opentelemetry.io/collector/config/confighttp.(*ServerConfig).ToServer.maxRequestBodySizeInterceptor.func2
   go.opentelemetry.io/collector/config/confighttp@v0.111.0/confighttp.go:553
net/http.HandlerFunc.ServeHTTP
   net/http/server.go:2220
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp.(*middleware).serveHTTP
   go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp@v0.55.0/handler.go:177
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp.NewMiddleware.func1.1
   go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp@v0.55.0/handler.go:65
net/http.HandlerFunc.ServeHTTP
   net/http/server.go:2220
go.opentelemetry.io/collector/config/confighttp.(*clientInfoHandler).ServeHTTP
   go.opentelemetry.io/collector/config/confighttp@v0.111.0/clientinfohandler.go:26
net/http.serverHandler.ServeHTTP
   net/http/server.go:3210
net/http.(*conn).serve
   net/http/server.go:2092

Additional context

No response

github-actions[bot] commented 1 hour ago

Pinging code owners: