microsoft / ApplicationInsights-Kubernetes

Enrich the telemetry data for .NET applications running inside containers that are managed by Kubernetes.
Other
135 stars 57 forks source link

Exponential query interval #349

Closed xiaomi7732 closed 1 year ago

xiaomi7732 commented 1 year ago

Address #348. Introduce exponential query intervals instead of blocking on waiting for the container to be ready.

Testing log, starting from 2 seconds, and the max interval is capped to 1 minute:

[Debug] [2023-04-03T19:07:57.7312798Z] Finished update K8sEnvironment, next iteration will happen at 04/03/2023 19:07:59 (UTC) by interval settings of 00:00:02
[Debug] [2023-04-03T19:07:59.7503780Z] Finished update K8sEnvironment, next iteration will happen at 04/03/2023 19:08:03 (UTC) by interval settings of 00:00:04
[Debug] [2023-04-03T19:08:03.7709865Z] Finished update K8sEnvironment, next iteration will happen at 04/03/2023 19:08:11 (UTC) by interval settings of 00:00:08
[Debug] [2023-04-03T19:08:11.7823652Z] Finished update K8sEnvironment, next iteration will happen at 04/03/2023 19:08:27 (UTC) by interval settings of 00:00:16
[Debug] [2023-04-03T19:08:27.7978012Z] Finished update K8sEnvironment, next iteration will happen at 04/03/2023 19:08:59 (UTC) by interval settings of 00:00:32
[Debug] [2023-04-03T19:08:59.8081428Z] Finished update K8sEnvironment, next iteration will happen at 04/03/2023 19:09:59 (UTC) by interval settings of 00:01:00
[Debug] [2023-04-03T19:09:59.8270865Z] Finished update K8sEnvironment, next iteration will happen at 04/03/2023 19:10:59 (UTC) by interval settings of 00:01:00
[Debug] [2023-04-03T19:10:59.8377537Z] Finished update K8sEnvironment, next iteration will happen at 04/03/2023 19:11:59 (UTC) by interval settings of 00:01:00
xiaomi7732 commented 1 year ago

Thanks for the prompt review @karolz-ms!