Open iydoowii opened 5 months ago
This doesn't seem to be an issue with the sidecar. Instead, Cloud Run terminates the instance (app container and sidecar together) due to an event like scale down or deleted revision. These logs are from such an event. https://cloud.google.com/run/docs/container-contract#lifecycle-services has more details about when Cloud run will terminate an instance, I suspect its because the instance is idle because no requests are being served.
As soon as the instance boots up again (because new requests are rolling in), the sidecar should start up as well.
When I check cloud run, Both seems are running(sidecar and cloud run) but, It says that collector shutdown, but it still sends metric to google managed Prometheus. This is not a case that cloud run instance also terminated.
I faced similar issue, but after comparison of logs. Found out that it's terminating older reversion.
Hi
initially, I was getting
Failed to scrape Prometheus endpoint
error. I saw that app redirect /metric to /metricsI created custom RunMonitoring
after this change, sidecar start working but it is terminated around 2 min later. main app is running file. It seems cloudrun terminates sidecar.
Any idea? why it happens and how can we fix it?