Change ClaimStartupLatency to use an annotation for creation timestamp#540
Change ClaimStartupLatency to use an annotation for creation timestamp#540igooch wants to merge 2 commits intokubernetes-sigs:mainfrom
Conversation
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: igooch The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
✅ Deploy Preview for agent-sandbox canceled.
|
|
@igooch: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. DetailsInstructions 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. |
|
@igooch -> Why does it have to be a webhook added timestamp ?
|
Modifies the
ClaimStartupLatencymetric to use a newagents.x-k8s.io/webhook-first-seen-atannotation for the start time, providing millisecond granularity. This replaces the use of the Kubernetes creation timestamp, which only has second precision, and resulted in inaccurate metrics.Note that this metric is distinct from
ControllerStartupLatencywhich only includes latency after the SandboxClaim has been seen by the agent-sandbox controller.The actual webhook to add this annotation must be provided by the user or cloud provider. This PR only consumes the annotation.
Note for reviewer:
This PR is broken into two separate commits. The first commit has the functional changes. The second commit is refactoring only.
#245