Skip to content

Conversation

kyessenov
Copy link
Contributor

Change-Id: I6c64ddd71aee82b570c7df25f13e2d710a046558

Change-Id: I6c64ddd71aee82b570c7df25f13e2d710a046558
Signed-off-by: Kuat Yessenov <kuat@google.com>
@kyessenov kyessenov requested a review from a team as a code owner September 4, 2025 21:00
@istio-policy-bot
Copy link

😊 Welcome @kyessenov! This is either your first contribution to the Istio api repo, or it's been
a while since you've been here.

You can learn more about the Istio working groups, Code of Conduct, and contribution guidelines
by referring to Contributing to Istio.

Thanks for contributing!

Courtesy of your friendly welcome wagon.

@istio-testing istio-testing added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Sep 4, 2025
@@ -191,6 +191,25 @@ annotations:
resources:
- Pod

- name: sidecar.istio.io/statsFlushInterval
featureStatus: Alpha
description: Specifies the flush interval for push-based stat sinks, e.g. OTLP. Default interval is `5s`.
Copy link
Contributor

Choose a reason for hiding this comment

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

qq: if this is only for push-based stats sinks, what about prometheus (pull based)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Flush interval doesn't matter for prometheus. However, eviction piggy backs on flush timer, and eviction works for prometheus.

Copy link
Member

Choose a reason for hiding this comment

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

I don't get it. if it doesn't matter, but we evict when we flush, then it does matter...? And if the default is 5s, isn't that going to break prometheus?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Envoy always runs a stats flush timer, regardless of prometheus. During that timer, server stats are published (e.g. memory allocations, etc), and some other work is done, e.g. eviction.

Prometheus endpoint can snip stats are any point through, in between flushes.

So flush impacts prometheus only indirectly, e.g. by updating/removing some metrics.

Copy link
Member

Choose a reason for hiding this comment

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

Maybe more concretely... I send 1 request to foo.com. I get an istio_request_total metric for it.

When, with prometheus, will this metric stop showing up in /stats/prometheus with/without this annotation set?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For flush annotation: it will show up immediately and stay forever.
For eviction annotation: same, but it will disappear after 2*eviction interval unless the metric gets another hit.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks! Sorry I was being a bit dense, github UI was hiding part of the PR

@kyessenov kyessenov added the release-notes-none Indicates a PR that does not require release notes. label Sep 4, 2025
@kyessenov
Copy link
Contributor Author

/retest

@kyessenov kyessenov changed the title add bootstrap annotations stats: add bootstrap annotations for stats flush and eviction Sep 4, 2025
Copy link
Member

@zirain zirain left a comment

Choose a reason for hiding this comment

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

LGTM, Istio don't have first class API for bootstrap, this's the best option for now.

Change-Id: I245a8b8e70c54ecb4fd36a9d8fffdd0008bc78e9
Signed-off-by: Kuat Yessenov <kuat@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes-none Indicates a PR that does not require release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants