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 process.uptime metric #14460

Conversation

andrzej-stencel
Copy link
Member

Description:

Adds a new optional metric called process.uptime to the process scraper of the hostmetrics receiver.

Link to tracking Issue:

Here's the original issue about system.uptime that resulted in this pull request: #14130

I'm going to create a PR adding system.uptime as a next step.

Here's the PR to add the metric names to semantic conventions: open-telemetry/opentelemetry-specification#2824.

There's also a related issue proposing a "process create time" metric #14084, which resulted in a proposal to add a process.create_time resource attribute: open-telemetry/opentelemetry-specification#2825.

@andrzej-stencel andrzej-stencel requested a review from a team September 23, 2022 13:37
@andrzej-stencel andrzej-stencel changed the title [receiver/hostmetrics]: Add process.uptime metric [receiver/hostmetrics] Add process.uptime metric Sep 29, 2022
@andrzej-stencel andrzej-stencel force-pushed the add-process-uptime-metric branch 2 times, most recently from efda6a3 to 946e505 Compare October 3, 2022 10:51
@github-actions
Copy link
Contributor

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

@dmitryax
Copy link
Member

@astencel-sumo PTAL at the failing CI

@dmitryax dmitryax removed the Stale label Oct 19, 2022
@andrzej-stencel andrzej-stencel force-pushed the add-process-uptime-metric branch 2 times, most recently from 9ed0688 to 3685283 Compare October 24, 2022 10:14
@andrzej-stencel andrzej-stencel force-pushed the add-process-uptime-metric branch 2 times, most recently from 46bc326 to 55ebea8 Compare November 7, 2022 13:41
@runforesight
Copy link

runforesight bot commented Dec 15, 2022

Foresight Summary

    
Major Impacts

TestConsumeLogsUnexpectedExporterType ❌ failed 2 times in 2 runs (100% fail rate).
TestConsumeTracesUnexpectedExporterType ❌ failed 2 times in 2 runs (100% fail rate).
build-and-test-windows duration(3 seconds) has decreased 40 minutes 52 seconds compared to main branch avg(40 minutes 55 seconds).
View More Details

⭕  build-and-test-windows workflow has finished in 3 seconds (40 minutes 43 seconds less than main branch avg.) and finished at 15th Dec, 2022.


Job Failed Steps Tests
windows-unittest-matrix -     🔗  N/A See Details
windows-unittest -     🔗  N/A See Details

✅  tracegen workflow has finished in 1 minute 16 seconds (2 minutes 23 seconds less than main branch avg.) and finished at 15th Dec, 2022.


Job Failed Steps Tests
publish-latest -     🔗  N/A See Details
publish-stable -     🔗  N/A See Details
build-dev -     🔗  N/A See Details

✅  check-links workflow has finished in 1 minute 25 seconds (1 minute 52 seconds less than main branch avg.) and finished at 15th Dec, 2022.


Job Failed Steps Tests
changed files -     🔗  N/A See Details
check-links -     🔗  N/A See Details

✅  changelog workflow has finished in 2 minutes 9 seconds (5 minutes 17 seconds less than main branch avg.) and finished at 15th Dec, 2022.


Job Failed Steps Tests
changelog -     🔗  N/A See Details

✅  prometheus-compliance-tests workflow has finished in 3 minutes 22 seconds (6 minutes 10 seconds less than main branch avg.) and finished at 15th Dec, 2022.


Job Failed Steps Tests
prometheus-compliance-tests -     🔗  ✅ 21  ❌ 0  ⏭ 0    🔗 See Details

❌  build-and-test workflow has finished in 28 minutes 49 seconds (31 minutes 25 seconds less than main branch avg.) and finished at 15th Dec, 2022. 1 job failed. There are 4 test failures.


Job Failed Steps Tests
unittest-matrix (1.18, internal) -     🔗  ✅ 592  ❌ 0  ⏭ 0    🔗 See Details
unittest-matrix (1.18, processor) -     🔗  ✅ 1441  ❌ 0  ⏭ 0    🔗 See Details
unittest-matrix (1.19, internal) -     🔗  ✅ 592  ❌ 0  ⏭ 0    🔗 See Details
correctness-metrics -     🔗  ✅ 2  ❌ 0  ⏭ 0    🔗 See Details
unittest-matrix (1.18, extension) -     🔗  ✅ 528  ❌ 0  ⏭ 0    🔗 See Details
correctness-traces -     🔗  ✅ 17  ❌ 0  ⏭ 0    🔗 See Details
unittest-matrix (1.19, extension) -     🔗  ✅ 528  ❌ 0  ⏭ 0    🔗 See Details
unittest-matrix (1.19, processor) -     🔗  ✅ 1441  ❌ 0  ⏭ 0    🔗 See Details
unittest-matrix (1.18, receiver-0) -     🔗  ✅ 2537  ❌ 0  ⏭ 0    🔗 See Details
unittest-matrix (1.19, receiver-0) -     🔗  ✅ 2537  ❌ 0  ⏭ 0    🔗 See Details
unittest-matrix (1.19, exporter) -     🔗  ✅ 2237  ❌ 2  ⏭ 0    🔗 See Details
unittest-matrix (1.18, other) -     🔗  ✅ 4363  ❌ 0  ⏭ 0    🔗 See Details
unittest-matrix (1.18, receiver-1) -     🔗  ✅ 1854  ❌ 0  ⏭ 0    🔗 See Details
unittest-matrix (1.18, exporter) -     🔗  ✅ 2237  ❌ 2  ⏭ 0    🔗 See Details
unittest-matrix (1.19, other) -     🔗  ✅ 4363  ❌ 0  ⏭ 0    🔗 See Details
unittest-matrix (1.19, receiver-1) -     🔗  ✅ 1854  ❌ 0  ⏭ 0    🔗 See Details
integration-tests -     🔗  ✅ 53  ❌ 0  ⏭ 0    🔗 See Details
setup-environment -     🔗  N/A See Details
check-collector-module-version -     🔗  N/A See Details
checks -     🔗  N/A See Details
check-codeowners -     🔗  N/A See Details
lint-matrix (receiver-0) -     🔗  N/A See Details
lint-matrix (receiver-1) -     🔗  N/A See Details
lint-matrix (processor) -     🔗  N/A See Details
lint-matrix (exporter) -     🔗  N/A See Details
lint-matrix (extension) -     🔗  N/A See Details
lint-matrix (internal) -     🔗  N/A See Details
lint-matrix (other) -     🔗  N/A See Details
build-examples -     🔗  N/A See Details
lint -     🔗  N/A See Details
unittest (1.19) -     🔗  N/A See Details
unittest (1.18) -     🔗  N/A See Details
cross-compile (darwin, amd64) -     🔗  N/A See Details
cross-compile (darwin, arm64) -     🔗  N/A See Details
cross-compile (linux, 386) -     🔗  N/A See Details
cross-compile (linux, amd64) -     🔗  N/A See Details
cross-compile (linux, arm) -     🔗  N/A See Details
cross-compile (linux, arm64) -     🔗  N/A See Details
cross-compile (linux, ppc64le) -     🔗  N/A See Details
cross-compile (windows, 386) Build Collector     🔗  N/A See Details
cross-compile (windows, amd64) -     🔗  N/A See Details
windows-msi -     🔗  N/A See Details
build-package -     🔗  N/A See Details
publish-check -     🔗  N/A See Details
publish-dev -     🔗  N/A See Details
publish-stable -     🔗  N/A See Details

✅  load-tests workflow has finished in 26 minutes 59 seconds (⚠️ 10 minutes 4 seconds more than main branch avg.) and finished at 15th Dec, 2022.


Job Failed Steps Tests
loadtest (TestIdleMode) -     🔗  ✅ 1  ❌ 0  ⏭ 0    🔗 See Details
loadtest (TestMetricResourceProcessor|TestTrace10kSPS) -     🔗  ✅ 12  ❌ 0  ⏭ 0    🔗 See Details
loadtest (TestTraceNoBackend10kSPS|TestTrace1kSPSWithAttrs) -     🔗  ✅ 8  ❌ 0  ⏭ 0    🔗 See Details
loadtest (TestTraceBallast1kSPSWithAttrs|TestTraceBallast1kSPSAddAttrs) -     🔗  ✅ 10  ❌ 0  ⏭ 0    🔗 See Details
loadtest (TestTraceAttributesProcessor) -     🔗  ✅ 3  ❌ 0  ⏭ 0    🔗 See Details
loadtest (TestMetric10kDPS|TestMetricsFromFile) -     🔗  ✅ 6  ❌ 0  ⏭ 0    🔗 See Details
loadtest (TestBallastMemory|TestLog10kDPS) -     🔗  ✅ 19  ❌ 0  ⏭ 0    🔗 See Details
setup-environment -     🔗  N/A See Details

🔎 See details on Foresight

*You can configure Foresight comments in your organization settings page.

@andrzej-stencel
Copy link
Member Author

andrzej-stencel commented Dec 15, 2022

The build-and-test / cross-compile (windows, 386) job failure seems to be caused by this change in otel core: open-telemetry/opentelemetry-collector#6722

return err
}
processUptime := now.AsTime().UnixMilli() - createTime
s.mb.RecordProcessUptimeDataPoint(now, processUptime)
Copy link
Contributor

Choose a reason for hiding this comment

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

it looks like this will be in milliseconds, when your description of the metric says the value is in seconds.

@wbarnha
Copy link

wbarnha commented May 15, 2023

Any update on this? It'd be nice to have this feature included.

@andrzej-stencel
Copy link
Member Author

Any update on this? It'd be nice to have this feature included.

I'm intending to get back to it, when I tick off some other items on my priority list 🤞

@github-actions
Copy link
Contributor

github-actions bot commented Jun 7, 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 Jun 7, 2023
@wbarnha
Copy link

wbarnha commented Jun 7, 2023

Commenting to keep this from getting closed.

@dmitryax dmitryax removed the Stale label Jun 7, 2023
@dmitryax
Copy link
Member

dmitryax commented Jun 7, 2023

@wbarnha feel free to take over this PR if you're interested

@wbarnha
Copy link

wbarnha commented Jun 7, 2023

Sounds good, I'll give it a shot

@github-actions
Copy link
Contributor

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 Jun 22, 2023
@wbarnha
Copy link

wbarnha commented Jun 22, 2023

I'll give it a shot soon, just backlogged with my own projects at the moment.

@github-actions github-actions bot removed the Stale label Jun 23, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jul 7, 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 7, 2023
@github-actions
Copy link
Contributor

Closed as inactive. Feel free to reopen if this PR is still being worked on.

@github-actions github-actions bot closed this Jul 22, 2023
@krantishetty
Copy link

Added metrics under process to get the process uptime but it failed with below error
Metric has invalid keys process.uotime
Error decoding receiver's

@atoulme
Copy link
Contributor

atoulme commented Feb 5, 2024

Please don’t comment on closed issues. You have a typo in your metric key.

@krantishetty
Copy link

Created no issue, unfortunately I'm not getting any response,
#31107 (comment)
My ask is
process:
metrics:
process.uptime:
enabled: true

error details

'metrics' has invalid keys: process.uptime. collector server run finished with error: failed to get config: cannot unmarshal the confiuration: 1 error(s) decoding:

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.

5 participants