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

[hostmetricsreceiver]: support reporting amount of available logical and physical CPUs #23231

Merged

Conversation

frzifus
Copy link
Member

@frzifus frzifus commented Jun 7, 2023

Description:

Link to tracking Issue:

Testing:
Manually:

---
receivers:
  hostmetrics:
    collection_interval: 30s
    scrapers:
      cpu:
        metrics:
          system.cpu.time:
            enabled: false
          system.cpu.utilization:
            enabled: false
          system.cpu.count:
            enabled: true

exporters:
  logging:
    verbosity: detailed
  prometheus:
    endpoint: "127.0.0.1:9090"

service:
  pipelines:
    metrics:
      receivers: [hostmetrics]
      exporters: [logging, prometheus]

Got:

Resource SchemaURL: https://opentelemetry.io/schemas/1.9.0
ScopeMetrics #0
ScopeMetrics SchemaURL: 
InstrumentationScope otelcol/hostmetricsreceiver/cpu 0.79.0-dev
Metric #0
Descriptor:
     -> Name: system.cpu.count
     -> Description: Number of available CPUs.
     -> Unit: 1
     -> DataType: Gauge
NumberDataPoints #0
Data point attributes:
     -> machine-id: Str(1819479dc7174971967d4f2f1ba7b794)
StartTimestamp: 2023-06-08 13:40:33 +0000 UTC
Timestamp: 2023-06-08 14:11:56.118141589 +0000 UTC
Value: 8
	{"kind": "exporter", "data_type": "metrics", "name": "logging"}


---


# HELP system_cpu_count_ratio Nnumber of available CPUs.
# TYPE system_cpu_count_ratio gauge
system_cpu_count_ratio{machine_id="1819479dc7174971967d4f2f1ba7b794"} 8

Documentation:

documentation.md was automatically updated by mdatagen.

@frzifus frzifus force-pushed the hostmetricsreceiver_support_cpu_count branch from c950113 to a3a3ba9 Compare June 8, 2023 14:17
@frzifus frzifus requested a review from dmitryax June 8, 2023 14:19
@mx-psi mx-psi added the on hold This is blocked by another PR/issue label Jun 9, 2023
@mx-psi
Copy link
Member

mx-psi commented Jun 9, 2023

Blocked by open-telemetry/semantic-conventions#99

@frzifus frzifus force-pushed the hostmetricsreceiver_support_cpu_count branch from a3a3ba9 to 0a4e378 Compare June 19, 2023 15:05
@github-actions
Copy link
Contributor

github-actions bot commented Jul 4, 2023

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label Jul 4, 2023
@frzifus frzifus removed the Stale label Jul 6, 2023
@frzifus frzifus force-pushed the hostmetricsreceiver_support_cpu_count branch from 0a4e378 to 50c675c Compare July 7, 2023 21:21
@frzifus frzifus changed the title [hostmetricsreceiver]: support reporting amount of available CPUs [hostmetricsreceiver]: support reporting amount of available logical and physical CPUs Jul 7, 2023
@frzifus frzifus force-pushed the hostmetricsreceiver_support_cpu_count branch from 50c675c to 842b7ee Compare July 7, 2023 21:28
@frzifus frzifus force-pushed the hostmetricsreceiver_support_cpu_count branch 4 times, most recently from 2ca0d29 to f201f8e Compare July 18, 2023 15:27
@frzifus frzifus marked this pull request as ready for review July 18, 2023 15:52
@frzifus frzifus requested review from a team and mx-psi July 18, 2023 15:52
@frzifus frzifus force-pushed the hostmetricsreceiver_support_cpu_count branch from f201f8e to 67ddac1 Compare July 18, 2023 21:57
@frzifus frzifus force-pushed the hostmetricsreceiver_support_cpu_count branch from 67ddac1 to ff4541f Compare July 18, 2023 22:53
@frzifus frzifus requested a review from dmitryax July 18, 2023 23:12
@frzifus frzifus force-pushed the hostmetricsreceiver_support_cpu_count branch 2 times, most recently from 249cf22 to 703aebd Compare July 19, 2023 09:12
@frzifus frzifus requested a review from dmitryax July 19, 2023 09:12
@frzifus frzifus force-pushed the hostmetricsreceiver_support_cpu_count branch from 703aebd to 635919c Compare July 26, 2023 21:55
@frzifus frzifus removed the on hold This is blocked by another PR/issue label Aug 1, 2023
@frzifus
Copy link
Member Author

frzifus commented Aug 1, 2023

I assume we can pickup this again. Since the open-telemetry/semantic-conventions#99 got merged.

cc @mx-psi

Copy link
Member

@mx-psi mx-psi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, needs a rebase

.chloggen/hostmetricsreceiver_support_cpu_count.yaml Outdated Show resolved Hide resolved
…and physical CPUs

Signed-off-by: Benedikt Bongartz <bongartz@klimlive.de>
@frzifus frzifus force-pushed the hostmetricsreceiver_support_cpu_count branch from 635919c to 1e550ef Compare August 2, 2023 09:22
Co-authored-by: Pablo Baeyens <pbaeyens31+github@gmail.com>
@dmitryax dmitryax merged commit 6d208cf into open-telemetry:main Aug 2, 2023
80 of 81 checks passed
@github-actions github-actions bot added this to the next release milestone Aug 2, 2023
@frzifus frzifus deleted the hostmetricsreceiver_support_cpu_count branch August 2, 2023 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants