Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[receiver/hostmetrics]process.cpu.utilization not scraped when process.cpu.time is disabled #23450

Closed
rubenruizdegauna opened this issue Jun 19, 2023 · 2 comments
Labels
bug Something isn't working needs triage New item requiring triage receiver/hostmetrics

Comments

@rubenruizdegauna
Copy link
Contributor

rubenruizdegauna commented Jun 19, 2023

Component(s)

receiver/hostmetrics

What happened?

Description

process.cpu.utilization optional metric is not scraped if process.cpu.time is disabled.

Steps to Reproduce

Enable hostmetricsreceiver with process.cpu.time disabled and process.cpu.utilization enabled:

receivers:
  hostmetrics:
    collection_interval: 20s
    scrapers:
      process:
        metrics:
          process.cpu.utilization:
            enabled: true
          process.cpu.time:
            enabled: false

Expected Result

process.cpu.utilization metric should be sent.

Actual Result

process.cpu.utilization metric is not sent.

Collector version

5fff104

Environment information

Environment

OS: Ubuntu 20.04, Macos 13.4
Compiler: go 19.1

OpenTelemetry Collector configuration

receivers:
  hostmetrics:
    collection_interval: 20s
    scrapers:
      process:
        metrics:
          process.cpu.utilization:
            enabled: true
          process.cpu.time:
            enabled: false

Log output

No response

Additional context

While debugging this I created a PR that fixes the bug. Feel free to review and merge it :)

#23451

@rubenruizdegauna rubenruizdegauna added bug Something isn't working needs triage New item requiring triage labels Jun 19, 2023
@github-actions
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@dmitryax
Copy link
Member

Fixed in #23451

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage New item requiring triage receiver/hostmetrics
Projects
None yet
Development

No branches or pull requests

2 participants