Questions tagged [stackdriver]

Monitoring, logging, and diagnostics for applications on Google Cloud Platform and AWS.

Part of Google Cloud Platform Google Stackdriver includes monitoring, logging, & diagnostics like Stackdriver Monitoring (aka Google Cloud Monitoring).


Docs:

  • Monitoring - collects metrics, events, and metadata from GCP/AWS/Anthos or custom metrics. Generates insights via dashboarts, charts and alert.
  • Logging - allows to store, search, analyze, monitor, and alert on log data and events from GCP or AWS
  • Error Reporting - aggregates and displays errors produced in users running cloud services.
  • APM
    • Debugger - lets user inspect the state of an application, at any code location, without stopping or slowing down the running app
    • Trace - a distributed tracing system for Google Cloud Platform that collects latency data
    • Profiler - a statistical, low-overhead profiler that continuously gathers CPU usage and memory-allocation information from your production applications
966 questions
7
votes
3 answers

Log 'jsonPayload' in Firebase Cloud Functions

TL;DR; Does anyone know if it's possible to use console.log in a Firebase/Google Cloud Function to log entries to Stack Driver using the jsonPayload property so my logs are searchable (currently anything I pass to console.log gets stringified into…
dan.jones
  • 147
  • 2
  • 10
7
votes
4 answers

Stackdriver error reporting with gcloud

I'm retying to use the gcloud cli to send events to StackDriver Error Reporting. The (very limited) documentation is here: https://cloud.google.com/sdk/gcloud/reference/beta/error-reporting/events/report Regardless of what I send as a message I seem…
7
votes
1 answer

Can I specify a different email for the StackDriver Error Reporting Notification

We tried to use the StackDriver Error Reporting notification features, but it seems that for any Project, when we turn on the notification, it always sent to the email associated with the developer account that we logged in. How can we change it to…
Rui Yang
  • 657
  • 1
  • 6
  • 16
7
votes
2 answers

Writing to custom timeseries with the Google Cloud Monitoring v3 api

Google has warned that the v2 monitoring api is now deprecated and will be going away soon. However, migrating to v3 is proving to be a bit difficult. I'm trying to write a custom metric and am getting the following error responses: Services >…
6
votes
3 answers

gcp monitoring "Any time series violates" vs "All time series violate"

What's the difference between the two options "Any time series violates" and "All time series violate"? I can imagine what would the former one do easily, but I have no idea what would the latter one do. All time series? how long is its range? and…
6
votes
3 answers

Firebase Functions logging objects takes up a lot of space

We have our firebase function console.log() an object near the end of the execution. In the past it always clumped the entire object into one single dropdown in the Firebase Functions Log interface but now it seems to put each key of the object in…
6
votes
1 answer

How do I correlate request logs in Cloud Run?

I am using self structured JSON payloads for logging from my Node.js/Express based Cloud Run service and I am unable to get logs from the same request to correlate using the trace method. The documentation says: Container logs are not automatically…
Binarytales
  • 9,468
  • 9
  • 32
  • 38
6
votes
2 answers

Is it possible to monitor the number of pod-replicas in a Kubernetes cluster over time with StackDriver?

I have added several Horizontal Pod Autoscalers (HPAs) to a Kubernetes cluster. I want to monitor the number of replicas of each pod over time. Does StackDriver have an option to monitor the number of replicas of each pod over time? When creating a…
MAcabot
  • 524
  • 5
  • 14
6
votes
1 answer

How to log Stackdriver log messages correlated by trace id using stdout Go 1.11

I'm using Google App Engine Standard Environment with the Go 1.11 runtime. The documentation for Go 1.11 says "Write your application logs using stdout for output and stderr for errors". The migration from Go 1.9 guide also suggests not calling the…
Andy Fusniak
  • 1,548
  • 1
  • 17
  • 28
6
votes
1 answer

Stackdriver Error reporting for Ruby, running on GKE

Which steps are required to collect errors from a Rails app running on GKE? I have added the stackdriver gem to my Rails app and I have created a custom role with the errorreporting.errorEvents.create permission. That role is given to the Compute…
6
votes
1 answer

Stackdriver logging from node with stdout/stderr

On Google Cloud, when using a GAE or a cloud function in nodejs, we can log to stackdriver directly via stdout, as they explain here as follows: Note: Logs written to stdout and stderr are automatically sent to Stackdriver Logging for you, without…
6
votes
1 answer

Stackdriver Log Agent - Log Level Irrelevant with Google Cloud Logging Driver for Docker

TL,DR; Log levels are ignored when making a Stackdriver logging API call using using a CloudLoggingHandler from a Docker container using the Google Cloud Logging driver. Detail; The recommended way to get logs from a Docker container running on…
Jack
  • 10,313
  • 15
  • 75
  • 118
6
votes
5 answers

Using Python to Query GCP Stackdriver logs

I am using Python3 to query Stackdriver for GCP logs. Unfortunately, the log entries that have important data are returned to me as "NoneType" instead of as a "dict" or a "str". The resulting "entry.payload" is type "None" and the "entry.payload_pb"…
6
votes
0 answers

perform arithmetic on stack driver metrics

These aren't custom metrics I'm trying to add just the existing GCP metrics. How do I add 2 metrics together in a Stack driver time series? I have two different metrics and I want to sum them so I see a single line- also I'd like to be able to alert…
6
votes
1 answer

Arithmetic operations for Stackdriver monitoring charts

I'm trying to setup a Stackdriver dashboard for my custom metrics that my services provide. In particular I'm starting with general custom/grpc/time_ms metric that is a gauge and have status label on it. I'd love to be able to set up a chart and…