Latency monitoring with Stackdriver

362 views
Skip to first unread message

Christopher Bourez

unread,
Jul 27, 2016, 11:01:04 AM7/27/16
to gce-discussion
I've set up Stackdriver, and was able to log latencies with gcloud python library, as well as the instance on which the latency occur.

    logger.log_struct({"latency":  latency, 'host' : host})

Since speed is very important to our UX, we'd like to monitor and decrease the latency of our technology. 

That's why I'm trying to display a graph with the average latency of the technology in a Stackdriver dashboard.

I've created a log-based metric, but this metric sounds more to count the number of logs than doing an average.

Though, the dashboard already display other latencies (such network latency, or request latency) so I think it sounds possible, isnt it ?

George (Google Cloud Support)

unread,
Jul 28, 2016, 3:55:02 PM7/28/16
to gce-discussion
Hello Christopher,

As you mentioned in your message, Logs-based Metrics count the number of log entries that match given filters. Did you have the chance to go through the Analysis Reports documentation in Stackdriver which allows you to see the overall of the latency for requests to your application of for a subset of the requests.

I hope this helps.

Sincerely,
George

Christopher Bourez

unread,
Aug 2, 2016, 4:52:38 AM8/2/16
to gce-discussion
Inserting custom latency metrics enable to measure other timings than request latencies, for example subparts of the request.

By the way, I can't get it work because it is a demo : 

The request will not produce a useful report because it had less than 100 traces. Create a new report with a longer time range or less-restrictive filter.
Reply all
Reply to author
Forward
0 new messages