在 GCS 中存储 Google App Engine 标准日志时,_A0 和 _S0 日志文件有什么区别

What is the difference between _A0 & _S0 log files when storing Google App Engine Standard logs in GCS

我已经打开开关,将 GAE 标准应用程序的日志发送到 GCS 存储桶。正如预期的那样,我每天都会看到一个文件夹。每天的每个小时,我都会看到一个非常大的 json 文件,扩展名为 _S0.json。几个小时后,我还看到一个小得多的文件,扩展名为 _A0:.json。例如:

01:00:00_01:59:59_S0.json & 01:00:00_01:59:59_A0:4679580000.json

有什么区别,我正在尝试post处理文件,需要知道。

导出到 GCS 的日志被分片,_A0_S0 只是日志分片的标识符。

来自 Log entries in Google Cloud Storage(强调我的):

The leaf directories (DD/) contain multiple files, each of which holds the exported log entries for a time period specified in the file name. The files are sharded and their names end in a shard number, Sn or An (n=0, 1, 2, ...). For example, here are two files that might be stored within the directory my-gcs-bucket/syslog/2015/01/13/:

08:00:00_08:59:59_S0.json
08:00:00_08:59:59_S1.json

These two files together contain the syslog log entries for all instances during the hour beginning 0800 UTC. To get all the log entries, you must read all the shards for each time period—in this case, file shards 0 and 1. The number of file shards written can change for every time period depending on the volume of log entries.

我通过下面引自 Quotas and limits:

的最后一个 link 到达了上面的页面

Logs ingestion allotment

Logging for App Engine apps is provided by Stackdriver. By default, logs are stored for an application free of charge for up to 7 days and 5GB. Logs older than the maximum retention time are deleted, and attempts to store above the free ingestion limit of 5 gigabytes will result in an error. You can update to the Premium Tier for greater storage capacity and retention length. See Stackdriver pricing for more information on logging rates and limits. If you want to retain your logs for longer than what Stackdriver allows, you can export logs to Google Cloud Storage, Google BigQuery, or Google Cloud Pub/Sub.