Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Cloud logging router default sink not work

Hi, I am currently using Cloud logging with the _Default sink Exclusion filter to reduce the number of logs. However, it seems that the Exclusion filter may not be working properly. I have noticed that my billing for the Cloud Logging service has increased compared to the previous month.

The Exclusion filter rule that I have set is:

resource.type="k8s_cluster" AND protoPayload.methodName="io.k8s.coordination.v1.leases.update"

Despite this rule, the log entries that should be excluded based on this filter are still appearing in my log queries.

0 1 392
1 REPLY 1

Hi @sonpn8,

Welcome to Google Cloud Community!

It is recommended to add this Log query to the Exclusion filter:

NOT resource.type="k8s_cluster" AND NOT protoPayload.methodName="io.k8s.coordination.v1.leases.update"

JuatonCJ_6-1729619985118.png

Click Done and after updating the sink, click on "See logging bucket."

JuatonCJ_8-1729620046500.png

In the Log Explorer, select the project logs.

JuatonCJ_9-1729620172252.png

Change Current project into log view and make sure to check  _Default to filter the excluded logs under the _Default sink and click Apply.

JuatonCJ_10-1729620202972.pngNote: Please wait a few minutes, it will take some time to  minimize the number of logs.

The log shows that the "io.k8s.coordination.v1.leases.update" was not included.

JuatonCJ_11-1729620285740.pngFor more reference regarding sink and exclusion filters, review the following documentations:

For further assistance feel free to file a ticket to Google cloud support team.

I hope the above information is helpful.