open-telemetry / opentelemetry-collector-contrib

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

Network metrics are not comming #34900

Open mohitgoyal201617 opened 2 weeks ago

mohitgoyal201617 commented 2 weeks ago

Component(s)

No response

What happened?

Description

Steps to Reproduce

Apply below collector config

receivers:
  otlp:
    protocols:
      grpc:
      http:
  docker_stats:
    endpoint: unix:///var/run/docker.sock
    collection_interval: 30s
    timeout: 10s
    api_version: 1.24
    metrics:
      container.uptime:
        enabled: true
      container.restarts:
        enabled: true
      container.network.io.usage.rx_errors:
        enabled: true
      container.network.io.usage.tx_errors:
        enabled: true
      container.network.io.usage.rx_packets:
        enabled: true
      container.network.io.usage.tx_packets:
        enabled: true
processors:
  batch:
    send_batch_size: 1000
    timeout: 10s
  resourcedetection:
    detectors: [env, system]
    timeout: 2s
    system:
      hostname_sources: [os]
exporters:
  logging:
    verbosity: normal
 
service:
  pipelines:
    metrics:
      receivers: [otlp, docker_stats]
      processors: [resourcedetection, batch]
      exporters: [logging]

Expected Result

Result should contain n/w related metrics

Actual Result

No n/w related metric

Collector version

V0.106.0

Environment information

Environment

OS: (e.g., "Ubuntu 20.04") Compiler(if manually compiled): (e.g., "go 14.2")

OpenTelemetry Collector configuration

No response

Log output

No response

Additional context

No response

github-actions[bot] commented 2 weeks ago

Pinging code owners for receiver/dockerstats: @rmfitzpatrick @jamesmoessis. See Adding Labels via Comments if you do not have permissions to add labels yourself.

jamesmoessis commented 2 weeks ago

@mohitgoyal201617 Need more information on the setup. What is the docker API version you are using, and docker engine version? Are you using the latest version of the collector?

Are you able to provide a sample output from the debug exporter, so we can see what is and is not exported?

This hasn't been reported anywhere else, so until you can provide some evidence this is an issue on the docker stats receiver, I can't do much to help you.

mohitgoyal201617 commented 2 weeks ago

Docker Engine Version: 20.10.8 API Version: 1.41 Go Version: go1.16.6 Otel Collector: V0.106.0

mohitgoyal201617 commented 1 week ago

Any idea ?