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] Add an uptime scraper #35932

Closed
atoulme opened this issue Oct 22, 2024 · 4 comments
Closed

[receiver/hostmetrics] Add an uptime scraper #35932

atoulme opened this issue Oct 22, 2024 · 4 comments
Labels

Comments

@atoulme
Copy link
Contributor

atoulme commented Oct 22, 2024

Component(s)

receiver/hostmetrics

Is your feature request related to a problem? Please describe.

The uptime of the system can be reported by the hostmetrics receiver.

Describe the solution you'd like

We would like to define an additional scraper. It would report periodically the uptime of the machine as reported by gopsutil.

This would be reported as a single metric.

Describe alternatives you've considered

No response

Additional context

No response

@atoulme atoulme added enhancement New feature or request needs triage New item requiring triage and removed needs triage New item requiring triage labels Oct 22, 2024
Copy link
Contributor

Pinging code owners:

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

@ChrsMark
Copy link
Member

SemConv PR for this: open-telemetry/semantic-conventions#1507

@braydonk
Copy link
Contributor

I'd propose we call the scraper system. We haven't been calling it a rule before but the way the system semantic conventions have worked out mapped to our hostmetrics scrapers is that the namespace of the metric ends up being the name of the scraper. i.e. system.memory.* will be produced by memoryscraper and so on. So system.uptime being produced by systemscraper would follow the rule and future-proof us against potential future root system metrics (I can't think of any potential examples that might come up but this way we wouldn't be stuck if it happens).
@dmitryax what are your thoughts here?

@kevinnoel-be
Copy link
Contributor

Duplicate of #31627 ?

djaglowski pushed a commit that referenced this issue Nov 5, 2024
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
This PR makes some changes that I had hoped to suggest on #35954,
however I was unable to make my comment in time before the PR was
merged.

The changes this PR makes are:
* The `uptime` scraper is changed to be named `system`
* The scraper is registered using the scraper name when adding to the
scrapercontroller

<!-- Issue number (e.g. #1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Amends the fix to #31627 (following a comment I made on #35932)

<!--Describe what testing was performed and which tests were added.-->
#### Testing

<!--Describe the documentation added.-->
#### Documentation

The documentation that was added for the `uptime` scraper was renamed
accordingly, and the description adjusted.

<!--Please delete paragraphs that you did not use before submitting.-->
michael-burt pushed a commit to michael-burt/opentelemetry-collector-contrib that referenced this issue Nov 7, 2024
…-telemetry#36123)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
This PR makes some changes that I had hoped to suggest on open-telemetry#35954,
however I was unable to make my comment in time before the PR was
merged.

The changes this PR makes are:
* The `uptime` scraper is changed to be named `system`
* The scraper is registered using the scraper name when adding to the
scrapercontroller

<!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Amends the fix to open-telemetry#31627 (following a comment I made on open-telemetry#35932)

<!--Describe what testing was performed and which tests were added.-->
#### Testing

<!--Describe the documentation added.-->
#### Documentation

The documentation that was added for the `uptime` scraper was renamed
accordingly, and the description adjusted.

<!--Please delete paragraphs that you did not use before submitting.-->
sbylica-splunk pushed a commit to sbylica-splunk/opentelemetry-collector-contrib that referenced this issue Dec 17, 2024
…-telemetry#36123)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
This PR makes some changes that I had hoped to suggest on open-telemetry#35954,
however I was unable to make my comment in time before the PR was
merged.

The changes this PR makes are:
* The `uptime` scraper is changed to be named `system`
* The scraper is registered using the scraper name when adding to the
scrapercontroller

<!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Amends the fix to open-telemetry#31627 (following a comment I made on open-telemetry#35932)

<!--Describe what testing was performed and which tests were added.-->
#### Testing

<!--Describe the documentation added.-->
#### Documentation

The documentation that was added for the `uptime` scraper was renamed
accordingly, and the description adjusted.

<!--Please delete paragraphs that you did not use before submitting.-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants