I have created a log sink to capture the logs generating by components being used in our project. below are given sink details:
gcloud logging sinks describe test-project-instance-activity
bigqueryOptions:
usePartitionedTables: true
usesTimestampColumnPartitioning: true
createTime: '2021-10-17T05:15:48.434334305Z'
description: test sink to capture the instance activities
destination: bigquery.googleapis.com/projects/test-project/datasets/test_logging
filter: |-
resource.type = cloud_composer_environment OR
resource.type = cloud_dataproc_cluster OR
resource.type = gce_disk OR
resource.type = gce_vm_instance OR
resource.type = gke_container OR
resource.type = k8s_cluster
name: test-project-instance-activity
updateTime: '2021-10-17T05:15:48.434334305Z'
writerIdentity: serviceAccount:p121-639060@gcp-sa-logging.iam.gserviceaccount.com
I am capturing log details in big query dataset which has created below list of tables:
SELECT table_id FROM `test-project.test_logging`.__TABLES__;
I checked and found that most of the tables are including INFO
logs and they are generating in huge numbers for any activity happening around these google APIs. Are we really needed these many info logs? what would be the best way to exclude or filter them?
Exclusion filter(s):
resource.type="container"
severity="INFO"
as per google docs: Logs are excluded after they are received by the Logging API
Does it mean that I can only save the space where I am keeping my excluded INFO logs entries.. such as gcs or bq.
or do I need to change my application code to report less on logging.. or something can be change on airflow.cfg
file.
Any pointers to sqls to analyze these log tables?
Just a summary: incase it helps. We are running airflow dags to ingest the gcs bucket data to bq and using spark to do some aggregation upon them and we are ingesting a huge loads of data in every 15 minutes throughout the day.
Kindly suggest to minimize and reduce the logging cost. We are generating a huge logs every month.
Do we get billed for _Default
log bucket as well? what I am going to miss if I disable it.