8000 adds container_start_time_seconds metric by shwejanraj · Pull Request #9282 · cri-o/cri-o · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

adds container_start_time_seconds metric #9282

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

shwejanraj
Copy link
@shwejanraj shwejanraj commented Jun 24, 2025

What type of PR is this?

/kind feature

What this PR does / why we need it:

This PR adds a new metric, container_start_time_seconds, to the CRI-O metrics. This metric exposes the start time of containers (in seconds since the Unix epoch), enabling observability and monitoring tools to track the precise start events of containers via the metrics endpoint.

Which issue(s) this PR fixes:

9125

Special notes for your reviewer:

  • The metric is categorized under "other" metrics.
  • Follows existing metric patterns for easy integration.

Does this PR introduce a user-facing change?

Added new container metric container_start_time_seconds to expose the start time of containers (as seconds since Unix epoch) in CRI-O metrics. This enables observability tools to track precise container start events through the metrics endpoint.

Signed-off-by: Shwejan Raj, Bhupathi <Bhupathi.ShwejanRaj@fmr.com>
@shwejanraj shwejanraj requested a review from mrunalp as a code owner June 24, 2025 16:07
@openshift-ci openshift-ci bot added dco-signoff: yes Indicates the PR's author has DCO signed all their commits. do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Jun 24, 2025
@openshift-ci openshift-ci bot requested review from hasan4791 and QiWang19 June 24, 2025 16:07
Copy link
Contributor
openshift-ci bot commented Jun 24, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: shwejanraj
Once this PR has been reviewed and has the lgtm label, please assign umohnani8 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jun 24, 2025
Copy link
Contributor
openshift-ci bot commented Jun 24, 2025

Hi @shwejanraj. Thanks for your PR.

I'm waiting for a cri-o member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@bitoku
Copy link
Contributor
bitoku commented Jun 25, 2025

@shwejanraj Thank you for the PR. Can you fill in the description and the release note?

Copy link
codecov bot commented Jun 25, 2025

Codecov Report

Attention: Patch coverage is 0% with 17 lines in your changes missing coverage. Please review.

Project coverage is 56.12%. Comparing base (155deb6) to head (ffd6d74).
Report is 50 commits behind head on main.

❗ There is a different number of reports uploaded between BASE (155deb6) and HEAD (ffd6d74). Click for more details.

HEAD has 23 uploads less than BASE
Flag BASE (155deb6) HEAD (ffd6d74)
30 7
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #9282       +/-   ##
===========================================
- Coverage   66.92%   56.12%   -10.80%     
===========================================
  Files         198      199        +1     
  Lines       27176    27320      +144     
===========================================
- Hits        18187    15333     -2854     
- Misses       7488    10487     +2999     
+ Partials     1501     1500        -1     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@shwejanraj
Copy link
Author

@shwejanraj Thank you for the PR. Can you fill in the description and the release note?

I overlooked them..sorry for that. I have added those now.

@openshift-ci openshift-ci bot added dco-signoff: no Indicates the PR's author has not DCO signed all their commits. and removed dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Jun 25, 2025
Signed-off-by: Bhupathi Shwejan Raj <Bhupathi.ShwejanRaj@fmr.com>
@kayhern kayhern force-pushed the metrics/9125-container_start_time_seconds branch from cad5b52 to 8d2c172 Compare June 25, 2025 19:02
@openshift-ci openshift-ci bot added dco-signoff: yes Indicates the PR's author has DCO signed all their commits. and removed dco-signoff: no Indicates the PR's author has not DCO signed all their commits. labels Jun 25, 2025
@shwejanraj
Copy link
Author

@bitoku. Can you please review the PR.

@bitoku
Copy link
Contributor
bitoku commented Jun 26, 2025

/ok-to-test

@openshift-ci openshift-ci bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 26, 2025
Copy link
Contributor
@bitoku bitoku left a comment

Choose a reason for hiding this comment

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

Can you add e2e test for this change?
You can refer to this https://github.com/cri-o/cri-o/tree/main/test.

var (
containerStartTimeSeconds = &types.MetricDescriptor{
Name: "container_start_time_seconds",
Help: "Start time of the container since unix epoch",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Help: "Start time of the container since unix epoch",
Help: "Start time of the container since unix epoch in seconds.",

@openshift-ci openshift-ci bot added dco-signoff: no Indicates the PR's author has not DCO signed all their commits. and removed dco-signoff: yes Indicates the PR's author has DCO signed all their commits. labels Jun 30, 2025
Copy link
Contributor
openshift-ci bot commented Jun 30, 2025

Thanks for your pull request. Before we can look at it, you'll need to add a 'DCO signoff' to your commits.

📝 Please follow instructions in the contributing guide to update your commits with the DCO

Full details of the Developer Certificate of Origin can be found at developercertificate.org.

The list of commits missing DCO signoff:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Copy link
Contributor
openshift-ci bot commented Jun 30, 2025

@shwejanraj: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/ci-cgroupv2-integration ffd6d74 link true /test ci-cgroupv2-integration
ci/prow/ci-fedora-integration ffd6d74 link true /test ci-fedora-integration
ci/prow/ci-e2e-evented-pleg ffd6d74 link false /test ci-e2e-evented-pleg

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-ci openshift-ci bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Jul 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dco-signoff: no Indicates the PR's author has not DCO signed all their commits. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0