Skip to content

Conversation

@yash97
Copy link
Contributor

@yash97 yash97 commented Sep 24, 2025

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@yash97 yash97 requested a review from a team as a code owner September 24, 2025 19:13
@viveksb007
Copy link
Contributor

why it should be per pod?

having per pod observability is great but currently its telling how much time it took whenever a reconciliation request came for it. whenever a PE reconcile comes, it fetches all sibling PE(s) and then processes as a complete Network Policy.

@yash97
Copy link
Contributor Author

yash97 commented Sep 24, 2025

Current metric is ambiguous: we Observe() inside the loop with a single start, so each iteration includes all prior work. The 2nd pod’s “latency” = derive targets + pod1 setup + pod2 setup, etc. That’s neither true “per-reconcile” nor true “per-pod”.

We have two options:

Option A (preferred): move Observe() outside the loop → one value = total policy setup time for all affected pods.

Option B: time each pod with its own start and observe per-pod (and optionally add a separate counter for pods processed). (What this PR does, but now I think Option A makes more sense.)

@viveksb007
Copy link
Contributor

agreed current metric is ambiguous and doesn't provide good signal.

Option A makes sense to me.

today, this latency can be impacted by other NP(s) which target the pods which this current NP is targetting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants