mirror of
https://github.com/nomadkaraoke/karaoke-gen.git
synced 2026-11-20 13:07:57 +09:00
352 lines
11 KiB
JSON
352 lines
11 KiB
JSON
{
|
|
"displayName": "Karaoke Backend Overview",
|
|
"mosaicLayout": {
|
|
"columns": 12,
|
|
"tiles": [
|
|
{
|
|
"xPos": 0,
|
|
"yPos": 0,
|
|
"width": 4,
|
|
"height": 4,
|
|
"widget": {
|
|
"title": "Jobs Created (Last Hour)",
|
|
"scorecard": {
|
|
"timeSeriesQuery": {
|
|
"timeSeriesFilter": {
|
|
"filter": "resource.type=\"cloud_run_revision\" AND metric.type=\"logging.googleapis.com/log_entry_count\"",
|
|
"aggregation": {
|
|
"alignmentPeriod": "3600s",
|
|
"perSeriesAligner": "ALIGN_SUM",
|
|
"crossSeriesReducer": "REDUCE_SUM"
|
|
}
|
|
}
|
|
},
|
|
"sparkChartView": {
|
|
"sparkChartType": "SPARK_LINE"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"xPos": 4,
|
|
"yPos": 0,
|
|
"width": 4,
|
|
"height": 4,
|
|
"widget": {
|
|
"title": "Cloud Run Request Count",
|
|
"scorecard": {
|
|
"timeSeriesQuery": {
|
|
"timeSeriesFilter": {
|
|
"filter": "resource.type=\"cloud_run_revision\" AND resource.labels.service_name=\"karaoke-backend\" AND metric.type=\"run.googleapis.com/request_count\"",
|
|
"aggregation": {
|
|
"alignmentPeriod": "3600s",
|
|
"perSeriesAligner": "ALIGN_RATE",
|
|
"crossSeriesReducer": "REDUCE_SUM"
|
|
}
|
|
}
|
|
},
|
|
"sparkChartView": {
|
|
"sparkChartType": "SPARK_LINE"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"xPos": 8,
|
|
"yPos": 0,
|
|
"width": 4,
|
|
"height": 4,
|
|
"widget": {
|
|
"title": "Cloud Run Error Rate",
|
|
"scorecard": {
|
|
"timeSeriesQuery": {
|
|
"timeSeriesFilter": {
|
|
"filter": "resource.type=\"cloud_run_revision\" AND resource.labels.service_name=\"karaoke-backend\" AND metric.type=\"run.googleapis.com/request_count\" AND metric.labels.response_code_class!=\"2xx\"",
|
|
"aggregation": {
|
|
"alignmentPeriod": "3600s",
|
|
"perSeriesAligner": "ALIGN_RATE",
|
|
"crossSeriesReducer": "REDUCE_SUM"
|
|
}
|
|
}
|
|
},
|
|
"sparkChartView": {
|
|
"sparkChartType": "SPARK_LINE"
|
|
},
|
|
"thresholds": [
|
|
{
|
|
"value": 0.05,
|
|
"color": "YELLOW",
|
|
"direction": "ABOVE"
|
|
},
|
|
{
|
|
"value": 0.1,
|
|
"color": "RED",
|
|
"direction": "ABOVE"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"xPos": 0,
|
|
"yPos": 4,
|
|
"width": 6,
|
|
"height": 4,
|
|
"widget": {
|
|
"title": "Cloud Run Request Latency (p95)",
|
|
"xyChart": {
|
|
"dataSets": [
|
|
{
|
|
"timeSeriesQuery": {
|
|
"timeSeriesFilter": {
|
|
"filter": "resource.type=\"cloud_run_revision\" AND resource.labels.service_name=\"karaoke-backend\" AND metric.type=\"run.googleapis.com/request_latencies\"",
|
|
"aggregation": {
|
|
"alignmentPeriod": "60s",
|
|
"perSeriesAligner": "ALIGN_PERCENTILE_95",
|
|
"crossSeriesReducer": "REDUCE_MEAN"
|
|
}
|
|
}
|
|
},
|
|
"plotType": "LINE",
|
|
"legendTemplate": "p95 latency"
|
|
}
|
|
],
|
|
"yAxis": {
|
|
"label": "Latency (ms)",
|
|
"scale": "LINEAR"
|
|
},
|
|
"chartOptions": {
|
|
"mode": "COLOR"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"xPos": 6,
|
|
"yPos": 4,
|
|
"width": 6,
|
|
"height": 4,
|
|
"widget": {
|
|
"title": "Cloud Run Instance Count",
|
|
"xyChart": {
|
|
"dataSets": [
|
|
{
|
|
"timeSeriesQuery": {
|
|
"timeSeriesFilter": {
|
|
"filter": "resource.type=\"cloud_run_revision\" AND resource.labels.service_name=\"karaoke-backend\" AND metric.type=\"run.googleapis.com/container/instance_count\"",
|
|
"aggregation": {
|
|
"alignmentPeriod": "60s",
|
|
"perSeriesAligner": "ALIGN_MEAN",
|
|
"crossSeriesReducer": "REDUCE_SUM"
|
|
}
|
|
}
|
|
},
|
|
"plotType": "LINE",
|
|
"legendTemplate": "instances"
|
|
}
|
|
],
|
|
"yAxis": {
|
|
"label": "Instances",
|
|
"scale": "LINEAR"
|
|
},
|
|
"chartOptions": {
|
|
"mode": "COLOR"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"xPos": 0,
|
|
"yPos": 8,
|
|
"width": 6,
|
|
"height": 4,
|
|
"widget": {
|
|
"title": "Cloud Tasks Queue Depth",
|
|
"xyChart": {
|
|
"dataSets": [
|
|
{
|
|
"timeSeriesQuery": {
|
|
"timeSeriesFilter": {
|
|
"filter": "resource.type=\"cloud_tasks_queue\" AND metric.type=\"cloudtasks.googleapis.com/queue/depth\"",
|
|
"aggregation": {
|
|
"alignmentPeriod": "60s",
|
|
"perSeriesAligner": "ALIGN_MEAN",
|
|
"groupByFields": ["resource.labels.queue_id"]
|
|
}
|
|
}
|
|
},
|
|
"plotType": "STACKED_AREA",
|
|
"legendTemplate": "${resource.labels.queue_id}"
|
|
}
|
|
],
|
|
"yAxis": {
|
|
"label": "Tasks in Queue",
|
|
"scale": "LINEAR"
|
|
},
|
|
"chartOptions": {
|
|
"mode": "COLOR"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"xPos": 6,
|
|
"yPos": 8,
|
|
"width": 6,
|
|
"height": 4,
|
|
"widget": {
|
|
"title": "Cloud Tasks Execution Rate",
|
|
"xyChart": {
|
|
"dataSets": [
|
|
{
|
|
"timeSeriesQuery": {
|
|
"timeSeriesFilter": {
|
|
"filter": "resource.type=\"cloud_tasks_queue\" AND metric.type=\"cloudtasks.googleapis.com/queue/task_attempt_count\"",
|
|
"aggregation": {
|
|
"alignmentPeriod": "60s",
|
|
"perSeriesAligner": "ALIGN_RATE",
|
|
"groupByFields": ["resource.labels.queue_id"]
|
|
}
|
|
}
|
|
},
|
|
"plotType": "STACKED_BAR",
|
|
"legendTemplate": "${resource.labels.queue_id}"
|
|
}
|
|
],
|
|
"yAxis": {
|
|
"label": "Tasks/sec",
|
|
"scale": "LINEAR"
|
|
},
|
|
"chartOptions": {
|
|
"mode": "COLOR"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"xPos": 0,
|
|
"yPos": 12,
|
|
"width": 12,
|
|
"height": 4,
|
|
"widget": {
|
|
"title": "Worker Logs (Search by job_id)",
|
|
"logsPanel": {
|
|
"filter": "resource.type=\"cloud_run_revision\" AND resource.labels.service_name=\"karaoke-backend\" AND (textPayload=~\"\\[job:\" OR jsonPayload.job_id!=\"\")",
|
|
"resourceNames": []
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"xPos": 0,
|
|
"yPos": 16,
|
|
"width": 6,
|
|
"height": 4,
|
|
"widget": {
|
|
"title": "CPU Utilization",
|
|
"xyChart": {
|
|
"dataSets": [
|
|
{
|
|
"timeSeriesQuery": {
|
|
"timeSeriesFilter": {
|
|
"filter": "resource.type=\"cloud_run_revision\" AND resource.labels.service_name=\"karaoke-backend\" AND metric.type=\"run.googleapis.com/container/cpu/utilizations\"",
|
|
"aggregation": {
|
|
"alignmentPeriod": "60s",
|
|
"perSeriesAligner": "ALIGN_PERCENTILE_50",
|
|
"crossSeriesReducer": "REDUCE_MEAN"
|
|
}
|
|
}
|
|
},
|
|
"plotType": "LINE",
|
|
"legendTemplate": "CPU (p50)"
|
|
},
|
|
{
|
|
"timeSeriesQuery": {
|
|
"timeSeriesFilter": {
|
|
"filter": "resource.type=\"cloud_run_revision\" AND resource.labels.service_name=\"karaoke-backend\" AND metric.type=\"run.googleapis.com/container/cpu/utilizations\"",
|
|
"aggregation": {
|
|
"alignmentPeriod": "60s",
|
|
"perSeriesAligner": "ALIGN_PERCENTILE_95",
|
|
"crossSeriesReducer": "REDUCE_MEAN"
|
|
}
|
|
}
|
|
},
|
|
"plotType": "LINE",
|
|
"legendTemplate": "CPU (p95)"
|
|
}
|
|
],
|
|
"yAxis": {
|
|
"label": "CPU Utilization",
|
|
"scale": "LINEAR"
|
|
},
|
|
"chartOptions": {
|
|
"mode": "COLOR"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"xPos": 6,
|
|
"yPos": 16,
|
|
"width": 6,
|
|
"height": 4,
|
|
"widget": {
|
|
"title": "Memory Utilization",
|
|
"xyChart": {
|
|
"dataSets": [
|
|
{
|
|
"timeSeriesQuery": {
|
|
"timeSeriesFilter": {
|
|
"filter": "resource.type=\"cloud_run_revision\" AND resource.labels.service_name=\"karaoke-backend\" AND metric.type=\"run.googleapis.com/container/memory/utilizations\"",
|
|
"aggregation": {
|
|
"alignmentPeriod": "60s",
|
|
"perSeriesAligner": "ALIGN_PERCENTILE_50",
|
|
"crossSeriesReducer": "REDUCE_MEAN"
|
|
}
|
|
}
|
|
},
|
|
"plotType": "LINE",
|
|
"legendTemplate": "Memory (p50)"
|
|
},
|
|
{
|
|
"timeSeriesQuery": {
|
|
"timeSeriesFilter": {
|
|
"filter": "resource.type=\"cloud_run_revision\" AND resource.labels.service_name=\"karaoke-backend\" AND metric.type=\"run.googleapis.com/container/memory/utilizations\"",
|
|
"aggregation": {
|
|
"alignmentPeriod": "60s",
|
|
"perSeriesAligner": "ALIGN_PERCENTILE_95",
|
|
"crossSeriesReducer": "REDUCE_MEAN"
|
|
}
|
|
}
|
|
},
|
|
"plotType": "LINE",
|
|
"legendTemplate": "Memory (p95)"
|
|
}
|
|
],
|
|
"yAxis": {
|
|
"label": "Memory Utilization",
|
|
"scale": "LINEAR"
|
|
},
|
|
"chartOptions": {
|
|
"mode": "COLOR"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"xPos": 0,
|
|
"yPos": 20,
|
|
"width": 12,
|
|
"height": 4,
|
|
"widget": {
|
|
"title": "Error Logs",
|
|
"logsPanel": {
|
|
"filter": "resource.type=\"cloud_run_revision\" AND resource.labels.service_name=\"karaoke-backend\" AND severity>=ERROR",
|
|
"resourceNames": []
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
|