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

Getting "/dev/log" in the "gcloud app logs tail" stream

In the browser cloud console for my Google App Engine app, I can choose to see the logs for /dev/log and stderr which gives me all of the log entries that I'm expecting to see. However, when I use the command line gcloud app logs tail to stream the…
Kenny Wyland
  • 20,844
  • 26
  • 117
  • 229
2
votes
1 answer

from google.cloud.logging_v2 import types ImportError: cannot import name types

I'm working on a small app running on GAE. When I deploy my application or try and use virtualenv (per the docs), I see the following in the logs in Cloud Platform (they're the same locally, too) when I try and access the app: File…
chicjean
  • 67
  • 6
2
votes
2 answers

Stackdriver logging in a Rails app in GKE is not working

Ruby 2.3.6, Rails 4.2.6, Stackdriver 0.15.0 Following the directions at https://cloud.google.com/logging/docs/setup/ruby, I've added the stackdriver gem to Gemfile. From what I can tell, I shouldn't need to do anything else. However, I'm not seeing…
2
votes
1 answer

Google Cloud logging driver for docker doesn't collect logs

I'm running a Docker container with a Python application that writes logs to the stdout with the Python standard logging lib. The container is not hosted in any Google Cloud product but on my own machine. I configured docker to use the gcplogs…
Layo
  • 677
  • 6
  • 16
2
votes
4 answers

I want to fetch logs from google cloud, with all the attributes, in the exact JSON format using python

I am using Client Library. for entry in logging_client.list_entries(order_by=DESCENDING, filter_=FILTER, page_size=1): timestamp = entry.timestamp.isoformat() print('****{}'.format(entry.payload_pb)) print (entry.payload_pb) …
2
votes
1 answer

How to nest LogEntries in GCP Stackdriver logging UI?

Using the GCP Logging Client or API terminology, how does one nest log entries as shown in this image?
Andrey Fedorov
  • 9,148
  • 20
  • 67
  • 99
2
votes
2 answers

Setting Google Cloud Platform Log sink to a specific folder within a bucket

I have created five separate log export sinks within Google Cloud Stackdriver. Currently they are all set to the same bucket (my-bucket) with the destination: storage.googleapis.com/my-bucket The bucket (my-bucket) has the following 5 folders: iam,…
Erik M
  • 23
  • 3
2
votes
1 answer

Parse Stackdriver LogEntry JSON in Dataflow pipeline

I'm building a Dataflow pipeline to process Stackdriver logs, the data are read from Pub/Sub and results written into BigQuery. When I read from Pub/Sub I get JSON strings of LogEntry objects but what I'm really interested in is protoPayload.line…
2
votes
1 answer

A way to perform math operations on a logging metric field in Stackdriver?

I have created a log-based metric on Google Cloud against an AppEngine log. The metric scans for a specific URL and pulls out a field from that URL. For example: http://www.example.com/page.html?type=a http://www.example.com/page.html?type=b In…
A Sears
  • 427
  • 2
  • 10
2
votes
2 answers

nodejs writing protopayload in google-cloud/logging

How do we pass a protopayload union label using google-cloud/logging package in NodeJS? So far i am able to write textPayload and jsonPayload in the logs. Tried creating a protocol buffer using google-protobuf and also protobufjs and even tried…
rajat12a
  • 379
  • 1
  • 5
  • 17
2
votes
2 answers

Google Cloud Logs not exporting to storage

I'm trying to set up a sink that will export a certain set of Google Cloud Platform logs to a Google Cloud Storage bucket but can't get it to work and the documentation doesn't seem to match what's happening on the GCP console. Steps (all using the…
2
votes
0 answers

Exported App Engine logs in BigQuery has missing fields

For App Engine (Python, Standard environment), I have created a log-export (v2) in the same project as the app. Destination of the sink is a dataset in Google BigQuery. I can perform some simple queries in BigQuery: SELECT severity, …
Ani
  • 1,377
  • 1
  • 18
  • 29
2
votes
1 answer

Google Stackdriver does not show trace

Previously when an error occurred in my application I could find a trace of the entire code to where it happened ( file, line number ). In the Google Cloud console. Right now I only receive a request ID and a timestamp, with no indication of a trace…
2
votes
0 answers

fluentd-cloud-logging to parse GKE container log using glog

In our pod, the log output is using the glog utils. but fluentd-cloud-logging does not seem to understand the glog format, it ignores the tag from glog log line about the verbosity and severity, so when viewing those logs in cloud log viewer, they…
2
votes
3 answers

How to map Google Cloud Dataflow System.err writes to warning level Google Cloud logging events?

I am seeing that writes to System.err map to an Error level logging event in GCP Logging. Is there any way to map these to a different logging level, such as Warning level? In our code we always write to a SLF4J Logger but we are using 3rd party…