Questions tagged [google-cloud-logging]

Google Cloud Logging collects and stores logs from applications and services on the Google Cloud Platform

Introduction

Google Cloud Logging collects and stores logs from applications and services on the Google Cloud Platform:

  • View your logs with the Logs Viewer.
  • Export your logs to Google Cloud Storage, Google BigQuery, or Google Cloud Pub/Sub.
  • Integrate third-party logs from your virtual machine instances by installing the logging agent, google-fluentd.

Cloud Logging saves metadata with every log entry so that you can tell when the log entry was created, from what resource or instance it came, what its severity level is, and so forth. The log entry's original content, or payload, might be saved as a text string or as a structured object, depending on the log type.

Official documentation

622 questions
3
votes
0 answers

How to add value to default summary fields in google cloud log explorer

I am currently trying to clean my google cloud log explorer and want to add summary fields to show up by default in the explorer like this: My desired effect can be achieved by setting custom summary fields to show label values, but I want this…
T M
  • 31
  • 4
3
votes
1 answer

Find logs of requests that are longer than 1000ms using regex

I'm using regex to search Google Cloud Logs for requests that are longer than 1000ms Here are some example requests: { ... textPayload: "GET /getUser 200 - - 5380.879 ms", ... } { ... textPayload: "GET /getUser 200 - - 34.879…
Dev01
  • 13,292
  • 19
  • 70
  • 124
3
votes
1 answer

Automatic delete Cloud Logging logs

I would like to know if there is a way to periodically delete logs from inside Cloud Logging. I have setup Firebase with Cloud Functions and i have an automatic Cloud Logging logs injection done for each function call. I don't want especially to…
Tom3652
  • 2,540
  • 3
  • 19
  • 45
3
votes
1 answer

How do I see the full error message in GCP Logs Explorer?

In the "Logs Explorer" I can see a lot of errors e.g But when I click on either of the lines I just get a lot of information but the only thing I care about, the error message, is not there. Is there a way where I can actually see the outputs of a…
CutePoison
  • 4,679
  • 5
  • 28
  • 63
3
votes
1 answer

GCP Log explorer shows wrong severity level of log records

I am running a java application in GKE and monitoring logs in Log explorer. Java application is writing logs to stdout and as far as I understand GKE agent parse it and send it to log explorer. What I found is that the log explorer shows WARN and…
3
votes
1 answer

Ingesting Logs older than 30d into Google Cloud Logging discarded despite custom retention

We have an application that tries to migrate existing application logs of about a year into google cloud logging. I have created a custom logging bucket with a retention time of 400d and a custom sink that writes all the requests for a given logName…
jstadler
  • 340
  • 1
  • 3
  • 7
3
votes
2 answers

Google.Cloud.Diagnostics.AspNetCore3 debug level not working

Consider a wizard generated ASP.NET Core project (NET 6). Add a Google.Cloud.Diagnostics.AspNetCore3 NuGet package and services.AddGoogleDiagnosticsForAspNetCore() to Startup.cs. Let GOOGLE_APPLICATION_CREDENTIALS environment variable point to a…
wpfwannabe
  • 14,587
  • 16
  • 78
  • 129
3
votes
1 answer

How to log all firestore operations using cloud logging?

It looks like there is a service for logging all read/write operations in Firestore: https://cloud.google.com/firestore/docs/audit-logging I have billing enabled, as well as the Cloud Storage for Firebase API with read/write data access. (the api…
3
votes
1 answer

creating an alert when no data was uploaded to BigQuery table in GCP

I have a requirement to send an email notification whenever there is no data getting inserted into my BigQuery table. For this, I am using the Logging and Alerting mechanism But still, I am not able to receive any email. Here are the steps I…
3
votes
2 answers

How to convert google cloud pubsub payload to LogEntry object in Golang

I created a Logs Router Sink to export logs to a Pub/Sub. My Golang application is supposed to consume messages from this Pub/Sub via a dedicated Subscription using google client library (Golang). The messages received on the Subscription are JSON…
3
votes
1 answer

How to bundle Cloud Logging entries by request?

I'm try to get Cloud Logging to bundle (i.e., group) log entries by request in Cloud Logs Explorer, similar to what node-js-logging-winston does on the Cloud Functions Node…
jacob
  • 2,762
  • 1
  • 20
  • 49
3
votes
0 answers

Difference between inclusion and exclusion filters in Google Cloud Logging?

I am trying to understand the differences between the inclusion and exclusion filters in Google Cloud Logging, but there is very little documentation on how inclusion filters affects the Log Router/Sink. To illustrate, these are snippets that…
Seng Cheong
  • 442
  • 3
  • 14
3
votes
1 answer

Create Distribution Metric with Logs-Based Metrics and Regex

I'm trying to create a metric extracted from a string from some logs. I'm creating a new Distribution Log Metric. I'm applying the filter to get the right logs. The filter is working as I can preview it. Then I'm entering the Field name for my…
3
votes
1 answer

gcp: events are not consistent for resource type. "operation" is missing for buckets

According to following GCP link standards event structure in json should have operation details. But found that for storage bucket operation entry is missing in log to identify it as last action occurred. "operation": { object…
3
votes
2 answers

How can I get notifications for all stderr logs sent to Google Cloud Logging?

I'd like to get notifications for all standard error logs sent to Google Cloud Logging. Preferably, I'd like to get the notifications through Google Cloud Error Reporting, so I can easily get notifications on my phone through the GCP mobile…