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

Export BigQuery logging: which resource types to select (and what is the difference between them?)

I want to export relevant BigQuery (audit) logging to a BQ dataset. So I have to create a log sink for that. I found a blog that sets up the BQ logging only using bigquery_project or…
2
votes
2 answers

Have Log-Based Metric Automatically Determine Labels from JSON Payload of Filtered Logs

Background (skip to "The Problem" for end goal) Take an example endpoint /process-batch that processes a batch of items given a single request. Upon receiving that request, it logs the following line: {"endpoint_type": "process-batch", "batch_size":…
2
votes
2 answers

Pip install google-cloud-logging failed in docker

I try to search the answer in stackoverflow and try to find something in the github issues but nothing I found. Can anyone give me some tip to solve the problem? I get the following error when trying to install Google Cloud Logging by pip with…
madarame
  • 23
  • 2
2
votes
0 answers

Google Cloud : X-Cloud-Trace-Context different from app log traceId

I have a spring boot app that's deployed in google cloud and I face a rather odd problem. The X-Cloud-Trace-Context is set by google (load balancer I suppose) but the traceId of the app level logs have a different traceId (different from the one I…
2
votes
1 answer

Is it possible to display Airflow logs in GCP Logging?

GCP documentation distinguishes between two kinds of logs for Composer: Cloud Composer has the following Airflow logs: Airflow logs: These logs are associated with single DAG tasks. You can view the task logs in the Cloud Storage logs folder…
Tim
  • 7,075
  • 6
  • 29
  • 58
2
votes
1 answer

Prevent GCP Error Reporting from logging the nested stack trace from the middle of a log message

I have a block of code within a try/except block that throws/catches exceptions(psycopg2 in one case and a CRCError in another). The exception is logged using the standard library(sample code below). GCP error reporting is logging the caught…
2
votes
1 answer

Making GCP Load-balancer HTTP logs integrate with Cloud Trace (in GCP Logs Explorer)?

Cloud Trace and Cloud Logging integrate quite nicely in most cases, described in https://cloud.google.com/trace/docs/trace-log-integration Unfortunately, this doesn't seem to include the HTTP request logs generated by a Load Balancer when request…
2
votes
1 answer

gcloud logging with regular expression

I'm trying to use gcloud logging along with regular expression. My query works in the console but I can't get it going via the CLI. gcloud logging read "resource.type=gce_instance AND…
Ari
  • 5,301
  • 8
  • 46
  • 120
2
votes
1 answer

Google Tail log entries: on data event does not receive any message

I need to use Google Logging to get realtime log in my project (using Nodejs/express). I found the "Tail log entries" is good for me and I want to apply it to my project, but when I try to apply the sample code as in google doc…
2
votes
1 answer

Google CloudLogging with service account - PERMISSION_DENIED error

I'm trying to send logs from my Node.js app to GCP CloudLogging. I'm using nodejs-logging-bunyan. I followed the auth setup guide for a service account. I can see the file being loaded. The following command …
2
votes
0 answers

Filter logs in Google Cloud by when fields exist that match a pattern

We're using Google's security scanning and it makes queries with unique parameters on each scan. This causes new jsonPayload sub-fields to show up in our…
jwadsack
  • 5,708
  • 2
  • 40
  • 50
2
votes
2 answers

How To Generate GCP DNS Logs

I am new to GCP and am curious how to generate DNS Logs in the GCP Log Explorer. I am not familiar with GCP and have seen their website for DNS Logging and understand that one has to create the policy. But after configuring the DNS policy, what type…
2
votes
1 answer

TypeError: Logging is not a constructor

I'm trying to import the Google Cloud Logging using the same way specified in https://github.com/googleapis/nodejs-logging/#quickstart But for some reason, I am getting an error "TypeError: Logging is not a constructor". I even tried adding the…
2
votes
1 answer

How can i correctly log a URL within Cloud Logging without an ampersand getting converted to unicode representation?

Not sure whether this I should have tagged this google-cloud-logging or google-workflows as I'm not sure whether the problem lies, so I tagged both. I have a Google Cloud Workflow (the workflow definition is provided below) that executes a BigQuery…
jamiet
  • 10,501
  • 14
  • 80
  • 159
2
votes
0 answers

Customize logName in GKE

Recently had to upgrade our GKE logging settings to Cloud Operations for GKE (per https://cloud.google.com/stackdriver/docs/solutions/gke/migration#what-is-changing). From the document, an interesting change in the logName field occurred, where it…