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

Retrieve Google Dataflow user defined labels in Google Monitoring & Logging

I'm running a Dataflow job using the gcloud command with the --parameters labels='{"my_label":"my_value"}' parameter in order to set custom labels (which I can see in the Job Info panel in the UI). But unfortunately, I'm not able to retrieve this…
2
votes
1 answer

Getting DataProc output in GCP Logging

I have a DataProc job that outputs some logs during the execution. I can see those logs in the Job output. My cluster is created according to the documentation with such…
dr11
  • 5,166
  • 11
  • 35
  • 77
2
votes
1 answer

GCP Logs-Based Monitoring: Trigger an alert when no logs are received

I have an application that I'm setting up logs-based monitoring for. The application will log whenever it completes a certain task. I want to ensure that the application completes this at least once every 6 hours. I have tried to replicate this…
2
votes
2 answers

How to display total dataproc job by status in cloud monitoring/stackdriver?

There should be succeeded/failed/pending status in Dataproc job, of course I could see that in Jobs section under Dataproc on Cloud Console. But, how to visualize all of this status in cloud monitoring/stackdriver? Already tried scorecard chart and…
2
votes
1 answer

Cloud Run (managed) Service is throwing "PERMISSION_DENIED: The caller does not have permission" when using Cloud Logging

I have a running user-service managed Cloud Run Service. It is written in Kotlin and Spring Boot and I added the cloud logging library to it and added the logback.xml configuration neccessary. A short prove: // build.gradle.kts …
xetra11
  • 7,671
  • 14
  • 84
  • 159
2
votes
1 answer

Funny Characters Before and at End of Logs with Google Cloud Winston Logging (Nodejs)

I am using the google-cloud/logging-winston nodejs package for logging, and I created my custom formatter for output this way: const winston = require('winston'); const { LoggingWinston } = require('@google-cloud/logging-winston'); const { format }…
2
votes
0 answers

Setting up Google App Engine cron job logs

I'm wondering how to set up logging for Google App Engine cron jobs. I haven't found any information about this specific topic in the App Engine documentation. There's a page https://console.cloud.google.com/appengine/cronjobs in GCP. Every cron job…
2
votes
0 answers

Google Cloud Run logs written to /var/log not picked up

I am trying to set up logging for a service in Google Cloud Run. The service writes logs to /var/log/logfile.log, which is one of the options described in the google logging docs. That document says logs written to /var/log will automatically be…
2
votes
0 answers

Writing structured json log messages from Python Google Cloud Function

I've tried using this example code from the Cloud Functions docs: # PROJECT = 'The project ID of your Cloud Run service'; global_log_fields = {} trace_header = request.headers.get('X-Cloud-Trace-Context') trace =…
Coquelicot
  • 8,775
  • 6
  • 33
  • 37
2
votes
1 answer

How to suppress exit message for google cloud logging

Google cloud logging is printing out this message when my (python) program exits: Program shutting down, attempting to send 1 queued log entries to Stackdriver Logging... Waiting up to 5 seconds. Sent all pending logs. I would like to suppress…
2
votes
1 answer

Google Cloud Platform Log Viewer logs truncate jsonPayload message for error log

The logs I'm viewing in the Log Viewer are truncating the "message" part of the payload, but the "exception" part of the payload doesn't have a limit and shows the entire stacktrace. These logs are for exceptions caught in my service running in…
2
votes
0 answers

Google Cloud Logging for GAE Java 11 standard runtime - Logs are not correlated

I'm preparing to migrate from GAE Java 8 Standard Runtime to Java 11 Standard Runtime. I have been using java.util.logging. I understand that with Java 11 runtime, logs are no longer correlated automatically. With Java 8 Runtime, all the log…
DFB
  • 861
  • 10
  • 25
2
votes
1 answer

No logs are created in Stackdriver logging

In my google app script, I have: Logger.log("test"); and I even tried console.log("test"); But neither is printed to the stackdriver log, even after I've set the project id to a Google Cloud Project id. The screen shows:
2
votes
2 answers

Logs not showing in Google Cloud Logging UI

I'm trying to set up sending my application logs to Google Cloud Logging, but no matter what I try, the logs are not visible in the Log Viewer. I tried: using the Java Logging Logback appender directly, following all of the steps in the…
2
votes
1 answer

Print statements on python3 no longer logging on Google Cloud Platform

I am using python 3.5 and until a bit ago all print() statement in python3 logged to the logs viewer https://console.cloud.google.com/logs just fine. However, it suddenly stopped. Does anyone have a quick fix? Also, I did research and I found…