是否可以为 Google Cloud 运行 禁用 Stackdriver 日志记录?

Is it possible to disable Stackdriver logging for Google Cloud Run?

我已经在 Google Cloud 运行 上建立了一个小项目,我正在查看产生的成本,Stackdriver Logging 看起来相当昂贵。是否可以禁用它?如何?我没能在文档中找到它。

根据官方文档

Logging and viewing logs

Cloud Run has two types of logs, and these are automatically sent to Cloud Logging:

Request logs: logs of requests sent to Cloud Run services. These logs are created automatically. Container logs: logs emitted from the container instances, typically from your own code, written to supported locations as described in Writing container logs.

"Request logs are created automatically. Although you cannot control the amount of request logs directly from Cloud Run, you can make use of the logs exclusion feature from Cloud Logging."

因此您不能禁用 Cloud 运行 的日志,但您可以使用 logs exculusion

控制日志的数量