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
8
votes
2 answers

No data in Cloud Monitoring from user-defined metrics in Cloud Logging

I have created 2 user-defined metrics in the Cloud Logging UI. Those metrics show up in Cloud Monitoring, but their graphs are perpetually showing "no graph data found". Are there any steps to troubleshoot this or are there other requirements to…
8
votes
2 answers

Logging to the Google Cloud in Google Container/Compute Engine with Go

I have a GKE application with 20 nodes running Go. I would like to consolidate all the logs to view in the Google Developers Console log viewer, but I am having 2 problems. I can't get severity filtering, and each newline in my log message starts a…
7
votes
0 answers

Google cloud logging shows python INFO messages as errors

I have an application running in Kubernetes in google cloud. The application is written in python using fastapi. Logs from that application are visible via google cloud logging, however their "serverity" appears to be incorrectly translated: While…
Ingo
  • 1,103
  • 8
  • 17
7
votes
1 answer

GCP Alert Filters Don't Affect Open Incidents

I have an alert that I have configured to send email when the sum of executions of cloud functions that have finished in status other than 'error' or 'ok' is above 0 (grouped by the function name). The way I defined the alert is: And the secondary…
7
votes
1 answer

View response body on Google Cloud Scheduler logs

This article says to simply click view under the Logs column to see the output of Google Cloud Scheduler logs. However, while I can see the status code of a HTTP scheduled function, I cannot see the response. For instance, this request normally…
7
votes
2 answers

How can we see logs just after and before particular text in Google Cloud Logging?

In Google Cloud Logging, using advanced search Can we search for a text and then see logs present after and before that particular text? Like for example in a PDF, doc or any file when you search for a word then after searching that word you can see…
7
votes
1 answer

The Google Cloud Logging driver for Docker

I'm not able to authenticate the google cloud driver gcplogs for Docker despite the fact that I've set the env var GOOGLE_APPLICATION_CREDENTIALS to the path/file where the JSON credentials of my service account is. The error message is the…
Layo
  • 677
  • 6
  • 16
7
votes
0 answers

How do I nest app logs in request log and also tag it with an operation id?

When I use Google App Engine, I can: (A) nest app logs (e.g. the info log below) (B) see the summary of a request log in the top "collapsed" row (C) get tags with an operation id that I can click to easily filter the log stream by Is it possible…
6
votes
1 answer

Something like GROUP BY with Logs Explorer

I am trying to find out details about suspicious traffic on my website which is running on Google Cloud (Google App Engine with Java, to be more specific). One idea is to analyze which IP addresses are sending requests very often. In SQL I would do…
Marcus
  • 1,857
  • 4
  • 22
  • 44
6
votes
1 answer

Google Cloud logs: How to send error logs details to another channel like slack, email, or webhook API?

I want to send the error logs/warning logs automatically from GCP into slack, email, or Webhook API. Now I am using Google Cloud/Monitoring/Alerting -> create a policy. But it only sends the payload information, not including the error logs details…
6
votes
1 answer

Cloud Logging in Flutter

I want to use Cloud Logging in Flutter mobile app. Also, I will link the Cloud Logging with Firebase. Is there any way to help me to use Cloud Logging in Flutter?
6
votes
2 answers

How can I manually specify a X-Cloud-Trace-Context header value to and correlate and trace logs in separate Cloud Run requests?

I'm using Cloud Run and Cloud Tasks to do some async processing of webhooks. When I get a request to my Cloud Run service, I queue up a task in my Cloud Tasks queue and return a response from my service immediately. Cloud Tasks will then trigger my…
6
votes
0 answers

Stack Driver logging with SLF4J not logging properly in scala

I am using Logback with SLF4J for Stackdriver logging and I am following the example from Google Cloud. My application is written in Scala and running on Dataproc cluster on GCP. logback.xml have the following contents.
6
votes
4 answers

Tail a log using gloud logging read?

Is it not possible to watch the tail of a particular log on the terminal command line using gcloud logging read command? I'm looking for something akin to the well known tail -f invocation on standard linux. I can't find any documented parameter…
Dhiraj Gupta
  • 9,704
  • 8
  • 49
  • 54
6
votes
5 answers

Using Python to Query GCP Stackdriver logs

I am using Python3 to query Stackdriver for GCP logs. Unfortunately, the log entries that have important data are returned to me as "NoneType" instead of as a "dict" or a "str". The resulting "entry.payload" is type "None" and the "entry.payload_pb"…
1
2
3
41 42