stats: add bootstrap annotations for stats flush and eviction#3562
stats: add bootstrap annotations for stats flush and eviction#3562istio-testing merged 2 commits intoistio:masterfrom
Conversation
Change-Id: I6c64ddd71aee82b570c7df25f13e2d710a046558 Signed-off-by: Kuat Yessenov <kuat@google.com>
|
😊 Welcome @kyessenov! This is either your first contribution to the Istio api repo, or it's been You can learn more about the Istio working groups, Code of Conduct, and contribution guidelines Thanks for contributing! Courtesy of your friendly welcome wagon. |
|
|
||
| - name: sidecar.istio.io/statsFlushInterval | ||
| featureStatus: Alpha | ||
| description: Specifies the flush interval for push-based stat sinks, e.g. OTLP. Default interval is `5s`. |
There was a problem hiding this comment.
qq: if this is only for push-based stats sinks, what about prometheus (pull based)?
There was a problem hiding this comment.
Flush interval doesn't matter for prometheus. However, eviction piggy backs on flush timer, and eviction works for prometheus.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Thanks! Sorry I was being a bit dense, github UI was hiding part of the PR
|
/retest |
zirain
left a comment
There was a problem hiding this comment.
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>
|
@howardjohn @keithmattix How does this get moved forward? |
| resources: | ||
| - Pod | ||
|
|
||
| - name: sidecar.istio.io/statsFlushInterval |
There was a problem hiding this comment.
Does the sidecar prefix mean this doesn't work for gateways/waypoints? I would guess no (that this is just convention) but wanted to confirm
There was a problem hiding this comment.
No, it's interpreted by pilot-agent which is the same for gateways and sidecars.
|
Is there any way to control defaults for |
this's part of bootstrap, which is not dynamiced. |
|
For others who want to adopt this Istio-cluster-wide, add it to your E.g. It'd be handy if https://istio.io/latest/docs/reference/config/annotations/ mentioned the default sidecar template; I'll see if I can cook up a docs patch for that. |
Change-Id: I6c64ddd71aee82b570c7df25f13e2d710a046558