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
4
votes
1 answer

Where is the documentation for Google Cloud Logging's inclusion/exclusion filters?

I'm trying to export logs from Google Cloud through a Pub/Sub topic. As part of the process, I have to create something called an "inclusion filter". The only documentation I can find on this filter is here:…
Throw Away Account
  • 2,593
  • 18
  • 21
4
votes
0 answers

How to use bunyan logging for 3rd-party libraries?

I'm using bunyan to send logs to Google Cloud Logger. Regular logs are not show up there. Or they do show up but as one-liners. If a regular consonle.log will be logging an object, then each property of this object will be displayed as a separated…
stkvtflw
  • 12,092
  • 26
  • 78
  • 155
4
votes
1 answer

Get GCP Logging Log Viewer to highlight custom labels

A great feature in debugging Google Cloud Functions calls is the highlighting of the functionName and the execution id (see photo). Is it possible to also get your own logs (generated by the python logging client) to show up highlighted?
4
votes
1 answer

unable to see any logs after updating cloud function

Suddenly I am not getting any logs except deployment logs for google cloud functions Till now it worked fine but, after updating the function I haven't seen any logs. So I have done some research and deleted the cloud functions logs file and also…
4
votes
2 answers

How do I compare a string field as a number in Google Stackdriver Logging advanced queries?

I tried jsonPayload.elapsed_ms > 5000 and I'm clearly getting a lexicographical comparison of the character "5" because I only see results that are "6", "7", "8", "9" (see final number per line, after the "200"): I…
4
votes
2 answers

Google Cloud Logging Authentication / permissions

I am using the Golang library cloud.google.com/go/logging and want to send runtime logging. Already have a GOOGLE_APPLICATION_CREDENTIALS .json file - and am using google storage and firebase - so I know the credentials are working. With logging,…
richp10
  • 820
  • 8
  • 20
4
votes
2 answers

How to find who deletes a table in the logs

I have a dataset ID, tables were created. Which were deleted. I need to check who deleted them and when.
4
votes
2 answers

How to logging with different severity levels in Google Cloud Functions

I had deployed Cloud Functions with runtime python37. My question is how to print or logging with different severity and same execution_id, which could be easy to filter by log level via Stackdriver Logging interface. By default, print will use the…
4
votes
2 answers

Stackdriver logging not showing up for GKE

I appear to be missing some configuration somewhere but have no idea where. My app (golang) is using stackdriver logging. When I run locally it works fine and my log messages show up in Stackdriver. When I run in GKE then my custom logger…
mornindew
  • 1,993
  • 6
  • 32
  • 54
4
votes
1 answer

Decoding protoPayload from Google Logging API

I want to read BigQuery log entries to do some analysis. But I can't seem to get the protoPayload.value decoded. I've tried messing around with the google-proto-files and protocol-buffers packages, but I think I'm missing something really obvious…
4
votes
2 answers

Node.js @google-cloud/logging-winston not working inside a GCE instance

I am using npm @google-cloud/logging-winston to send application log events to google stack-driver log sinks. Below is my code snippet and it works perfectly fine in my local macbook. When i try to run it inside a GCE instance (ubuntu 16.10 image…
4
votes
1 answer

How do I view and audit Dataflow actions like Create/Cancel Job?

I'm using Dataflow with a project with many users, and would like to be able to understand when jobs are created and by whom. Similarly, if a job is cancelled, I'd like to confirm the identity of the initiator of this action.
Sam McVeety
  • 3,194
  • 1
  • 15
  • 38
4
votes
2 answers

Cloud Logging Advanced Log Filters: Find HTTP Requests >= Duration

Google's Advanced Cloud Logging Filters seem incredibly powerful, but equally complex to use. How does one craft a logging query that finds all HTTP requests with a duration longer than 3 seconds, which also contains the text foo bar? I've read…
4
votes
3 answers

What are BigQuery audit logs supposed to produce?

I have been looking at the new BigQuery Logging feature in the Cloud Platform Console, but it seems a bit inconsistent in what is being logging. I can see some creates, deletes, inserts and queries. However, when I did a few queries and copy jobs…
4
votes
1 answer

Which logger should I use to get my data in Cloud Logging

I am running a PySpark job using Cloud Dataproc, and want to log info using the logging module of Python. The goal is to then push these logs to Cloud Logging. From this question, I learned that I can achieve this by adding a logfile to the fluentd…