stackdriver

How to group related request log entries GAE python 3.7 standard env

戏子无情 提交于 2020-05-26 14:26:55
问题 I'm using Google App Engine python 3.7 standard and i'm trying to group related request log entries. According to the Writing Application Logs documentation, I should: Set the trace identifier in the LogEntry trace field of your app log entries. The expected format is projects/[PROJECT_ID]/traces/[TRACE_ID] Where/How should use LogEntry? The Stackdriver Logging documentation doesn't show how it's possible. Am I missing something? Code examples would be much appreciated. [UPDATE] Following

stackdriver-metadata-agent-cluster-level gets OOMKilled

情到浓时终转凉″ 提交于 2020-05-25 04:33:25
问题 I updated a GKE cluster from 1.13 to 1.15.9-gke.12. In the process I switched from legacy logging to Stackdriver Kubernetes Engine Monitoring. Now I have the problem that the stackdriver-metadata-agent-cluster-level pod keeps restarting because it gets OOMKilled . The memory seems to be just fine though. The logs also look just fine (same as the logs of a newly created cluster): I0305 08:32:33.436613 1 log_spam.go:42] Command line arguments: I0305 08:32:33.436726 1 log_spam.go:44] argv[0]: '

Find logs between timestamps using stackdriver CLI

被刻印的时光 ゝ 提交于 2020-02-24 05:13:21
问题 I need to find logs between two timestamps using stackdriver CLI. I used the below command. gcloud beta logging read "timestamp>=\"2017-02-19T00:00:00Z\" AND timestamp<\"2017-03-14T00:00:00Z\"" But its giving me the error: The filename, directory name, or volume label syntax is incorrect. Here is my gcloud version details 回答1: I'm a product manager with Stackdriver logging. We've tested the command and it seemed to work fine. The issue may be with Windows command shell? One guess is that

Does StackDriver support Syslog protocol?

五迷三道 提交于 2020-02-24 05:13:04
问题 Does StackDriver support Syslog protocol? if so, can someone share an example? For context, I'm looking to write logging entries to StackDriver using Syslog protocol. I've looked through the documentation and haven't a way to do so. So, far the closes approach seems to be using StackDriver agent. However, I want to leverage API Gateways such as Apigee, which support Syslog protocol through Message Logging Policy. I know that REST API could be leveraged to send these entries. However, I'm

Find logs between timestamps using stackdriver CLI

笑着哭i 提交于 2020-02-24 05:11:39
问题 I need to find logs between two timestamps using stackdriver CLI. I used the below command. gcloud beta logging read "timestamp>=\"2017-02-19T00:00:00Z\" AND timestamp<\"2017-03-14T00:00:00Z\"" But its giving me the error: The filename, directory name, or volume label syntax is incorrect. Here is my gcloud version details 回答1: I'm a product manager with Stackdriver logging. We've tested the command and it seemed to work fine. The issue may be with Windows command shell? One guess is that

Stackdriver-trace on Google Cloud Run failing, while working fine on localhost

ⅰ亾dé卋堺 提交于 2020-01-24 21:01:47
问题 I have a node server running on Google Cloud Run. Now I want to enable stackdriver tracing. When I run the service locally, I am able to get the traces in the GCP. However, when I run the service as Google Cloud Run, I am getting an an error: "@google-cloud/trace-agent ERROR TraceWriter#publish: Received error with status code 403 while publishing traces to cloudtrace.googleapis.com: Error: The request is missing a valid API key." I made sure that the service account has tracing agent role.

How to tracing a request through a chain of microservices end-to-end?

喜夏-厌秋 提交于 2020-01-13 17:10:13
问题 I am using OpenCensus in Go to push tracing data to Stackdriver for calls involving a chain of 2 or more micro services and I noticed that I get many traces which contain spans only for certain services but not the entire end to end call. At the moment I attribute this to the fact that not all calls are traced (only a certain sample) and each service decides whether to trace its current span or not. Is this the way it is intended to work? Is there any way to make sure when a trace is sampled,

Google App Engine why some Logs are not getting shown?

南笙酒味 提交于 2020-01-13 10:57:32
问题 In Google App Engine Flexible environment many Logs are skipping, and not getting shown in the Logging console, and it is happening always, I am checking it on Stackdriver Logging section on Google Cloud dashboard, the Logs I am showing using console.log() are getting skipped but mongoose query logs are getting printed. Also, now currently sometimes my logs console.logs are getting shown but sometimes not, but previously they were getting shown every time. Why now is it not working every time

How to export previous logs in Stackdriver

孤人 提交于 2020-01-12 14:07:49
问题 I have a log in Stackdriver that logs every request goes into my api and failed, and I want to write a script to count on the number of times each error message appears. The problem is, the export feature in Stackdriver V2 only allow me to sink upcoming error messages, but I only care about the logs entries that already lives in the log. Is there a way to download the complete log from Stackdriver? 回答1: You can now do this from the gcloud CLI tool, with gcloud logging read : https://cloud

How to export previous logs in Stackdriver

狂风中的少年 提交于 2020-01-12 14:06:08
问题 I have a log in Stackdriver that logs every request goes into my api and failed, and I want to write a script to count on the number of times each error message appears. The problem is, the export feature in Stackdriver V2 only allow me to sink upcoming error messages, but I only care about the logs entries that already lives in the log. Is there a way to download the complete log from Stackdriver? 回答1: You can now do this from the gcloud CLI tool, with gcloud logging read : https://cloud