I've created a log based metric using logs stored in Google Cloud Logs based on HTTP response duration. I'd like to a graph which shows stacked area for 50th, 95th, and 99th percentile.
I've read the Google Cloud Monitoring docs on various charts and while I can get any single metric to display as a percentile; I can't seem to have all three percentiles render stacked at the same time.
What is possible is adding the 3 percentiles to a chart as 3 separate metrics with different alignment which seems to work well for regular line charts but if I change the chart type to stacked area then each percentile shades its area independentally of the other percentile lines.
I can also get all three lines to show up if I select a "Heatmap" chart with sum
or delta
alignment and click 'hide heatmap' button on the chart in Metrics explorer.
This is a very common way to visualize distribution percentiles so I think it should be possible (may by editing the query direction to include multiple percentiles) so any help is appreciated.
Metric Details:
Type: Distribution
Filter: logName = "projects/lv-server-1/logs/tail-logs" AND jsonPayload.httpRequest:*
Units: s
Field name: jsonPayload.duration
Labels:
- "status, INTEGER, jsonPayload.status"
- 'content_type, STRING,jsonPayload.resp_headers."Content-Type"'
Histogram Buckets:
- Type: Exponential
- Number of Buckets: 64
- Exponetnial growth Factor: 2.0
- Linear scale: .00005