stackdriver

Is there any way to trace cloud sql calls in app engine?

别来无恙 提交于 2019-12-22 12:23:40
问题 I am trying to optimise performance in an app-engine Java app using cloud sql gen2. It would help a lot if I could trace calls to cloud sql just like I can trace RPC calls to the datastore in the stackdriver trace details. Is this somehow possible, or maybe planned? Or is the only alternative to do log.info() calls with milliseconds? Or is there some other way to add event markers for tracing / profiling? 回答1: There's now Google Cloud Trace for JDBC for exactly this use case. Google Cloud

how to create alert per error in stackdriver

倖福魔咒の 提交于 2019-12-22 08:51:12
问题 Having created log-based metrics in cloud console, I then want to create alerts so that every time there is a new matching log entry, the alert triggers. In trying to create a suitable metric, the most likely looking options seem to be threshold or rate of change, but I don't think either will work for a policy of 1 log message => 1 alert. Help appreciated. 回答1: Yes, today the only way to alert on the log message is to create a threshold condition on the log metric with a very small threshold

how to create alert per error in stackdriver

拜拜、爱过 提交于 2019-12-22 08:50:11
问题 Having created log-based metrics in cloud console, I then want to create alerts so that every time there is a new matching log entry, the alert triggers. In trying to create a suitable metric, the most likely looking options seem to be threshold or rate of change, but I don't think either will work for a policy of 1 log message => 1 alert. Help appreciated. 回答1: Yes, today the only way to alert on the log message is to create a threshold condition on the log metric with a very small threshold

Stackdriver Trace with Google Cloud Run

℡╲_俬逩灬. 提交于 2019-12-21 19:55:21
问题 I have been diving into a Stackdriver Trace integration on Google Cloud Run. I can get it to work with the agent, but I am bothered by a few questions. Given that The Stackdriver agent aggregates traces in a small buffer and sends them periodically. CPU access is restricted when a Cloud Run service is not handling a request. There is no shutdown hook for Cloud Run services; you can't clear the buffer before shutdown: the container just gets a SIGKILL. This is a signal you can't catch from

Google container engine logging to Stackdriver Error Reporting

和自甴很熟 提交于 2019-12-20 06:12:28
问题 I'm currently trying to log errors to Stackdriver Error Reporting from Google Container Engine. I'm using the built-in fluentd-based Stackdriver Logging agent from GKE which works great. However, when I log an error according to the specification(https://cloud.google.com/error-reporting/docs/formatting-error-messages), I do not see it appear in Stackdriver Error Reporting The payload I see in Stackdriver Logging is { insertId: "xatjb4fltv246" jsonPayload: { stream: "event" message: "path was

GCP Stackdriver Logs-Based Metrics for custom payload value

感情迁移 提交于 2019-12-20 03:54:14
问题 Already created my filters with a specific value from the jsonPayload. I want to create a metric which plots the values of Process_time. Can anyone please help, how to create such metrics? 回答1: Click on the "CREATE METRIC" button above the filter box and use jsonPayload.process_time as the Field name The other attributes are generally described in the instructions on https://cloud.google.com/logging/docs/logs-based-metrics/distribution-metrics 来源: https://stackoverflow.com/questions/56821181

Setup “Stackdriver Kubernetes Monitoring” for AWS

拈花ヽ惹草 提交于 2019-12-14 01:40:26
问题 Google Cloud Platform announced "Stackdriver Kubernetes Monitoring" at Kubecon 2018. It looks awesome. I am an AWS user running a few Kubernetes clusters and immediately had envy, until I saw that it also supported AWS and "on prem". Stackdriver Kubernetes Engine Monitoring This is where I am getting a bit lost. I cannot find any documentation for helping me deploy the agents onto my Kubernetes clusters. The closest example I could find was here: Manual installation of Stackdriver support,

Log 'jsonPayload' in Firebase Cloud Functions

a 夏天 提交于 2019-12-13 14:23:48
问题 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 textPayload ). I have a multi-module project with some code running on Firebase Cloud Functions, and some running in other environments like Google Compute Engine. Simplifying things a little, I essentially have a 'core' module, and then I deploy

Tracing second generation java app engine

穿精又带淫゛_ 提交于 2019-12-13 03:29:04
问题 i'm trying to get some custom tracing and Firestore tracing added to a second generation app engine java app. Out of the box i can already see my WebServlets being called and calls to the tasks client library in my cloud console. But adding new traces is not working and also i see no traces about firestore. I tried adding new traces as according to the google and opencencus documentation try (Scope scope = tracer.spanBuilder("myTrace").startScopedSpan()) { // do some http requests } When i

GCP and Spring logback. Severity is always info

旧巷老猫 提交于 2019-12-13 00:27:11
问题 When logging errors to stackdriver, every message is logged as INFO, even when using log.error or log.warn, etc., but the payload is correct. I'd like to be able to filter by severity and get email on error. I'm using Spring Boot and Logback. The app has been deployed on a Kubernetes Cluster on GCP. Here is my logback-spring.xml <configuration> <include resource="org/springframework/cloud/gcp/autoconfigure/logging/logback-appender.xml" /> <appender name="STDOUT" class="ch.qos.logback.core