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

How to log a error to Stackdriver Error Reporting via Stackdriver Logging

I am trying to log an error to Stackdriver Error Reporting in Go. On the first page of the Error Reporting, there is stated "Reporting errors from your application can be achieved by logging application errors to Google Stackdriver Logging or..."…
3
votes
2 answers

Provide regex for "resource" in protopayload

I am trying to filter logs based on resource mapping using "protoPayload.resource" property. It works fine if I specify the exact resource name.…
akgaur
  • 755
  • 1
  • 6
  • 21
3
votes
3 answers

Creating nested log entries in Cloud Logging Viewer from API?

I'd like to publish logs from a custom app running on a compute engine to the cloud logging API. However, I'd like to get nested logs (like AppEngine loglines). Is this possible through the api?
aloo
  • 5,331
  • 7
  • 55
  • 94
2
votes
2 answers

How to get notified when there is an "ERROR" log in Google Cloud Logging for each running Cloud Function?

I would simply like to know if it's possible and how to get notified when my Cloud Function is logging an entry using logging.error in python. The field actually appears as : "ERROR:root:the custom log" I have checked about Alert policies but i…
2
votes
0 answers

Is it possible to extend format of GCP HTTP(S) Load Balancing logging?

We have logging enabled on our HTTP(S) Load Balancing for backend services, as described here. It contains useful and structured data about http requests made: { "requestMethod": string, "requestUrl": string, "requestSize": string, "status":…
raina77ow
  • 103,633
  • 15
  • 192
  • 229
2
votes
1 answer

Google Cloud Logging assigns ERROR severity to all Python logging.info calls

It's the first time I use Google Cloud Platform, so please be understanding! I've built a scheduled workflow that simply runs a Batch job. The job runs Python code and uses the standard logging library for logging. When the job is executed, I can…
2
votes
1 answer

cloud run service log's summary is not textpayload

I am trying to log within a cloud run service and all log summaries show up POST 0 B null ms curl/7.68.0 http://example.a.run.app/ which is not really informative and I need to expand each log to see what it is. My code is the following and I am…
Dokook Choe
  • 266
  • 2
  • 9
2
votes
1 answer

Alert on Absent Data for Combined Metric in GCP Monitoring

I have created an alert policy in GCP MOnitoring which will notify me when a certain kind of log message stops appearing (a dead man's switch). I have create a logs-based metric with a label, "client", which I use to group the metric and get a…
2
votes
1 answer

How can I get requirements.txt to work for Google App Engine?

It appears the current versions of google-cloud-logging and google-cloud-storage are incompatible. How on earth does Google think it's okay to have a "platform" where you can't use the latest versions of things together? If my requirements.txt…
2
votes
2 answers

why logs are not visible for Dataflow job pipeline written in java sdk at GCP?

I have enabled the logging API by below command : gcloud services enable logging I have followed the steps: https://cloud.google.com/dataflow/docs/quickstarts/create-pipeline-java to create the pipeline. I am using slf4j logger lib for logging the…
2
votes
1 answer

Dataflow jobs failing and showing no logs

I created pipelines in Dataflow using the standard template JDBC to BigQuery and there are a few jobs that are unexpectedly failing and not showing any logs. The thing is, when a job fails because of the resources, the job needed more vCPUs than was…
Luiz
  • 229
  • 1
  • 9
2
votes
1 answer

Filter Empty JsonPayload from GCP logs

We have a service which logs empty line. However, in GCP logs it is coming as empty jsonPayload insertId: jksj3z7vr05sj jsonPayload: { } I want to exclude such logs. Tried following queries individully jsonPayload.field = NULL_VALUE NOT…
kartikmaji
  • 946
  • 7
  • 22
2
votes
1 answer

Can I configure GCP ops-agent to send logs to other project or publish logs to Pub/Sub topic?

The goal of this context is to achieve a centralized logs storage. I want all of the logs across different projects to be stored under the same project. By far of my experience on the ops-agent, it always sends logs to the corresponding project's…
2
votes
0 answers

Can the relevant log entries be included in Alert emails from Google Cloud Monitoring?

I have a Google Cloud Monitoring custom Metric that measures "errors of interest" in Google Cloud logs for my project, but the Alert emails it generates (threshold > 0) have only generic information, and nothing that's actually specific to the log…
RashaMatt
  • 247
  • 1
  • 3
  • 11
2
votes
1 answer

GCP Cloud monitoring for Container Optimized OS

I'm using GCP compute Engine with Container Optimized OS. I enabled Logging and Monitoring on that instance. Logging and Monitoring has write permissions But it always show Not applicable for agents in monitoring dashboard. If I SSH in my…