diff --git a/docs/grafana_dashboard.json b/docs/grafana_dashboard.json
new file mode 100644
index 0000000..c2c4073
--- /dev/null
+++ b/docs/grafana_dashboard.json
@@ -0,0 +1,3457 @@
+{
+ "annotations": {
+ "list": [
+ {
+ "builtIn": 1,
+ "datasource": {
+ "type": "datasource",
+ "uid": "grafana"
+ },
+ "enable": true,
+ "hide": true,
+ "iconColor": "rgba(0, 211, 255, 1)",
+ "name": "Annotations & Alerts",
+ "target": {
+ "limit": 100,
+ "matchAny": false,
+ "tags": [],
+ "type": "dashboard"
+ },
+ "type": "dashboard"
+ }
+ ]
+ },
+ "editable": true,
+ "fiscalYearStartMonth": 0,
+ "graphTooltip": 1,
+ "id": null,
+ "links": [],
+ "liveNow": false,
+ "panels": [
+ {
+ "collapsed": false,
+ "gridPos": {
+ "h": 1,
+ "w": 24,
+ "x": 0,
+ "y": 0
+ },
+ "id": 100,
+ "panels": [],
+ "title": "📊 概览 (Overview)",
+ "type": "row"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "thresholds"
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "dark-red",
+ "value": null
+ },
+ {
+ "color": "red",
+ "value": 0.5
+ },
+ {
+ "color": "orange",
+ "value": 0.7
+ },
+ {
+ "color": "yellow",
+ "value": 0.85
+ },
+ {
+ "color": "green",
+ "value": 0.94
+ }
+ ]
+ },
+ "max": 1,
+ "min": 0,
+ "noValue": "N/A",
+ "unit": "percentunit"
+ }
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 3,
+ "x": 0,
+ "y": 1
+ },
+ "id": 101,
+ "options": {
+ "orientation": "auto",
+ "reduceOptions": {
+ "calcs": [
+ "lastNotNull"
+ ],
+ "fields": "",
+ "values": false
+ },
+ "showThresholdLabels": false,
+ "showThresholdMarkers": true
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "editorMode": "code",
+ "expr": "(sum(rate(http_server_request_duration_seconds_bucket{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\", le=\"0.25\"}[5m])) * 0.5 + sum(rate(http_server_request_duration_seconds_bucket{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\", le=\"1\"}[5m])) * 0.5) / sum(rate(http_server_request_duration_seconds_count{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\"}[5m]))",
+ "legendFormat": "Apdex Score",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "Apdex Score (T=250ms)",
+ "type": "gauge"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 21,
+ "x": 3,
+ "y": 1
+ },
+ "id": 102,
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "thresholds"
+ },
+ "custom": {
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "Apdex Score",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 20,
+ "gradientMode": "scheme",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineInterpolation": "smooth",
+ "lineWidth": 2,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "area"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "dark-red",
+ "value": null
+ },
+ {
+ "color": "red",
+ "value": 0.5
+ },
+ {
+ "color": "orange",
+ "value": 0.7
+ },
+ {
+ "color": "yellow",
+ "value": 0.85
+ },
+ {
+ "color": "green",
+ "value": 0.94
+ }
+ ]
+ },
+ "unit": "percentunit",
+ "min": 0,
+ "max": 1,
+ "noValue": "N/A"
+ },
+ "overrides": []
+ },
+ "options": {
+ "legend": {
+ "calcs": [
+ "lastNotNull",
+ "mean"
+ ],
+ "displayMode": "list",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "single",
+ "sort": "none"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "editorMode": "code",
+ "expr": "(sum(rate(http_server_request_duration_seconds_bucket{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\", le=\"0.25\"}[5m])) * 0.5 + sum(rate(http_server_request_duration_seconds_bucket{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\", le=\"1\"}[5m])) * 0.5) / sum(rate(http_server_request_duration_seconds_count{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\"}[5m]))",
+ "instant": false,
+ "legendFormat": "Apdex Score",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "Apdex Rating Trend",
+ "description": "🟢Excellent(94-100%) | 🟡Good(85-94%) | 🟠Fair(70-85%) | 🔴Poor(50-70%) | ⚫Unacceptable(0-50%)",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "thresholds"
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ },
+ "unit": "reqps"
+ }
+ },
+ "gridPos": {
+ "h": 4,
+ "w": 5,
+ "x": 0,
+ "y": 9
+ },
+ "id": 103,
+ "options": {
+ "colorMode": "value",
+ "graphMode": "area",
+ "justifyMode": "auto",
+ "orientation": "auto",
+ "reduceOptions": {
+ "calcs": [
+ "lastNotNull"
+ ],
+ "fields": "",
+ "values": false
+ },
+ "textMode": "auto"
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "editorMode": "code",
+ "expr": "sum(rate(http_server_requests_total{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\"}[1m]))",
+ "legendFormat": "HTTP QPS",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "HTTP QPS",
+ "type": "stat"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "thresholds"
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "yellow",
+ "value": 0.5
+ },
+ {
+ "color": "red",
+ "value": 1
+ }
+ ]
+ },
+ "unit": "s"
+ }
+ },
+ "gridPos": {
+ "h": 4,
+ "w": 5,
+ "x": 5,
+ "y": 9
+ },
+ "id": 104,
+ "options": {
+ "colorMode": "value",
+ "graphMode": "area",
+ "justifyMode": "auto",
+ "orientation": "auto",
+ "reduceOptions": {
+ "calcs": [
+ "lastNotNull"
+ ],
+ "fields": "",
+ "values": false
+ },
+ "textMode": "auto"
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "editorMode": "code",
+ "expr": "histogram_quantile(0.99, sum(rate(http_server_request_duration_seconds_bucket{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\"}[1m])) by (le))",
+ "legendFormat": "HTTP P99",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "HTTP P99 Latency",
+ "type": "stat"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "thresholds"
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "red",
+ "value": null
+ },
+ {
+ "color": "yellow",
+ "value": 95
+ },
+ {
+ "color": "green",
+ "value": 99
+ }
+ ]
+ },
+ "unit": "percent"
+ }
+ },
+ "gridPos": {
+ "h": 4,
+ "w": 5,
+ "x": 10,
+ "y": 9
+ },
+ "id": 105,
+ "options": {
+ "colorMode": "value",
+ "graphMode": "area",
+ "justifyMode": "auto",
+ "orientation": "auto",
+ "reduceOptions": {
+ "calcs": [
+ "lastNotNull"
+ ],
+ "fields": "",
+ "values": false
+ },
+ "textMode": "auto"
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "editorMode": "code",
+ "expr": "sum(rate(http_server_requests_total{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\", status!~\"5..\"}[1m])) / sum(rate(http_server_requests_total{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\"}[1m])) * 100",
+ "legendFormat": "HTTP Success Rate",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "HTTP Success Rate",
+ "type": "stat"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "thresholds"
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "blue",
+ "value": 1000
+ },
+ {
+ "color": "yellow",
+ "value": 5000
+ },
+ {
+ "color": "red",
+ "value": 10000
+ }
+ ]
+ },
+ "unit": "reqps",
+ "decimals": 2
+ }
+ },
+ "gridPos": {
+ "h": 4,
+ "w": 5,
+ "x": 15,
+ "y": 9
+ },
+ "id": 109,
+ "options": {
+ "colorMode": "value",
+ "graphMode": "area",
+ "justifyMode": "auto",
+ "orientation": "auto",
+ "reduceOptions": {
+ "calcs": [
+ "max"
+ ],
+ "fields": "",
+ "values": false
+ },
+ "textMode": "auto"
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "editorMode": "code",
+ "expr": "max_over_time(sum(rate(http_server_requests_total{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\"}[1m]))[1d:])",
+ "legendFormat": "Peak QPS Today",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "Today's Peak QPS",
+ "type": "stat"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "thresholds"
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "yellow",
+ "value": 5000
+ },
+ {
+ "color": "red",
+ "value": 10000
+ }
+ ]
+ },
+ "unit": "short"
+ }
+ },
+ "gridPos": {
+ "h": 4,
+ "w": 12,
+ "x": 0,
+ "y": 13
+ },
+ "id": 106,
+ "options": {
+ "colorMode": "value",
+ "graphMode": "area",
+ "justifyMode": "auto",
+ "orientation": "auto",
+ "reduceOptions": {
+ "calcs": [
+ "lastNotNull"
+ ],
+ "fields": "",
+ "values": false
+ },
+ "textMode": "auto"
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "editorMode": "code",
+ "expr": "sum(go_goroutines{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\"})",
+ "legendFormat": "Total Goroutines",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "Goroutines (Total)",
+ "type": "stat"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "thresholds"
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ },
+ {
+ "color": "yellow",
+ "value": 500000000
+ },
+ {
+ "color": "red",
+ "value": 1000000000
+ }
+ ]
+ },
+ "unit": "bytes"
+ }
+ },
+ "gridPos": {
+ "h": 4,
+ "w": 12,
+ "x": 12,
+ "y": 13
+ },
+ "id": 107,
+ "options": {
+ "colorMode": "value",
+ "graphMode": "area",
+ "justifyMode": "auto",
+ "orientation": "auto",
+ "reduceOptions": {
+ "calcs": [
+ "lastNotNull"
+ ],
+ "fields": "",
+ "values": false
+ },
+ "textMode": "auto"
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "editorMode": "code",
+ "expr": "sum(go_memstats_heap_inuse_bytes{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\"})",
+ "legendFormat": "Total Memory InUse",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "Memory InUse (Total)",
+ "type": "stat"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "thresholds"
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ },
+ "unit": "short"
+ }
+ },
+ "gridPos": {
+ "h": 4,
+ "w": 4,
+ "x": 20,
+ "y": 9
+ },
+ "id": 108,
+ "options": {
+ "colorMode": "value",
+ "graphMode": "area",
+ "justifyMode": "auto",
+ "orientation": "auto",
+ "reduceOptions": {
+ "calcs": [
+ "lastNotNull"
+ ],
+ "fields": "",
+ "values": false
+ },
+ "textMode": "auto"
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "editorMode": "code",
+ "expr": "sum(http_server_requests_inflight{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\"})",
+ "legendFormat": "Inflight",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "HTTP Inflight",
+ "type": "stat"
+ },
+ {
+ "collapsed": false,
+ "gridPos": {
+ "h": 1,
+ "w": 24,
+ "x": 0,
+ "y": 17
+ },
+ "id": 200,
+ "panels": [],
+ "title": "🌐 HTTP Server",
+ "type": "row"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 10,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ },
+ "unit": "reqps"
+ }
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 0,
+ "y": 18
+ },
+ "id": 201,
+ "options": {
+ "legend": {
+ "calcs": [
+ "mean",
+ "max"
+ ],
+ "displayMode": "table",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "multi",
+ "sort": "desc"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "editorMode": "code",
+ "expr": "sum(rate(http_server_requests_total{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\"}[1m])) by (method, url)",
+ "legendFormat": "{{method}} {{url}}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "HTTP QPS by Endpoint",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 10,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ },
+ "unit": "s"
+ }
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 12,
+ "y": 18
+ },
+ "id": 202,
+ "options": {
+ "legend": {
+ "calcs": [
+ "mean",
+ "max"
+ ],
+ "displayMode": "table",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "multi",
+ "sort": "desc"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "editorMode": "code",
+ "expr": "histogram_quantile(0.99, sum(rate(http_server_request_duration_seconds_bucket{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\"}[1m])) by (le, method, url))",
+ "legendFormat": "P99 {{method}} {{url}}",
+ "range": true,
+ "refId": "A"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "editorMode": "code",
+ "expr": "histogram_quantile(0.95, sum(rate(http_server_request_duration_seconds_bucket{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\"}[1m])) by (le, method, url))",
+ "legendFormat": "P95 {{method}} {{url}}",
+ "range": true,
+ "refId": "B"
+ }
+ ],
+ "title": "HTTP Latency (P99/P95) by Endpoint",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 10,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "normal"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ },
+ "unit": "reqps"
+ }
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 0,
+ "y": 26
+ },
+ "id": 203,
+ "options": {
+ "legend": {
+ "calcs": [
+ "mean",
+ "max"
+ ],
+ "displayMode": "table",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "multi",
+ "sort": "desc"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "editorMode": "code",
+ "expr": "sum(rate(http_server_requests_total{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\"}[1m])) by (status)",
+ "legendFormat": "Status {{status}}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "HTTP Status Codes",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 10,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ },
+ "unit": "Bps"
+ }
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 12,
+ "y": 26
+ },
+ "id": 204,
+ "options": {
+ "legend": {
+ "calcs": [
+ "mean",
+ "max"
+ ],
+ "displayMode": "table",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "multi",
+ "sort": "none"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "editorMode": "code",
+ "expr": "sum(rate(http_server_request_size_bytes_sum{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\"}[1m]))",
+ "legendFormat": "Request",
+ "range": true,
+ "refId": "A"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "editorMode": "code",
+ "expr": "sum(rate(http_server_response_size_bytes_sum{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\"}[1m]))",
+ "legendFormat": "Response",
+ "range": true,
+ "refId": "B"
+ }
+ ],
+ "title": "HTTP Network Traffic",
+ "type": "timeseries"
+ },
+ {
+ "collapsed": false,
+ "gridPos": {
+ "h": 1,
+ "w": 24,
+ "x": 0,
+ "y": 34
+ },
+ "id": 300,
+ "panels": [],
+ "title": "📤 HTTP Client",
+ "type": "row"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 10,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ },
+ "unit": "reqps"
+ }
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 0,
+ "y": 35
+ },
+ "id": 301,
+ "options": {
+ "legend": {
+ "calcs": [
+ "mean",
+ "max"
+ ],
+ "displayMode": "table",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "multi",
+ "sort": "desc"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "editorMode": "code",
+ "expr": "sum(rate(http_client_requests_total{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\"}[1m])) by (baseUrl, url)",
+ "legendFormat": "{{baseUrl}}{{url}}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "HTTP Client QPS",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 10,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ },
+ "unit": "s"
+ }
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 12,
+ "y": 35
+ },
+ "id": 302,
+ "options": {
+ "legend": {
+ "calcs": [
+ "mean",
+ "max"
+ ],
+ "displayMode": "table",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "multi",
+ "sort": "desc"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "editorMode": "code",
+ "expr": "histogram_quantile(0.99, sum(rate(http_client_request_duration_seconds_bucket{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\"}[1m])) by (le, baseUrl, url))",
+ "legendFormat": "P99 {{baseUrl}}{{url}}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "HTTP Client Latency (P99)",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 10,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "normal"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ },
+ "unit": "reqps"
+ }
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 0,
+ "y": 43
+ },
+ "id": 303,
+ "options": {
+ "legend": {
+ "calcs": [
+ "mean",
+ "max"
+ ],
+ "displayMode": "table",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "multi",
+ "sort": "desc"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "editorMode": "code",
+ "expr": "sum(rate(http_client_requests_total{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\",error!=\"\"}[1m])) by (baseUrl, url)",
+ "legendFormat": "Error {{baseUrl}}{{url}}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "HTTP Client Errors",
+ "type": "timeseries"
+ },
+ {
+ "collapsed": false,
+ "gridPos": {
+ "h": 1,
+ "w": 24,
+ "x": 0,
+ "y": 51
+ },
+ "id": 400,
+ "panels": [],
+ "title": "🔌 gRPC Server",
+ "type": "row"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 10,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ },
+ "unit": "reqps"
+ }
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 0,
+ "y": 52
+ },
+ "id": 401,
+ "options": {
+ "legend": {
+ "calcs": [
+ "mean",
+ "max"
+ ],
+ "displayMode": "table",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "multi",
+ "sort": "desc"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "editorMode": "code",
+ "expr": "sum(rate(grpc_server_requests_total{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\"}[1m])) by (method, type)",
+ "legendFormat": "{{type}} {{method}}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "gRPC Server QPS",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 10,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ },
+ "unit": "s"
+ }
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 12,
+ "y": 52
+ },
+ "id": 402,
+ "options": {
+ "legend": {
+ "calcs": [
+ "mean",
+ "max"
+ ],
+ "displayMode": "table",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "multi",
+ "sort": "desc"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "editorMode": "code",
+ "expr": "histogram_quantile(0.99, sum(rate(grpc_server_request_duration_seconds_bucket{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\"}[1m])) by (le, method))",
+ "legendFormat": "P99 {{method}}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "gRPC Server Latency (P99)",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 10,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "normal"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ },
+ "unit": "reqps"
+ }
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 0,
+ "y": 60
+ },
+ "id": 403,
+ "options": {
+ "legend": {
+ "calcs": [
+ "mean",
+ "max"
+ ],
+ "displayMode": "table",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "multi",
+ "sort": "desc"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "editorMode": "code",
+ "expr": "sum(rate(grpc_server_requests_total{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\",code!=\"OK\"}[1m])) by (method, code)",
+ "legendFormat": "{{code}} {{method}}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "gRPC Server Errors",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 10,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ },
+ "unit": "cpm"
+ }
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 12,
+ "y": 60
+ },
+ "id": 404,
+ "options": {
+ "legend": {
+ "calcs": [
+ "mean",
+ "max"
+ ],
+ "displayMode": "table",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "multi",
+ "sort": "desc"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "editorMode": "code",
+ "expr": "increase(grpc_server_panics_total{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\"}[1m])",
+ "legendFormat": "Panic {{method}}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "gRPC Server Panics",
+ "type": "timeseries"
+ },
+ {
+ "collapsed": false,
+ "gridPos": {
+ "h": 1,
+ "w": 24,
+ "x": 0,
+ "y": 68
+ },
+ "id": 600,
+ "panels": [],
+ "title": "🐹 Go Runtime",
+ "type": "row"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 10,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ },
+ "unit": "short"
+ }
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 8,
+ "x": 0,
+ "y": 69
+ },
+ "id": 601,
+ "options": {
+ "legend": {
+ "calcs": [
+ "mean",
+ "max"
+ ],
+ "displayMode": "table",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "single",
+ "sort": "none"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "editorMode": "code",
+ "expr": "go_goroutines{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\"}",
+ "legendFormat": "{{instance}}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "Goroutines",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 10,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ },
+ "unit": "bytes"
+ }
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 8,
+ "x": 8,
+ "y": 69
+ },
+ "id": 602,
+ "options": {
+ "legend": {
+ "calcs": [
+ "mean",
+ "max"
+ ],
+ "displayMode": "table",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "multi",
+ "sort": "none"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "editorMode": "code",
+ "expr": "go_memstats_heap_alloc_bytes{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\"}",
+ "legendFormat": "Alloc {{instance}}",
+ "range": true,
+ "refId": "A"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "editorMode": "code",
+ "expr": "go_memstats_heap_inuse_bytes{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\"}",
+ "legendFormat": "InUse {{instance}}",
+ "range": true,
+ "refId": "B"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "editorMode": "code",
+ "expr": "go_memstats_heap_sys_bytes{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\"}",
+ "legendFormat": "Sys {{instance}}",
+ "range": true,
+ "refId": "C"
+ }
+ ],
+ "title": "Heap Memory",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 10,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ },
+ "unit": "s"
+ }
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 8,
+ "x": 16,
+ "y": 69
+ },
+ "id": 603,
+ "options": {
+ "legend": {
+ "calcs": [
+ "mean",
+ "max"
+ ],
+ "displayMode": "table",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "multi",
+ "sort": "none"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "editorMode": "code",
+ "expr": "rate(go_gc_duration_seconds_sum{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\"}[1m]) / rate(go_gc_duration_seconds_count{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\"}[1m])",
+ "legendFormat": "Avg {{instance}}",
+ "range": true,
+ "refId": "A"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "editorMode": "code",
+ "expr": "go_gc_duration_seconds{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\",quantile=\"1\"}",
+ "legendFormat": "Max {{instance}}",
+ "range": true,
+ "refId": "B"
+ }
+ ],
+ "title": "GC Duration",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 10,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ },
+ "unit": "ops"
+ }
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 8,
+ "x": 0,
+ "y": 77
+ },
+ "id": 604,
+ "options": {
+ "legend": {
+ "calcs": [
+ "mean"
+ ],
+ "displayMode": "table",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "multi",
+ "sort": "none"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "editorMode": "code",
+ "expr": "rate(go_gc_duration_seconds_count{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\"}[1m])",
+ "legendFormat": "{{instance}}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "GC Rate",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 10,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ },
+ "max": 1,
+ "min": 0,
+ "unit": "percentunit"
+ }
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 8,
+ "x": 8,
+ "y": 77
+ },
+ "id": 605,
+ "options": {
+ "legend": {
+ "calcs": [
+ "mean",
+ "max"
+ ],
+ "displayMode": "table",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "single",
+ "sort": "none"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "editorMode": "code",
+ "expr": "go_memstats_gc_cpu_fraction{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\"}",
+ "legendFormat": "{{instance}}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "GC CPU Fraction",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 10,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ },
+ "unit": "Bps"
+ }
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 8,
+ "x": 16,
+ "y": 77
+ },
+ "id": 606,
+ "options": {
+ "legend": {
+ "calcs": [
+ "mean"
+ ],
+ "displayMode": "table",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "multi",
+ "sort": "none"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "editorMode": "code",
+ "expr": "rate(go_memstats_alloc_bytes_total{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\"}[1m])",
+ "legendFormat": "{{instance}}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "Memory Allocation Rate",
+ "type": "timeseries"
+ },
+ {
+ "collapsed": false,
+ "gridPos": {
+ "h": 1,
+ "w": 24,
+ "x": 0,
+ "y": 85
+ },
+ "id": 700,
+ "panels": [],
+ "title": "🗄️ Database (DB)",
+ "type": "row"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 10,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ },
+ "unit": "short"
+ }
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 0,
+ "y": 86
+ },
+ "id": 701,
+ "options": {
+ "legend": {
+ "calcs": [
+ "mean",
+ "max"
+ ],
+ "displayMode": "table",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "multi",
+ "sort": "none"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "editorMode": "code",
+ "expr": "db_client_connections_open{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\"}",
+ "legendFormat": "Open {{database}}",
+ "range": true,
+ "refId": "A"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "editorMode": "code",
+ "expr": "db_client_connections_in_use{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\"}",
+ "legendFormat": "InUse {{database}}",
+ "range": true,
+ "refId": "B"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "editorMode": "code",
+ "expr": "db_client_connections_idle{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\"}",
+ "legendFormat": "Idle {{database}}",
+ "range": true,
+ "refId": "C"
+ }
+ ],
+ "title": "DB Connection Pool",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 10,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ },
+ "unit": "s"
+ }
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 12,
+ "y": 86
+ },
+ "id": 702,
+ "options": {
+ "legend": {
+ "calcs": [
+ "mean",
+ "max"
+ ],
+ "displayMode": "table",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "multi",
+ "sort": "desc"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "editorMode": "code",
+ "expr": "histogram_quantile(0.99, sum(rate(db_client_request_duration_seconds_bucket{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\"}[1m])) by (le, type, database))",
+ "legendFormat": "P99 {{type}} {{database}}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "DB Query Latency (P99)",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 10,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "normal"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ },
+ "unit": "reqps"
+ }
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 0,
+ "y": 94
+ },
+ "id": 703,
+ "options": {
+ "legend": {
+ "calcs": [
+ "mean",
+ "max"
+ ],
+ "displayMode": "table",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "multi",
+ "sort": "desc"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "editorMode": "code",
+ "expr": "sum(rate(db_client_request_duration_seconds_count{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\"}[1m])) by (type, database)",
+ "legendFormat": "{{type}} {{database}}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "DB Query QPS",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 10,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "normal"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ },
+ "unit": "reqps"
+ }
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 12,
+ "y": 94
+ },
+ "id": 704,
+ "options": {
+ "legend": {
+ "calcs": [
+ "mean",
+ "max"
+ ],
+ "displayMode": "table",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "multi",
+ "sort": "desc"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "editorMode": "code",
+ "expr": "sum(rate(db_client_request_duration_seconds_count{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\",result=\"error\"}[1m])) by (type, database)",
+ "legendFormat": "Error {{type}} {{database}}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "DB Query Errors",
+ "type": "timeseries"
+ },
+ {
+ "collapsed": false,
+ "gridPos": {
+ "h": 1,
+ "w": 24,
+ "x": 0,
+ "y": 102
+ },
+ "id": 800,
+ "panels": [],
+ "title": "🔴 Redis",
+ "type": "row"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 10,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ },
+ "unit": "reqps"
+ }
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 0,
+ "y": 103
+ },
+ "id": 801,
+ "options": {
+ "legend": {
+ "calcs": [
+ "mean",
+ "max"
+ ],
+ "displayMode": "table",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "multi",
+ "sort": "desc"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "editorMode": "code",
+ "expr": "sum(rate(redis_client_requests_total{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\"}[1m])) by (cmd)",
+ "legendFormat": "{{cmd}}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "Redis Command QPS",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 10,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ },
+ "unit": "s"
+ }
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 12,
+ "y": 103
+ },
+ "id": 802,
+ "options": {
+ "legend": {
+ "calcs": [
+ "mean",
+ "max"
+ ],
+ "displayMode": "table",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "multi",
+ "sort": "desc"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "editorMode": "code",
+ "expr": "histogram_quantile(0.99, sum(rate(redis_client_request_duration_seconds_bucket{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\"}[1m])) by (le, cmd))",
+ "legendFormat": "P99 {{cmd}}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "Redis Command Latency (P99)",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 10,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "normal"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ },
+ "unit": "reqps"
+ }
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 0,
+ "y": 111
+ },
+ "id": 803,
+ "options": {
+ "legend": {
+ "calcs": [
+ "mean",
+ "max"
+ ],
+ "displayMode": "table",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "multi",
+ "sort": "desc"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "editorMode": "code",
+ "expr": "sum(rate(redis_client_requests_total{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\",result!=\"success\"}[1m])) by (cmd)",
+ "legendFormat": "Error {{cmd}}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "Redis Command Errors",
+ "type": "timeseries"
+ },
+ {
+ "collapsed": false,
+ "gridPos": {
+ "h": 1,
+ "w": 24,
+ "x": 0,
+ "y": 119
+ },
+ "id": 900,
+ "panels": [],
+ "title": "🍃 MongoDB",
+ "type": "row"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 10,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ },
+ "unit": "reqps"
+ }
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 0,
+ "y": 120
+ },
+ "id": 901,
+ "options": {
+ "legend": {
+ "calcs": [
+ "mean",
+ "max"
+ ],
+ "displayMode": "table",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "multi",
+ "sort": "desc"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "editorMode": "code",
+ "expr": "sum(rate(mongo_client_requests_total{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\"}[1m])) by (command)",
+ "legendFormat": "{{command}}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "MongoDB Command QPS",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 10,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "none"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ },
+ "unit": "s"
+ }
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 12,
+ "y": 120
+ },
+ "id": 902,
+ "options": {
+ "legend": {
+ "calcs": [
+ "mean",
+ "max"
+ ],
+ "displayMode": "table",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "multi",
+ "sort": "desc"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "editorMode": "code",
+ "expr": "histogram_quantile(0.99, sum(rate(mongo_client_request_duration_seconds_bucket{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\"}[1m])) by (le, command))",
+ "legendFormat": "P99 {{command}}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "MongoDB Command Latency (P99)",
+ "type": "timeseries"
+ },
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "fieldConfig": {
+ "defaults": {
+ "color": {
+ "mode": "palette-classic"
+ },
+ "custom": {
+ "axisCenteredZero": false,
+ "axisColorMode": "text",
+ "axisLabel": "",
+ "axisPlacement": "auto",
+ "barAlignment": 0,
+ "drawStyle": "line",
+ "fillOpacity": 10,
+ "gradientMode": "none",
+ "hideFrom": {
+ "legend": false,
+ "tooltip": false,
+ "viz": false
+ },
+ "lineInterpolation": "linear",
+ "lineWidth": 1,
+ "pointSize": 5,
+ "scaleDistribution": {
+ "type": "linear"
+ },
+ "showPoints": "auto",
+ "spanNulls": false,
+ "stacking": {
+ "group": "A",
+ "mode": "normal"
+ },
+ "thresholdsStyle": {
+ "mode": "off"
+ }
+ },
+ "mappings": [],
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ {
+ "color": "green",
+ "value": null
+ }
+ ]
+ },
+ "unit": "reqps"
+ }
+ },
+ "gridPos": {
+ "h": 8,
+ "w": 12,
+ "x": 0,
+ "y": 128
+ },
+ "id": 903,
+ "options": {
+ "legend": {
+ "calcs": [
+ "mean",
+ "max"
+ ],
+ "displayMode": "table",
+ "placement": "bottom",
+ "showLegend": true
+ },
+ "tooltip": {
+ "mode": "multi",
+ "sort": "desc"
+ }
+ },
+ "targets": [
+ {
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "editorMode": "code",
+ "expr": "sum(rate(mongo_client_requests_total{namespace=~\"$namespace\",job=~\"$service\",instance=~\"$instance\",result=\"error\"}[1m])) by (command)",
+ "legendFormat": "Error {{command}}",
+ "range": true,
+ "refId": "A"
+ }
+ ],
+ "title": "MongoDB Command Errors",
+ "type": "timeseries"
+ }
+ ],
+ "schemaVersion": 38,
+ "style": "dark",
+ "tags": [
+ "box",
+ "server",
+ "sre"
+ ],
+ "templating": {
+ "list": [
+ {
+ "current": {
+ "selected": false,
+ "text": "Prometheus",
+ "value": "Prometheus"
+ },
+ "hide": 0,
+ "includeAll": false,
+ "label": "Datasource",
+ "multi": false,
+ "name": "datasource",
+ "options": [],
+ "query": "prometheus",
+ "refresh": 1,
+ "regex": "",
+ "skipUrlSync": false,
+ "type": "datasource"
+ },
+ {
+ "allValue": ".*",
+ "current": {
+ "selected": true,
+ "text": [
+ "All"
+ ],
+ "value": [
+ "$__all"
+ ]
+ },
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "definition": "box_info",
+ "hide": 0,
+ "includeAll": true,
+ "multi": true,
+ "name": "namespace",
+ "options": [],
+ "query": {
+ "query": "box_info",
+ "refId": "StandardVariableQuery"
+ },
+ "refresh": 1,
+ "regex": "/.*namespace=\"([^\"]*).*/",
+ "skipUrlSync": false,
+ "sort": 0,
+ "type": "query"
+ },
+ {
+ "allValue": ".*",
+ "current": {
+ "selected": true,
+ "text": [
+ "All"
+ ],
+ "value": [
+ "$__all"
+ ]
+ },
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "definition": "box_info",
+ "hide": 0,
+ "includeAll": true,
+ "multi": true,
+ "name": "service",
+ "options": [],
+ "query": {
+ "query": "box_info",
+ "refId": "StandardVariableQuery"
+ },
+ "refresh": 1,
+ "regex": "/.*job=\"([^\"]*).*/",
+ "skipUrlSync": false,
+ "sort": 0,
+ "type": "query"
+ },
+ {
+ "allValue": ".*",
+ "current": {
+ "selected": true,
+ "text": [
+ "All"
+ ],
+ "value": [
+ "$__all"
+ ]
+ },
+ "datasource": {
+ "type": "prometheus",
+ "uid": "${datasource}"
+ },
+ "definition": "box_info",
+ "hide": 0,
+ "includeAll": true,
+ "multi": true,
+ "name": "instance",
+ "options": [],
+ "query": {
+ "query": "box_info",
+ "refId": "StandardVariableQuery"
+ },
+ "refresh": 1,
+ "regex": "/.*instance=\"([^\"]*).*/",
+ "skipUrlSync": false,
+ "sort": 0,
+ "type": "query"
+ }
+ ]
+ },
+ "time": {
+ "from": "now-6h",
+ "to": "now"
+ },
+ "timepicker": {},
+ "timezone": "",
+ "title": "Box Server Monitoring Dashboard",
+ "uid": "box-server-dashboard",
+ "version": 1,
+ "weekStart": ""
+}
\ No newline at end of file
diff --git a/docs/metric.md b/docs/metric.md
new file mode 100644
index 0000000..cbb4ac9
--- /dev/null
+++ b/docs/metric.md
@@ -0,0 +1,782 @@
+- [Metrics Documentation](#metrics-documentation)
+ - [1. 核心指标定义 (Definitions)](#1-核心指标定义-definitions)
+ - [1.1 HTTP Server (Gin)](#11-http-server-gin)
+ - [1.2 HTTP Client (Wukong)](#12-http-client-wukong)
+ - [1.3 gRPC Server](#13-grpc-server)
+ - [1.4 Redis Client](#14-redis-client)
+ - [1.5 Database Client (GORM)](#15-database-client-gorm)
+ - [1.6 MongoDB Client](#16-mongodb-client)
+ - [1.7 Schedule (定时任务)](#17-schedule-定时任务)
+ - [1.8 Go Runtime (运行时)](#18-go-runtime-运行时)
+ - [基础指标](#基础指标)
+ - [内存分配统计](#内存分配统计)
+ - [堆内存统计](#堆内存统计)
+ - [栈内存统计](#栈内存统计)
+ - [MSpan / MCache 统计](#mspan--mcache-统计)
+ - [GC 统计](#gc-统计)
+ - [其他系统内存](#其他系统内存)
+ - [2. 推荐看板指标 (Grafana PromQL)](#2-推荐看板指标-grafana-promql)
+ - [2.1 📊 概览 (Overview)](#21--概览-overview)
+ - [Apdex Score](#apdex-score)
+ - [关键指标卡片](#关键指标卡片)
+ - [2.2 🌐 HTTP Server](#22--http-server)
+ - [2.3 📤 HTTP Client](#23--http-client)
+ - [2.4 🔌 gRPC Server](#24--grpc-server)
+ - [2.5 🐹 Go Runtime](#25--go-runtime)
+ - [2.6 🔴 Redis](#26--redis)
+ - [2.7 🗄️ Database (DB)](#27-️-database-db)
+ - [2.8 🍃 MongoDB](#28--mongodb)
+ - [3. 告警规则 (Alerting Rules)](#3-告警规则-alerting-rules)
+ - [4. Go Runtime 指标解读](#4-go-runtime-指标解读)
+ - [4.1 内存指标关系](#41-内存指标关系)
+ - [4.2 关键指标说明](#42-关键指标说明)
+ - [Goroutine 监控](#goroutine-监控)
+ - [内存监控](#内存监控)
+ - [GC 监控](#gc-监控)
+ - [5. 常见问题诊断 (Troubleshooting)](#5-常见问题诊断-troubleshooting)
+ - [5.1 Go Runtime 问题](#51-go-runtime-问题)
+ - [问题 1: Goroutine 泄漏](#问题-1-goroutine-泄漏)
+ - [问题 2: 内存泄漏](#问题-2-内存泄漏)
+ - [问题 3: GC 压力过大](#问题-3-gc-压力过大)
+ - [问题 4: 线程数异常增长](#问题-4-线程数异常增长)
+ - [5.2 中间件与服务问题](#52-中间件与服务问题)
+ - [问题 5: 数据库连接池耗尽](#问题-5-数据库连接池耗尽)
+ - [问题 6: Redis 延迟抖动](#问题-6-redis-延迟抖动)
+ - [问题 7: Context Cancelled / Timeout](#问题-7-context-cancelled--timeout)
+ - [问题 8: 定时任务堆积](#问题-8-定时任务堆积)
+
+# Metrics Documentation
+
+本文档记录了 `box` 框架中各组件暴露的 Prometheus 监控指标、推荐的 Grafana 看板配置以及告警规则。
+
+## 1. 核心指标定义 (Definitions)
+
+### 1.1 HTTP Server (Gin)
+
+| 指标名称 | 类型 | Labels | 说明 |
+| :------------------------------------- | :-------- | :----------------------------------- | :------------------------------------------ |
+| `http_server_requests_inflight` | Gauge | `method`, `url` | 当前正在处理的 HTTP 请求数 (饱和度) |
+| `http_server_requests_total` | Counter | `method`, `url`, `status`, `errcode` | 处理的 HTTP 请求总数 (流量 & 错误) |
+| `http_server_request_duration_seconds` | Histogram | `method`, `url`, `status`, `errcode` | HTTP 请求耗时分布 (延迟),桶:.005s - 10s |
+| `http_server_request_size_bytes` | Histogram | `method`, `url` | HTTP 请求体大小分布 (流量),桶:1KB - 100MB |
+| `http_server_response_size_bytes` | Histogram | `method`, `url`, `status`, `errcode` | HTTP 响应体大小分布 (流量),桶:1KB - 100MB |
+
+### 1.2 HTTP Client (Wukong)
+
+| 指标名称 | 类型 | Labels | 说明 |
+| :------------------------------------- | :-------- | :------------------------------------------------- | :----------------------------- |
+| `http_client_requests_inflight` | Gauge | `method`, `baseUrl`, `url` | 当前正在进行的下游 HTTP 请求数 |
+| `http_client_requests_total` | Counter | `method`, `baseUrl`, `url`, `statusCode`, `result` | 发起的 HTTP 请求总数 |
+| `http_client_request_duration_seconds` | Histogram | `method`, `baseUrl`, `url`, `statusCode`, `result` | HTTP 请求耗时分布 |
+
+### 1.3 gRPC Server
+
+| 指标名称 | 类型 | Labels | 说明 |
+| :------------------------------------- | :-------- | :----------------------- | :------------------------- |
+| `grpc_server_requests_inflight` | Gauge | `method`, `type` | 当前正在处理的 gRPC 请求数 |
+| `grpc_server_requests_total` | Counter | `method`, `type`, `code` | 处理的 gRPC 请求总数 |
+| `grpc_server_request_duration_seconds` | Histogram | `method`, `type`, `code` | gRPC 请求耗时分布 |
+| `grpc_server_panics_total` | Counter | `method` | gRPC 服务 Panic 总次数 |
+
+### 1.4 Redis Client
+
+| 指标名称 | 类型 | Labels | 说明 |
+| :-------------------------------------- | :-------- | :----------------------------------------------------- | :--------------------- |
+| `redis_client_requests_total` | Counter | `address`, `db`, `masterName`, `pipe`, `cmd`, `result` | Redis 命令执行总数 |
+| `redis_client_request_duration_seconds` | Histogram | `address`, `db`, `masterName`, `pipe`, `cmd`, `result` | Redis 命令执行耗时分布 |
+
+### 1.5 Database Client (GORM)
+
+| 指标名称 | 类型 | Labels | 说明 |
+| :----------------------------------- | :-------- | :------------------------------------- | :------------------------- |
+| `db_client_connections_idle` | Gauge | `driver`, `database` | 连接池空闲连接数 |
+| `db_client_connections_in_use` | Gauge | `driver`, `database` | 连接池正在使用的连接数 |
+| `db_client_connections_open` | Gauge | `driver`, `database` | 连接池当前打开的总连接数 |
+| `db_client_connections_max_open` | Gauge | `driver`, `database` | 连接池最大允许打开的连接数 |
+| `db_client_connections_wait_total` | Gauge | `driver`, `database` | 等待连接的总次数 |
+| `db_client_connections_wait_seconds` | Gauge | `driver`, `database` | 等待连接的总耗时 |
+| `db_client_request_duration_seconds` | Histogram | `driver`, `database`, `type`, `result` | SQL 执行耗时分布 |
+
+### 1.6 MongoDB Client
+
+| 指标名称 | 类型 | Labels | 说明 |
+| :-------------------------------------- | :-------- | :------------------ | :---------------------------- |
+| `mongo_client_requests_total` | Counter | `command`, `result` | MongoDB 命令执行总数 |
+| `mongo_client_request_duration_seconds` | Histogram | `command`, `result` | MongoDB 命令耗时分布 |
+| `mongo_client_sessions_inflight` | Gauge | - | 当前正在进行的 MongoDB 会话数 |
+
+### 1.7 Schedule (定时任务)
+
+| 指标名称 | 类型 | Labels | 说明 |
+| :------------------------------ | :-------- | :--------------- | :------------------- |
+| `schedule_jobs_total` | Counter | `task`, `result` | 定时任务执行总数 |
+| `schedule_job_duration_seconds` | Histogram | `task`, `result` | 定时任务执行耗时分布 |
+
+### 1.8 Go Runtime (运行时)
+
+#### 基础指标
+
+| 指标名称 | 类型 | Labels | 说明 |
+| :-------------- | :---- | :-------- | :------------------ |
+| `go_info` | Gauge | `version` | Go 版本信息 |
+| `go_goroutines` | Gauge | - | 当前 Goroutine 数量 |
+| `go_threads` | Gauge | - | 当前 OS 线程数量 |
+
+#### 内存分配统计
+
+| 指标名称 | 类型 | Labels | 说明 |
+| :------------------------------ | :------ | :----- | :--------------------------------------- |
+| `go_memstats_alloc_bytes` | Gauge | - | 已分配且仍在使用的堆内存字节数 |
+| `go_memstats_alloc_bytes_total` | Counter | - | 累计分配的堆内存总字节数(包括已释放的) |
+| `go_memstats_sys_bytes` | Gauge | - | 从操作系统获取的内存总字节数 |
+| `go_memstats_lookups_total` | Counter | - | 指针查找总次数(通常为 0) |
+| `go_memstats_mallocs_total` | Counter | - | 累计内存分配次数 |
+| `go_memstats_frees_total` | Counter | - | 累计内存释放次数 |
+
+#### 堆内存统计
+
+| 指标名称 | 类型 | Labels | 说明 |
+| :-------------------------------- | :---- | :----- | :----------------------------------- |
+| `go_memstats_heap_alloc_bytes` | Gauge | - | 堆内存已分配字节数(已分配且在使用) |
+| `go_memstats_heap_sys_bytes` | Gauge | - | 从系统获取的堆内存字节数 |
+| `go_memstats_heap_idle_bytes` | Gauge | - | 堆内存空闲字节数(等待被使用) |
+| `go_memstats_heap_inuse_bytes` | Gauge | - | 堆内存正在使用的字节数 |
+| `go_memstats_heap_released_bytes` | Gauge | - | 已释放回操作系统的堆内存字节数 |
+| `go_memstats_heap_objects` | Gauge | - | 堆中已分配的对象数量 |
+| `go_memstats_next_gc_bytes` | Gauge | - | 下次 GC 触发时的堆内存目标字节数 |
+
+#### 栈内存统计
+
+| 指标名称 | 类型 | Labels | 说明 |
+| :------------------------------ | :---- | :----- | :----------------------- |
+| `go_memstats_stack_inuse_bytes` | Gauge | - | 栈分配器正在使用的字节数 |
+| `go_memstats_stack_sys_bytes` | Gauge | - | 从系统获取的栈内存字节数 |
+
+#### MSpan / MCache 统计
+
+| 指标名称 | 类型 | Labels | 说明 |
+| :------------------------------- | :---- | :----- | :----------------------------- |
+| `go_memstats_mspan_inuse_bytes` | Gauge | - | MSpan 结构体正在使用的字节数 |
+| `go_memstats_mspan_sys_bytes` | Gauge | - | 从系统获取的 MSpan 内存字节数 |
+| `go_memstats_mcache_inuse_bytes` | Gauge | - | MCache 结构体正在使用的字节数 |
+| `go_memstats_mcache_sys_bytes` | Gauge | - | 从系统获取的 MCache 内存字节数 |
+
+#### GC 统计
+
+| 指标名称 | 类型 | Labels | 说明 |
+| :--------------------------------- | :------ | :--------- | :------------------------------------------------- |
+| `go_gc_duration_seconds` | Summary | `quantile` | GC 暂停耗时分布(quantile: 0, 0.25, 0.5, 0.75, 1) |
+| `go_memstats_gc_sys_bytes` | Gauge | - | GC 元数据使用的内存字节数 |
+| `go_memstats_gc_cpu_fraction` | Gauge | - | 程序启动以来 GC 使用的 CPU 时间占比 |
+| `go_memstats_last_gc_time_seconds` | Gauge | - | 上次 GC 的 Unix 时间戳(秒) |
+
+#### 其他系统内存
+
+| 指标名称 | 类型 | Labels | 说明 |
+| :-------------------------------- | :---- | :----- | :----------------------------- |
+| `go_memstats_buck_hash_sys_bytes` | Gauge | - | 性能分析哈希表使用的内存字节数 |
+| `go_memstats_other_sys_bytes` | Gauge | - | 其他系统分配的内存字节数 |
+
+---
+
+## 2. 推荐看板指标 (Grafana PromQL)
+
+以下 PromQL 假设你有一个 Dashboard 变量 `$namespace`、`$service` 和 `$instance`。
+
+看板结构分为以下板块:
+
+- **概览** - Apdex、关键指标概览
+- **HTTP Server** - HTTP 服务器详细指标
+- **HTTP Client** - HTTP 客户端详细指标
+- **gRPC Server** - gRPC 服务器详细指标
+- **Go Runtime** - Go 运行时详细指标
+- **Database (DB)** - 数据库详细指标
+- **Redis** - Redis 详细指标
+- **MongoDB** - MongoDB 详细指标
+
+### 2.1 📊 概览 (Overview)
+
+#### Apdex Score
+
+| 面板名称 | 说明 | PromQL |
+| :-------------- | :------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| **Apdex Score** | 用户满意度 (T=250ms) | `(sum(rate(http_server_request_duration_seconds_bucket{namespace=~"$namespace",job=~"$service",instance=~"$instance", le="0.25"}[5m])) * 0.5 + sum(rate(http_server_request_duration_seconds_bucket{namespace=~"$namespace",job=~"$service",instance=~"$instance", le="1"}[5m])) * 0.5) / sum(rate(http_server_request_duration_seconds_count{namespace=~"$namespace",job=~"$service",instance=~"$instance"}[5m]))` |
+
+**Apdex 计算说明**:
+
+- **Satisfied(满意)**: 响应时间 ≤ T (250ms)
+- **Tolerating(可容忍)**: T < 响应时间 ≤ 4T (250ms < t ≤ 1s)
+- **Frustrated(失望)**: 响应时间 > 4T (> 1s)
+- **公式**: `Apdex = (Satisfied + Tolerating/2) / Total`
+- **取值范围**: 0 到 1,越接近 1 表示用户体验越好
+- **无请求时**: 当 Total = 0 时(无流量),Apdex 分数显示为 **N/A**(不可用),因为没有用户访问就无法评估用户体验
+
+**评价标准与阈值区域**(Grafana 看板会自动显示评级与颜色):
+
+| Apdex 分数 | 评级 | 颜色 | 阈值 | 用户体验 | 建议措施 |
+| :--------- | :----------------------------- | :----- | :--- | :------------- | :----------------------------- |
+| 0.94-1.00 | **Excellent** (优秀) 🟢 | 绿色 | 0.94 | 极佳,用户满意 | 保持现状,持续监控 |
+| 0.85-0.94 | **Good** (良好) 🟡 | 黄色 | 0.85 | 良好,可接受 | 关注趋势,优化慢请求 |
+| 0.70-0.85 | **Fair** (一般) 🟠 | 橙色 | 0.70 | 一般,需改进 | 排查性能瓶颈,优化关键路径 |
+| 0.50-0.70 | **Poor** (较差) 🔴 | 红色 | 0.50 | 较差,影响体验 | 立即介入,分析慢查询和依赖服务 |
+| 0.00-0.50 | **Unacceptable** (不可接受) ⚫ | 深红色 | 0.00 | 不可接受,严重 | 紧急处理,可能需要扩容或限流 |
+
+**Grafana 阈值配置**:
+
+```json
+{
+ "thresholds": {
+ "mode": "absolute",
+ "steps": [
+ { "color": "dark-red", "value": null },
+ { "color": "red", "value": 0.5 },
+ { "color": "orange", "value": 0.7 },
+ { "color": "yellow", "value": 0.85 },
+ { "color": "green", "value": 0.94 }
+ ]
+ }
+}
+```
+
+**PromQL 实现**:
+
+基于 Prometheus Histogram 的累积桶特性,Apdex 公式实现为:
+
+```promql
+(
+ sum(rate(http_server_request_duration_seconds_bucket{le="0.25"}[5m])) * 0.5 +
+ sum(rate(http_server_request_duration_seconds_bucket{le="1"}[5m])) * 0.5
+) / sum(rate(http_server_request_duration_seconds_count[5m]))
+```
+
+**注意事项**:
+
+- `le="0.25"` 桶包含 ≤250ms 的所有请求(Satisfied)
+- `le="1"` 桶包含 ≤1s 的所有请求(Satisfied + Tolerating)
+- 由于桶的累积特性,需要用 `le="1"` 的值减去 `le="0.25"` 来计算 Tolerating 部分
+- 公式简化为:`(Satisfied * 0.5 + (Satisfied + Tolerating) * 0.5) / Total`
+- 结果等价于标准 Apdex 公式:`(Satisfied + Tolerating/2) / Total`
+
+#### 关键指标卡片
+
+| 面板名称 | 说明 | PromQL |
+| :-------------------- | :--------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| **HTTP QPS** | 当前请求速率 | `sum(rate(http_server_requests_total{namespace=~"$namespace",job=~"$service",instance=~"$instance"}[1m]))` |
+| **HTTP P99 Latency** | P99 延迟 | `histogram_quantile(0.99, sum(rate(http_server_request_duration_seconds_bucket{namespace=~"$namespace",job=~"$service",instance=~"$instance"}[1m])) by (le))` |
+| **HTTP Success Rate** | 成功率 | `sum(rate(http_server_requests_total{namespace=~"$namespace",job=~"$service",instance=~"$instance", status!~"5.."}[1m])) / sum(rate(http_server_requests_total{namespace=~"$namespace",job=~"$service",instance=~"$instance"}[1m])) * 100` |
+| **Today's Peak QPS** | 今日 QPS 峰值 | `max_over_time(sum(rate(http_server_requests_total{namespace=~"$namespace",job=~"$service",instance=~"$instance"}[1m]))[1d:])` |
+| **Goroutines** | 协程总数(多实例聚合) | `sum(go_goroutines{namespace=~"$namespace",job=~"$service",instance=~"$instance"})` |
+| **Memory InUse** | 内存总量(多实例聚合) | `sum(go_memstats_heap_inuse_bytes{namespace=~"$namespace",job=~"$service",instance=~"$instance"})` |
+| **HTTP Inflight** | 并发请求数 | `sum(http_server_requests_inflight{namespace=~"$namespace",job=~"$service",instance=~"$instance"})` |
+
+**注意事项**:
+
+- 概览区域的 **Goroutines** 和 **Memory InUse** 面板使用 `sum()` 聚合显示所有实例的总和,适合快速了解整体资源使用情况
+- 如需查看单个实例的详细情况,请访问 **Go Runtime** 板块,其中的时序图按 `instance` 分组显示每个实例的详细趋势
+
+### 2.2 🌐 HTTP Server
+
+| 面板名称 | 说明 | PromQL |
+| :------------------------------------- | :----------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| **HTTP QPS by Endpoint** | 按端点的 QPS | `sum(rate(http_server_requests_total{namespace=~"$namespace",job=~"$service",instance=~"$instance"}[1m])) by (method, url)` |
+| **HTTP Latency (P99/P95) by Endpoint** | 按端点的延迟 | P99: `histogram_quantile(0.99, sum(rate(http_server_request_duration_seconds_bucket{namespace=~"$namespace",job=~"$service",instance=~"$instance"}[1m])) by (le, method, url))`
P95: `histogram_quantile(0.95, sum(rate(http_server_request_duration_seconds_bucket{namespace=~"$namespace",job=~"$service",instance=~"$instance"}[1m])) by (le, method, url))` |
+| **HTTP Status Codes** | 状态码分布 | `sum(rate(http_server_requests_total{namespace=~"$namespace",job=~"$service",instance=~"$instance"}[1m])) by (status)` |
+| **HTTP Network Traffic** | 网络流量 | Request: `sum(rate(http_server_request_size_bytes_sum{namespace=~"$namespace",job=~"$service",instance=~"$instance"}[1m]))`
Response: `sum(rate(http_server_response_size_bytes_sum{namespace=~"$namespace",job=~"$service",instance=~"$instance"}[1m]))` |
+
+### 2.3 📤 HTTP Client
+
+| 面板名称 | 说明 | PromQL |
+| :---------------------------- | :------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| **HTTP Client QPS** | 客户端请求 QPS | `sum(rate(http_client_requests_total{namespace=~"$namespace",job=~"$service",instance=~"$instance"}[1m])) by (baseUrl, url)` |
+| **HTTP Client Latency (P99)** | 客户端延迟 | `histogram_quantile(0.99, sum(rate(http_client_request_duration_seconds_bucket{namespace=~"$namespace",job=~"$service",instance=~"$instance"}[1m])) by (le, baseUrl, url))` |
+| **HTTP Client Errors** | 客户端错误 | `sum(rate(http_client_requests_total{namespace=~"$namespace",job=~"$service",instance=~"$instance",error!=""}[1m])) by (baseUrl, url)` |
+
+### 2.4 🔌 gRPC Server
+
+| 面板名称 | 说明 | PromQL |
+| :---------------------------- | :--------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| **gRPC Server QPS** | gRPC 调用量 | `sum(rate(grpc_server_requests_total{namespace=~"$namespace",job=~"$service",instance=~"$instance"}[1m])) by (method, type)` |
+| **gRPC Server Latency (P99)** | gRPC 接口延迟 | `histogram_quantile(0.99, sum(rate(grpc_server_request_duration_seconds_bucket{namespace=~"$namespace",job=~"$service",instance=~"$instance"}[1m])) by (le, method))` |
+| **gRPC Server Errors** | gRPC 错误数 | `sum(rate(grpc_server_requests_total{namespace=~"$namespace",job=~"$service",instance=~"$instance", code!="OK"}[1m])) by (method, code)` |
+| **gRPC Server Panics** | Panic 发生的次数 | `increase(grpc_server_panics_total{namespace=~"$namespace",job=~"$service",instance=~"$instance"}[1m])` |
+
+### 2.5 🐹 Go Runtime
+
+| 面板名称 | 说明 | PromQL |
+| :------------------------- | :-------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| **Goroutines** | Goroutine 数量 | `go_goroutines{namespace=~"$namespace",job=~"$service",instance=~"$instance"}` |
+| **Heap Memory** | 堆内存使用情况 | Alloc: `go_memstats_heap_alloc_bytes{namespace=~"$namespace",job=~"$service",instance=~"$instance"}`
InUse: `go_memstats_heap_inuse_bytes{namespace=~"$namespace",job=~"$service",instance=~"$instance"}`
Sys: `go_memstats_heap_sys_bytes{namespace=~"$namespace",job=~"$service",instance=~"$instance"}` |
+| **GC Duration** | GC 耗时 | Avg: `rate(go_gc_duration_seconds_sum{namespace=~"$namespace",job=~"$service",instance=~"$instance"}[1m]) / rate(go_gc_duration_seconds_count{namespace=~"$namespace",job=~"$service",instance=~"$instance"}[1m])`
Max: `go_gc_duration_seconds{namespace=~"$namespace",job=~"$service",instance=~"$instance",quantile="1"}` |
+| **GC Rate** | GC 执行频率 | `rate(go_gc_duration_seconds_count{namespace=~"$namespace",job=~"$service",instance=~"$instance"}[1m])` |
+| **GC CPU Fraction** | GC CPU 占用比例 | `go_memstats_gc_cpu_fraction{namespace=~"$namespace",job=~"$service",instance=~"$instance"}` |
+| **Memory Allocation Rate** | 内存分配速率 | `rate(go_memstats_alloc_bytes_total{namespace=~"$namespace",job=~"$service",instance=~"$instance"}[1m])` |
+
+### 2.6 🔴 Redis
+
+| 面板名称 | 说明 | PromQL |
+| :------------------------------ | :------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
+| **Redis Command QPS** | 命令 QPS | `sum(rate(redis_client_requests_total{namespace=~"$namespace",job=~"$service",instance=~"$instance"}[1m])) by (cmd)` |
+| **Redis Command Latency (P99)** | 命令延迟 | `histogram_quantile(0.99, sum(rate(redis_client_request_duration_seconds_bucket{namespace=~"$namespace",job=~"$service",instance=~"$instance"}[1m])) by (le, cmd))` |
+| **Redis Command Errors** | 命令错误 | `sum(rate(redis_client_requests_total{namespace=~"$namespace",job=~"$service",instance=~"$instance",result!="success"}[1m])) by (cmd)` |
+
+### 2.7 🗄️ Database (DB)
+
+| 面板名称 | 说明 | PromQL |
+| :------------------------- | :--------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| **DB Connection Pool** | 连接池状态 | Open: `db_client_connections_open{namespace=~"$namespace",job=~"$service",instance=~"$instance"}`
InUse: `db_client_connections_in_use{namespace=~"$namespace",job=~"$service",instance=~"$instance"}`
Idle: `db_client_connections_idle{namespace=~"$namespace",job=~"$service",instance=~"$instance"}` |
+| **DB Query Latency (P99)** | 查询延迟 | `histogram_quantile(0.99, sum(rate(db_client_request_duration_seconds_bucket{namespace=~"$namespace",job=~"$service",instance=~"$instance"}[1m])) by (le, type, database))` |
+| **DB Query QPS** | 查询 QPS | `sum(rate(db_client_request_duration_seconds_count{namespace=~"$namespace",job=~"$service",instance=~"$instance"}[1m])) by (type, database)` |
+| **DB Query Errors** | 查询错误 | `sum(rate(db_client_request_duration_seconds_count{namespace=~"$namespace",job=~"$service",instance=~"$instance",result="error"}[1m])) by (type, database)` |
+
+### 2.8 🍃 MongoDB
+
+| 面板名称 | 说明 | PromQL |
+| :-------------------------------- | :------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| **MongoDB Command QPS** | 命令 QPS | `sum(rate(mongo_client_requests_total{namespace=~"$namespace",job=~"$service",instance=~"$instance"}[1m])) by (command)` |
+| **MongoDB Command Latency (P99)** | 命令延迟 | `histogram_quantile(0.99, sum(rate(mongo_client_request_duration_seconds_bucket{namespace=~"$namespace",job=~"$service",instance=~"$instance"}[1m])) by (le, command))` |
+| **MongoDB Command Errors** | 命令错误 | `sum(rate(mongo_client_requests_total{namespace=~"$namespace",job=~"$service",instance=~"$instance",result="error"}[1m])) by (command)` |
+
+---
+
+## 3. 告警规则 (Alerting Rules)
+
+以下是基于 Prometheus 的推荐告警规则配置,涵盖了可用性、延迟、错误率、资源饱和度及运行时异常。
+
+```yaml
+groups:
+ - name: box-server-alerts
+ rules:
+ # ==========================================================
+ # 1. 可用性与错误率 (Availability & Errors) - Severity: Critical
+ # ==========================================================
+ - alert: HighHttpErrorRate
+ expr: |
+ (sum(rate(http_server_requests_total{status=~"5.."}[1m]))
+ /
+ sum(rate(http_server_requests_total[1m]))) > 0.05
+ for: 2m
+ labels:
+ severity: critical
+ annotations:
+ summary: "High HTTP error rate ({{ $value | humanizePercentage }})"
+ description: "HTTP 5xx error rate is above 5% for the last 2 minutes."
+
+ - alert: HighGrpcErrorRate
+ expr: |
+ (sum(rate(grpc_server_requests_total{code!="OK"}[1m]))
+ /
+ sum(rate(grpc_server_requests_total[1m]))) > 0.05
+ for: 2m
+ labels:
+ severity: critical
+ annotations:
+ summary: "High gRPC error rate ({{ $value | humanizePercentage }})"
+ description: "gRPC error rate is above 5% for the last 2 minutes."
+
+ - alert: HighDbErrorRate
+ expr: |
+ (sum(rate(db_client_request_duration_seconds_count{result="error"}[1m]))
+ /
+ sum(rate(db_client_request_duration_seconds_count[1m]))) > 0.05
+ for: 2m
+ labels:
+ severity: critical
+ annotations:
+ summary: "High DB Error Rate ({{ $value | humanizePercentage }})"
+ description: "Database query error rate is above 5%."
+
+ - alert: HighRedisErrorRate
+ expr: |
+ (sum(rate(redis_client_requests_total{result!="success"}[1m]))
+ /
+ sum(rate(redis_client_requests_total[1m]))) > 0.05
+ for: 2m
+ labels:
+ severity: critical
+ annotations:
+ summary: "High Redis Error Rate ({{ $value | humanizePercentage }})"
+ description: "Redis command error rate is above 5%."
+
+ - alert: HighMongoErrorRate
+ expr: |
+ (sum(rate(mongo_client_requests_total{result="error"}[1m]))
+ /
+ sum(rate(mongo_client_requests_total[1m]))) > 0.05
+ for: 2m
+ labels:
+ severity: critical
+ annotations:
+ summary: "High MongoDB Error Rate ({{ $value | humanizePercentage }})"
+ description: "MongoDB command error rate is above 5%."
+
+ - alert: GrpcServerPanic
+ expr: increase(grpc_server_panics_total[1m]) > 0
+ for: 0m
+ labels:
+ severity: critical
+ annotations:
+ summary: "gRPC Server Panic detected"
+ description: "gRPC service recovered from a panic."
+
+ - alert: ScheduleJobFailed
+ expr: increase(schedule_jobs_total{result!="success"}[1m]) > 0
+ for: 0m
+ labels:
+ severity: warning
+ annotations:
+ summary: "Schedule Job Failed"
+ description: "Scheduled job {{ $labels.task }} failed execution."
+
+ # ==========================================================
+ # 2. 延迟与体验 (Latency & UX) - Severity: Warning
+ # ==========================================================
+ - alert: LowApdexScore
+ expr: |
+ (
+ sum(rate(http_server_request_duration_seconds_bucket{le="0.25"}[5m])) * 0.5 +
+ sum(rate(http_server_request_duration_seconds_bucket{le="1"}[5m])) * 0.5
+ )
+ /
+ sum(rate(http_server_request_duration_seconds_count[5m])) < 0.7
+ for: 5m
+ labels:
+ severity: warning
+ annotations:
+ summary: 'Low Apdex Score ({{ $value | printf "%.2f" }})'
+ description: "User satisfaction score (Apdex) is below 0.7 (Fair)."
+
+ - alert: HighHttpLatency
+ expr: |
+ histogram_quantile(0.99, sum(rate(http_server_request_duration_seconds_bucket[5m])) by (le)) > 1.0
+ for: 5m
+ labels:
+ severity: warning
+ annotations:
+ summary: "High HTTP Latency ({{ $value }}s)"
+ description: "HTTP P99 latency is above 1s for the last 5 minutes."
+
+ - alert: HighRedisLatency
+ expr: |
+ histogram_quantile(0.99, sum(rate(redis_client_request_duration_seconds_bucket[5m])) by (le)) > 0.1
+ for: 5m
+ labels:
+ severity: warning
+ annotations:
+ summary: "High Redis Latency ({{ $value }}s)"
+ description: "Redis P99 latency is above 100ms for the last 5 minutes."
+
+ - alert: HighDbLatency
+ expr: |
+ histogram_quantile(0.99, sum(rate(db_client_request_duration_seconds_bucket[5m])) by (le)) > 0.5
+ for: 5m
+ labels:
+ severity: warning
+ annotations:
+ summary: "High DB Latency ({{ $value }}s)"
+ description: "Database P99 latency is above 500ms for the last 5 minutes."
+
+ - alert: HighMongoLatency
+ expr: |
+ histogram_quantile(0.99, sum(rate(mongo_client_request_duration_seconds_bucket[5m])) by (le)) > 0.5
+ for: 5m
+ labels:
+ severity: warning
+ annotations:
+ summary: "High MongoDB Latency ({{ $value }}s)"
+ description: "MongoDB P99 latency is above 500ms for the last 5 minutes."
+
+ # ==========================================================
+ # 3. 资源饱和度 (Saturation) - Severity: Warning
+ # ==========================================================
+ - alert: DBConnectionPoolSaturation
+ expr: |
+ sum(db_client_connections_in_use) by (database)
+ /
+ sum(db_client_connections_max_open) by (database) > 0.8
+ for: 5m
+ labels:
+ severity: warning
+ annotations:
+ summary: "DB Pool Saturation ({{ $value | humanizePercentage }})"
+ description: "Database connection pool usage is above 80%."
+
+ # ==========================================================
+ # 4. Go Runtime 异常 (Runtime) - Severity: Warning/Critical
+ # ==========================================================
+ - alert: HighGoroutineCount
+ expr: go_goroutines > 10000
+ for: 5m
+ labels:
+ severity: warning
+ annotations:
+ summary: "High Goroutine Count ({{ $value }})"
+ description: "Goroutine count exceeds 10,000."
+
+ - alert: GoroutineLeak
+ expr: rate(go_goroutines[5m]) > 100
+ for: 10m
+ labels:
+ severity: critical
+ annotations:
+ summary: "Potential Goroutine Leak"
+ description: "Goroutine count is increasing rapidly (>100/s rate)."
+
+ - alert: HighThreadCount
+ expr: go_threads > 500
+ for: 5m
+ labels:
+ severity: warning
+ annotations:
+ summary: "High Thread Count ({{ $value }})"
+ description: "OS thread count is above 500, possible thread leak."
+
+ - alert: HighMemoryUsage
+ expr: go_memstats_heap_inuse_bytes > 1e9
+ for: 5m
+ labels:
+ severity: warning
+ annotations:
+ summary: "High Memory Usage ({{ $value | humanize1024 }})"
+ description: "Heap in-use memory is above 1GB."
+
+ - alert: MemoryLeak
+ expr: rate(go_memstats_heap_alloc_bytes[5m]) > 1e6
+ for: 15m
+ labels:
+ severity: critical
+ annotations:
+ summary: "Potential Memory Leak"
+ description: "Heap allocation is growing rapidly (>1MB/s rate)."
+
+ - alert: HighGCDuration
+ expr: go_gc_duration_seconds{quantile="1"} > 1
+ for: 1m
+ labels:
+ severity: warning
+ annotations:
+ summary: "High GC Duration ({{ $value }}s)"
+ description: "Max GC duration is above 1s."
+
+ - alert: HighGCRate
+ expr: rate(go_gc_duration_seconds_count[1m]) > 5
+ for: 5m
+ labels:
+ severity: warning
+ annotations:
+ summary: "High GC Rate ({{ $value }}/s)"
+ description: "GC is running more than 5 times per second."
+
+ - alert: HighGCCPUFraction
+ expr: go_memstats_gc_cpu_fraction > 0.3
+ for: 5m
+ labels:
+ severity: warning
+ annotations:
+ summary: "High GC CPU Usage ({{ $value | humanizePercentage }})"
+ description: "GC is consuming more than 30% of CPU time."
+```
+
+---
+
+## 4. Go Runtime 指标解读
+
+### 4.1 内存指标关系
+
+```
+go_memstats_sys_bytes (从系统获取的总内存)
+├── go_memstats_heap_sys_bytes (堆内存)
+│ ├── go_memstats_heap_inuse_bytes (使用中的堆内存)
+│ │ └── go_memstats_heap_alloc_bytes (已分配的堆内存)
+│ └── go_memstats_heap_idle_bytes (空闲堆内存)
+│ └── go_memstats_heap_released_bytes (已释放给 OS 的内存)
+├── go_memstats_stack_sys_bytes (栈内存)
+├── go_memstats_mspan_sys_bytes (MSpan 元数据)
+├── go_memstats_mcache_sys_bytes (MCache 元数据)
+├── go_memstats_buck_hash_sys_bytes (性能分析哈希表)
+├── go_memstats_gc_sys_bytes (GC 元数据)
+└── go_memstats_other_sys_bytes (其他系统内存)
+```
+
+### 4.2 关键指标说明
+
+#### Goroutine 监控
+
+- **正常范围**: 取决于业务负载,通常在 100-1000 之间
+- **泄漏迹象**: 持续增长且不下降,或增长速率过快 (>100/s)
+- **优化建议**: 确保所有 goroutine 都有退出机制,避免永久阻塞
+
+#### 内存监控
+
+- **heap_alloc**: 实际使用的堆内存,频繁上下波动是正常的(GC 会回收)
+- **heap_inuse**: 包含已分配和待回收的内存,通常比 heap_alloc 大
+- **heap_sys**: 从系统申请的堆内存,增长后不会轻易释放
+- **泄漏迹象**: `heap_alloc` 持续增长、`heap_sys` 不断扩大且 GC 无法回收
+
+#### GC 监控
+
+- **正常 GC 耗时**: P99 应在 10-100ms 之内(依赖堆大小)
+- **正常 GC 频率**: 每分钟几次到几十次(依赖分配速率)
+- **GC CPU 占比**: 通常在 5%-25% 之间
+- **异常情况**:
+ - GC 耗时过长 (>1s): 可能堆太大或存在大对象
+ - GC 频率过高 (>5 次/s): 分配速率过快,考虑对象池复用
+ - GC CPU 占比过高 (>30%): 严重影响业务性能
+
+## 5. 常见问题诊断 (Troubleshooting)
+
+### 5.1 Go Runtime 问题
+
+#### 问题 1: Goroutine 泄漏
+
+**症状**: `go_goroutines` 持续增长
+**排查**:
+
+```promql
+# 查看 Goroutine 增长速率
+rate(go_goroutines[5m])
+
+# 对比不同实例
+go_goroutines by (instance)
+```
+
+**解决方案**:
+
+- 使用 `pprof` 工具分析 goroutine 堆栈
+- 检查 channel 是否正确关闭
+- 确保 context 取消信号正确传递
+
+#### 问题 2: 内存泄漏
+
+**症状**: `go_memstats_heap_alloc_bytes` 持续增长,GC 无法回收
+**排查**:
+
+```promql
+# 查看内存分配速率
+rate(go_memstats_alloc_bytes_total[1m])
+
+# 查看存活对象数
+go_memstats_mallocs_total - go_memstats_frees_total
+```
+
+**解决方案**:
+
+- 使用 `pprof` 工具分析内存分配
+- 检查是否有全局变量持续引用对象
+- 排查 map、slice 等容器是否及时清理
+
+#### 问题 3: GC 压力过大
+
+**症状**: `go_gc_duration_seconds` 过高或 `go_memstats_gc_cpu_fraction` 过高
+**排查**:
+
+```promql
+# GC 执行频率
+rate(go_gc_duration_seconds_count[1m])
+
+# GC 平均耗时
+rate(go_gc_duration_seconds_sum[1m]) / rate(go_gc_duration_seconds_count[1m])
+```
+
+**解决方案**:
+
+- 优化内存分配,使用对象池(sync.Pool)
+- 减少小对象分配,批量处理
+- 调大 `GOGC` 环境变量(默认 100)
+- 考虑使用 Go 1.19+ 的 Soft Memory Limit 特性
+
+#### 问题 4: 线程数异常增长
+
+**症状**: `go_threads` 持续增长,甚至导致程序 Crash (达到系统限制)。
+**排查**:
+
+```promql
+# 查看线程数趋势
+go_threads
+```
+
+**原因**:
+
+- Go runtime 在进行系统调用(System Call)或 CGO 调用时,如果被阻塞,会创建新的 OS 线程来调度其他 Goroutine。
+- 典型的阻塞场景:DNS 查询慢、文件 IO 阻塞、锁竞争。
+
+**解决方案**:
+
+- 优化阻塞的系统调用,使用非阻塞 IO
+- 限制并发度
+- 检查 CGO 代码逻辑
+
+### 5.2 中间件与服务问题
+
+#### 问题 5: 数据库连接池耗尽
+
+**症状**: 数据库操作延迟增加,出现 `driver: bad connection` 或连接等待超时错误。
+**排查**:
+
+```promql
+# 查看连接池使用率
+sum(db_client_connections_in_use) by (database) / sum(db_client_connections_max_open) by (database)
+
+# 查看连接等待次数
+rate(db_client_connections_wait_total[1m])
+```
+
+**解决方案**:
+
+- 调大 `SetMaxOpenConns`(需考虑 DB 服务端承载能力)
+- 检查是否存在慢 SQL 长期占用连接
+- 确保事务在所有路径(包括错误处理)中都能正确 `Commit` 或 `Rollback`
+
+#### 问题 6: Redis 延迟抖动
+
+**症状**: `redis_client_request_duration_seconds` P99 偶尔飙升,影响接口响应。
+**排查**:
+
+```promql
+# 按命令查看延迟
+histogram_quantile(0.99, sum(rate(redis_client_request_duration_seconds_bucket[5m])) by (le, cmd))
+```
+
+**解决方案**:
+
+- 检查是否使用了 `KEYS`、`HGETALL` 等 O(N) 复杂度的命令
+- 检查是否存在 Big Key(Value 过大),导致网络传输和序列化耗时增加
+- 检查 Redis 服务端是否有慢查询日志
+
+#### 问题 7: Context Cancelled / Timeout
+
+**症状**: 客户端收到大量 `context canceled` 或 `deadline exceeded` 错误。
+**排查**:
+
+```promql
+# 查看 gRPC/HTTP 错误码分布
+sum(rate(grpc_server_requests_total{code="Canceled"}[1m]))
+sum(rate(grpc_server_requests_total{code="DeadlineExceeded"}[1m]))
+```
+
+**原因**:
+
+- 上游服务设置的超时时间过短
+- 当前服务处理过慢(检查延迟指标)
+- 客户端在请求完成前主动断开了连接
+
+**解决方案**:
+
+- 检查链路超时配置,确保下游超时时间 < 上游超时时间
+- 优化接口性能
+- 增加重试机制(需配合指数退避)
+
+#### 问题 8: 定时任务堆积
+
+**症状**: `schedule_jobs_total` 正常,但任务执行时间超过了调度间隔,导致上一轮未结束下一轮又开始。
+**排查**:
+
+```promql
+# 查看任务执行耗时
+histogram_quantile(0.99, sum(rate(schedule_job_duration_seconds_bucket[5m])) by (le, task))
+```
+
+**解决方案**:
+
+- 增加分布式锁,确保同一时刻只有一个实例执行任务
+- 优化任务逻辑,减少单次执行时间
+- 调整调度间隔或使用消息队列异步处理
diff --git a/go.mod b/go.mod
index 0125223..ca9495e 100644
--- a/go.mod
+++ b/go.mod
@@ -1,11 +1,11 @@
module github.com/boxgo/box
-go 1.18
+go 1.22.0
require (
github.com/BurntSushi/toml v0.4.1
github.com/Shopify/sarama v1.27.2
- github.com/boxgo/redisstore/v2 v2.0.0
+ github.com/boxgo/redisstore/v3 v3.0.1
github.com/fsnotify/fsnotify v1.4.9
github.com/ghodss/yaml v1.0.0
github.com/gin-contrib/sessions v0.0.3
@@ -14,30 +14,38 @@ require (
github.com/go-playground/locales v0.14.1
github.com/go-playground/universal-translator v0.18.1
github.com/go-playground/validator/v10 v10.20.0
- github.com/go-redis/redis/v8 v8.6.0
github.com/gorilla/sessions v1.2.0
- github.com/grpc-ecosystem/grpc-gateway/v2 v2.4.0
+ github.com/grpc-ecosystem/grpc-gateway/v2 v2.25.1
github.com/imdario/mergo v0.3.9
github.com/jordan-wright/email v4.0.1-0.20210109023952-943e75fe5223+incompatible
github.com/json-iterator/go v1.1.12
github.com/nicksnyder/go-i18n/v2 v2.1.2
github.com/olekukonko/tablewriter v0.0.5-0.20200416053754-163badb3bac6
github.com/prometheus/client_golang v1.6.0
+ github.com/redis/go-redis/extra/redisotel/v9 v9.7.0
+ github.com/redis/go-redis/v9 v9.7.1
github.com/robfig/cron v1.2.0
github.com/streadway/amqp v1.0.0
github.com/teris-io/shortid v0.0.0-20171029131806-771a37caa5cf
+ github.com/uptrace/opentelemetry-go-extra/otelgorm v0.1.0
go.mongodb.org/mongo-driver v1.4.1
+ go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.59.0
+ go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.59.0
+ go.opentelemetry.io/otel v1.34.0
+ go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0
+ go.opentelemetry.io/otel/sdk v1.34.0
+ go.opentelemetry.io/otel/trace v1.34.0
go.uber.org/automaxprocs v1.3.0
go.uber.org/zap v1.16.0
- golang.org/x/net v0.25.0
- golang.org/x/sync v0.1.0
- golang.org/x/text v0.15.0
- google.golang.org/genproto v0.0.0-20210426193834-eac7f76ac494
- google.golang.org/grpc v1.37.0
- google.golang.org/protobuf v1.34.1
+ golang.org/x/net v0.34.0
+ golang.org/x/sync v0.10.0
+ golang.org/x/text v0.21.0
+ google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f
+ google.golang.org/grpc v1.69.4
+ google.golang.org/protobuf v1.36.3
gorm.io/driver/mysql v1.1.0
gorm.io/driver/postgres v1.1.0
- gorm.io/gorm v1.21.10
+ gorm.io/gorm v1.21.16
moul.io/http2curl v1.0.0
)
@@ -46,7 +54,8 @@ require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/bytedance/sonic v1.11.6 // indirect
github.com/bytedance/sonic/loader v0.1.1 // indirect
- github.com/cespare/xxhash/v2 v2.1.1 // indirect
+ github.com/cenkalti/backoff/v4 v4.3.0 // indirect
+ github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/cloudwego/base64x v0.1.4 // indirect
github.com/cloudwego/iasm v0.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
@@ -54,14 +63,18 @@ require (
github.com/eapache/go-resiliency v1.2.0 // indirect
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 // indirect
github.com/eapache/queue v1.1.0 // indirect
+ github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
+ github.com/go-logr/logr v1.4.2 // indirect
+ github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-pg/zerochecker v0.2.0 // indirect
github.com/go-sql-driver/mysql v1.6.0 // indirect
github.com/go-stack/stack v1.8.0 // indirect
github.com/goccy/go-json v0.10.2 // indirect
- github.com/golang/protobuf v1.5.2 // indirect
+ github.com/golang/protobuf v1.5.4 // indirect
github.com/golang/snappy v0.0.1 // indirect
+ github.com/google/uuid v1.6.0 // indirect
github.com/gorilla/context v1.1.1 // indirect
github.com/gorilla/securecookie v1.1.1 // indirect
github.com/hashicorp/go-uuid v1.0.2 // indirect
@@ -86,6 +99,8 @@ require (
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
+ github.com/onsi/ginkgo v1.15.0 // indirect
+ github.com/onsi/gomega v1.10.5 // indirect
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
github.com/pierrec/lz4 v2.5.2+incompatible // indirect
github.com/pkg/errors v0.9.1 // indirect
@@ -93,24 +108,29 @@ require (
github.com/prometheus/common v0.9.1 // indirect
github.com/prometheus/procfs v0.1.3 // indirect
github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 // indirect
+ github.com/redis/go-redis/extra/rediscmd/v9 v9.7.0 // indirect
github.com/tidwall/pretty v1.0.1 // indirect
github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.2.12 // indirect
+ github.com/uptrace/opentelemetry-go-extra/otelsql v0.3.2 // indirect
github.com/vmihailenco/bufpool v0.1.11 // indirect
github.com/vmihailenco/msgpack/v5 v5.3.4 // indirect
github.com/vmihailenco/tagparser v0.1.2 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c // indirect
github.com/xdg/stringprep v1.0.0 // indirect
- go.opentelemetry.io/otel v0.17.0 // indirect
- go.opentelemetry.io/otel/metric v0.17.0 // indirect
- go.opentelemetry.io/otel/trace v0.17.0 // indirect
+ go.opentelemetry.io/auto/sdk v1.1.0 // indirect
+ go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 // indirect
+ go.opentelemetry.io/otel/metric v1.34.0 // indirect
+ go.opentelemetry.io/otel/sdk/metric v1.34.0 // indirect
+ go.opentelemetry.io/proto/otlp v1.5.0 // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
golang.org/x/arch v0.8.0 // indirect
- golang.org/x/crypto v0.23.0 // indirect
- golang.org/x/sys v0.20.0 // indirect
+ golang.org/x/crypto v0.32.0 // indirect
+ golang.org/x/sys v0.29.0 // indirect
+ google.golang.org/genproto/googleapis/api v0.0.0-20250115164207-1a7da9e5054f // indirect
gopkg.in/jcmturner/aescts.v1 v1.0.1 // indirect
gopkg.in/jcmturner/dnsutils.v1 v1.0.1 // indirect
gopkg.in/jcmturner/gokrb5.v7 v7.5.0 // indirect
diff --git a/go.sum b/go.sum
index 03b239d..6e2a2b0 100644
--- a/go.sum
+++ b/go.sum
@@ -1,45 +1,11 @@
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
-cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU=
-cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU=
-cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY=
-cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc=
-cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0=
-cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To=
-cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4=
-cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M=
-cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc=
-cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk=
-cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs=
-cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc=
-cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY=
-cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
-cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=
-cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc=
-cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg=
-cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc=
-cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ=
-cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
-cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk=
-cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk=
-cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=
-cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw=
-cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA=
-cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU=
-cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=
-cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos=
-cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk=
-cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
-cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
-dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/toml v0.4.1 h1:GaI7EiDXDRfa8VshkTj7Fym7ha+y8/XxIgD2okUIjLw=
github.com/BurntSushi/toml v0.4.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
-github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc=
github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=
-github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=
github.com/Shopify/sarama v1.27.2 h1:1EyY1dsxNDUQEv0O/4TsjosHI2CgB1uo9H/v56xzTxc=
github.com/Shopify/sarama v1.27.2/go.mod h1:g5s5osgELxgM+Md9Qni9rzo7Rbt+vvFQI4bt/Mc93II=
@@ -53,7 +19,6 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/alexbrainman/sspi v0.0.0-20180613141037-e580b900e9f5 h1:P5U+E4x5OkVEKQDklVPmzs71WM56RTTRqV4OrDC//Y4=
github.com/alexbrainman/sspi v0.0.0-20180613141037-e580b900e9f5/go.mod h1:976q2ETgjT2snVCf2ZaBnyBbVoPERGjUz+0sofzEfro=
-github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
@@ -69,51 +34,45 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
-github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d/go.mod h1:6QX/PXZ00z/TKoufEY6K/a0k6AhaJrQKdFe6OfVXsa4=
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
-github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84=
github.com/boj/redistore v0.0.0-20180917114910-cd5dcc76aeff/go.mod h1:+RTT1BOk5P97fT2CiHkbFQwkK3mjsFAP6zCYV2aXtjw=
-github.com/boxgo/redisstore/v2 v2.0.0 h1:vCxHheElEc4br2oxmNp0b4XRMInKekEEu0YPawBmm00=
-github.com/boxgo/redisstore/v2 v2.0.0/go.mod h1:qTqb71Sj2JtSEkKRbGr19gswsWnHmL78xCDUROvk5Hw=
+github.com/boxgo/redisstore/v3 v3.0.1 h1:O9I2FDLW8+op8WjQDrXGS6Xv0zWehyJMhfNzNs9Idfo=
+github.com/boxgo/redisstore/v3 v3.0.1/go.mod h1:gkA2zPHjU3Nf7EQNi5EYYqeugsoYiaV/Cf60BEqeZJU=
github.com/bradfitz/gomemcache v0.0.0-20190329173943-551aad21a668/go.mod h1:H0wQNHz2YrLsuXOZozoeDmnHXkNCRmMW0gwFWDfEZDA=
github.com/bradleypeabody/gorilla-sessions-memcache v0.0.0-20181103040241-659414f458e1/go.mod h1:dkChI7Tbtx7H1Tj7TqGSZMOeGpMP5gLHtjroHd4agiI=
-github.com/bufbuild/buf v0.37.0/go.mod h1:lQ1m2HkIaGOFba6w/aC3KYBHhKEOESP3gaAEpS3dAFM=
+github.com/bsm/ginkgo/v2 v2.12.0 h1:Ny8MWAHyOepLGlLKYmXG4IEkioBysk6GpaRTLC8zwWs=
+github.com/bsm/ginkgo/v2 v2.12.0/go.mod h1:SwYbGRRDovPVboqFv0tPTcG1sN61LM1Z4ARdbAV9g4c=
+github.com/bsm/gomega v1.27.10 h1:yeMWxP2pV2fG3FgAODIY8EiRE3dy0aeFYt4l7wh6yKA=
+github.com/bsm/gomega v1.27.10/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0=
github.com/bytedance/sonic v1.11.6 h1:oUp34TzMlL+OY1OUWxHqsdkgC/Zfc85zGqw9siXjrc0=
github.com/bytedance/sonic v1.11.6/go.mod h1:LysEHSvpvDySVdC2f87zGWf6CIKJcAvqab1ZaiQtds4=
github.com/bytedance/sonic/loader v0.1.1 h1:c+e5Pt1k/cy5wMveRDyk2X4B9hF4g7an8N3zCYjJFNM=
github.com/bytedance/sonic/loader v0.1.1/go.mod h1:ncP89zfokxS5LZrJxl5z0UJcsk4M4yY2JpfqGeCtNLU=
github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ=
github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=
+github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=
+github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
-github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
-github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY=
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
-github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
-github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
-github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
+github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
+github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
+github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cloudwego/base64x v0.1.4 h1:jwCgWpFanWmN8xoIUHa2rtzmkd5J2plF/dnLS6Xd/0Y=
github.com/cloudwego/base64x v0.1.4/go.mod h1:0zlkT4Wn5C6NdauXdJRhSKRlJvmclQ1hhJgA0rcu/8w=
github.com/cloudwego/iasm v0.2.0 h1:1KNIy1I1H9hNNFEEH3DVnI4UujN+1zjpuk6gwHLTssg=
github.com/cloudwego/iasm v0.2.0/go.mod h1:8rXZaNYT2n95jn+zTI1sDr+IgcD2GVs0nlbbQPiEFhY=
-github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
-github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I=
github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ=
github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI=
-github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk=
-github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
-github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
-github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
-github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -122,7 +81,6 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
-github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=
github.com/eapache/go-resiliency v1.2.0 h1:v7g92e/KSN71Rq7vSThKaWIq68fL4YHvWyiUKorFR1Q=
@@ -133,13 +91,11 @@ github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc=
github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I=
github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=
github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g=
-github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
-github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
-github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
-github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
+github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
+github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw=
github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g=
github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4=
@@ -161,20 +117,23 @@ github.com/gin-gonic/gin v1.5.0/go.mod h1:Nd6IXA8m5kNZdNEHMBd93KT+mdY3+bewLgRvmC
github.com/gin-gonic/gin v1.10.0 h1:nTuyha1TYqgedzytsKYqna+DfLos46nTv2ygFy86HFU=
github.com/gin-gonic/gin v1.10.0/go.mod h1:4PMNQiOhvDRa013RKVbsiNwoyezlm2rm0uX/T7kzp5Y=
github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q=
-github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
-github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
-github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o=
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
+github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
+github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
+github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
+github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
+github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
github.com/go-pg/pg/v10 v10.10.6 h1:1vNtPZ4Z9dWUw/TjJwOfFUbF5nEq1IkR6yG8Mq/Iwso=
github.com/go-pg/pg/v10 v10.10.6/go.mod h1:GLmFXufrElQHf5uzM3BQlcfwV3nsgnHue5uzjQ6Nqxg=
github.com/go-pg/zerochecker v0.2.0 h1:pp7f72c3DobMWOb2ErtZsnrPaSvHd2W4o9//8HtF4mU=
github.com/go-pg/zerochecker v0.2.0/go.mod h1:NJZ4wKL0NmTtz0GKCoJ8kym6Xn/EQzXRl2OnAe7MmDo=
github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
+github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
github.com/go-playground/locales v0.12.1/go.mod h1:IUMDtCfWo/w/mtMfIE/IG2K+Ey3ygWanZIBtBW0W2TM=
github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=
github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
@@ -183,8 +142,6 @@ github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJn
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
github.com/go-playground/validator/v10 v10.20.0 h1:K9ISHbSaI0lyB2eWMPJo+kOS/FBExVwjEviJTixqxL8=
github.com/go-playground/validator/v10 v10.20.0/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM=
-github.com/go-redis/redis/v8 v8.6.0 h1:swqbqOrxaPztsj2Hf1p94M3YAgl7hYEpcw21z299hh8=
-github.com/go-redis/redis/v8 v8.6.0/go.mod h1:DQ9q4Rk2HtwkrwVrdgmphoOQDMfpvcd/nHEwRsicg8s=
github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE=
@@ -217,34 +174,19 @@ github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/V
github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw=
github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=
github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
-github.com/gofrs/flock v0.8.0/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU=
+github.com/gofrs/uuid v3.2.0+incompatible h1:y12jRkkFxsd7GpqdSZ+/KCs/fJbqpEXSGd4+jfEaewE=
github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
-github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw=
-github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s=
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
-github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
-github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
-github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
-github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
-github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
-github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=
-github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
-github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
-github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw=
-github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
-github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
-github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
-github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk=
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
@@ -253,9 +195,8 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
-github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
-github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
-github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
+github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
+github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4=
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
@@ -266,32 +207,18 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
+github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
-github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
-github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
-github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
-github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
-github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
-github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
-github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
-github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
-github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
-github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
-github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
-github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
+github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
+github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
-github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf/go.mod h1:cuNKsD1zp2v6XfE/orVX2QE1LC+i254ceGcVeDT3pTU=
github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8=
github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
@@ -303,17 +230,12 @@ github.com/gorilla/sessions v1.1.3/go.mod h1:8KCfur6+4Mqcc6S0FEfKuN15Vl5MgXW92AE
github.com/gorilla/sessions v1.2.0 h1:S7P+1Hm5V/AT9cjEcUD5uDaQSX0OE577aCXgoaKpYbQ=
github.com/gorilla/sessions v1.2.0/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM=
github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
-github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
-github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
-github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
-github.com/grpc-ecosystem/grpc-gateway/v2 v2.4.0 h1:R+ZwHcCaBVMLvCQzo/lhJCYkjkL7G506oi2N8SIob/g=
-github.com/grpc-ecosystem/grpc-gateway/v2 v2.4.0/go.mod h1:IOyTYjcIO0rkmnGBfJTL0NJ11exy/Tc2QEuv7hCXp24=
-github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q=
+github.com/grpc-ecosystem/grpc-gateway/v2 v2.25.1 h1:VNqngBF40hVlDloBruUehVYC3ArSgIyScOAyMRqBxRg=
+github.com/grpc-ecosystem/grpc-gateway/v2 v2.25.1/go.mod h1:RBRO7fro65R6tjKzYgLAFo0t1QEXY1Dp+i/bvpRiqiQ=
github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE=
-github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8=
github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8=
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
@@ -331,14 +253,12 @@ github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09
github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90=
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
-github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg=
-github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/imdario/mergo v0.3.9 h1:UauaLniWCFHWd+Jp9oCEkTBj8VO/9DKg3PV3VCNMDIg=
github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
@@ -405,7 +325,6 @@ github.com/jcmturner/gokrb5/v8 v8.2.0 h1:lzPl/30ZLkTveYsYZPKMcgXc8MbnE6RsTd4F9Kg
github.com/jcmturner/gokrb5/v8 v8.2.0/go.mod h1:T1hnNppQsBtxW0tCHMHTkAt8n/sABdzZgZdoFrZaZNM=
github.com/jcmturner/rpc/v2 v2.0.2 h1:gMB4IwRXYsWw4Bc6o/az2HJgFUA1ffSh90i26ZJ6Xl0=
github.com/jcmturner/rpc/v2 v2.0.2/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJki3ELg/Hc=
-github.com/jhump/protoreflect v1.8.1/go.mod h1:7GcYQDdMU/O/BBrl/cX6PNHpXh6cenjd8pneu5yW7Tg=
github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E=
github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc=
github.com/jinzhu/now v1.1.2/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8=
@@ -423,8 +342,6 @@ github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u
github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
-github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
-github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w=
@@ -440,14 +357,14 @@ github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYs
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
github.com/klauspost/cpuid/v2 v2.2.7 h1:ZWSB3igEs+d0qvnxR/ZBzXVmxkgt8DdzP6m9pfuVLDM=
github.com/klauspost/cpuid/v2 v2.2.7/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
-github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs=
github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
-github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
+github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
+github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
@@ -465,7 +382,6 @@ github.com/lib/pq v1.6.0/go.mod h1:4vXEAYvW1fRQ2/FhZ78H73A60MHw1geSm145z2mdY1g=
github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM=
github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4=
github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ=
-github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE=
github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0=
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
@@ -491,7 +407,6 @@ github.com/memcachier/mc v2.0.1+incompatible/go.mod h1:7bkvFE61leUBvXz+yxsOnGBQS
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
-github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg=
github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=
@@ -515,14 +430,11 @@ github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxzi
github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
github.com/nicksnyder/go-i18n/v2 v2.1.2 h1:QHYxcUJnGHBaq7XbvgunmZ2Pn0focXFqTD61CkH146c=
github.com/nicksnyder/go-i18n/v2 v2.1.2/go.mod h1:d++QJC9ZVf7pa48qrsRWhMJ5pSHIPmS3OLqK1niyLxs=
-github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
-github.com/nishanths/predeclared v0.0.0-20200524104333-86fad755b4d3/go.mod h1:nt3d53pc1VYcphSCIaYAJtnPYnr3Zyn8fMq2wvPGPso=
github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78=
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs=
github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA=
-github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
github.com/olekukonko/tablewriter v0.0.5-0.20200416053754-163badb3bac6 h1:F721VBMijn0OBFZ5wUSuMVVLQj2IJiiupn6UNd7UbBE=
github.com/olekukonko/tablewriter v0.0.5-0.20200416053754-163badb3bac6/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA=
@@ -550,7 +462,6 @@ github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnh
github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM=
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
-github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo=
github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM=
github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs=
@@ -564,13 +475,11 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA=
-github.com/pkg/profile v1.5.0/go.mod h1:qBsxPvzyUincmltOk6iyRVxHYg4adc0OFOv72ZdLa18=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs=
-github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso=
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og=
github.com/prometheus/client_golang v1.6.0 h1:YVPodQOcK15POxhgARIvnDRVpLcuK8mglnMrWfyrw6A=
@@ -582,33 +491,36 @@ github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:
github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M=
github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
-github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
-github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA=
github.com/prometheus/common v0.9.1 h1:KOMtN28tlbam3/7ZKEYKHhKoJZYYj3gMH4uc62x7X7U=
github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4=
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
-github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A=
github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
github.com/prometheus/procfs v0.1.3 h1:F0+tqvhOksq22sc6iCHF5WGlWjdwj92p0udFh1VFBS8=
github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
-github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
github.com/quasoft/memstore v0.0.0-20180925164028-84a050167438/go.mod h1:wTPjTepVu7uJBYgZ0SdWHQlIas582j6cn2jgk4DDdlg=
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0 h1:MkV+77GLUNo5oJ0jf870itWm3D0Sjh7+Za9gazKc5LQ=
github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
+github.com/redis/go-redis/extra/rediscmd/v9 v9.7.0 h1:BIx9TNZH/Jsr4l1i7VVxnV0JPiwYj8qyrHyuL0fGZrk=
+github.com/redis/go-redis/extra/rediscmd/v9 v9.7.0/go.mod h1:eTg/YQtGYAZD5r3DlGlJptJ45AHA+/G+2NPn30PKzik=
+github.com/redis/go-redis/extra/redisotel/v9 v9.7.0 h1:bQk8xiVFw+3ln4pfELVktpWgYdFpgLLU+quwSoeIof0=
+github.com/redis/go-redis/extra/redisotel/v9 v9.7.0/go.mod h1:0LyN+GHLIJmKtjYRPF7nHyTTMV6E91YngoOopNifQRo=
+github.com/redis/go-redis/v9 v9.7.1 h1:4LhKRCIduqXqtvCUlaq9c8bdHOkICjDMrr1+Zb3osAc=
+github.com/redis/go-redis/v9 v9.7.1/go.mod h1:f6zhXITC7JUJIlPEiBOTXxJgPLdZcA93GewI7inzyWw=
github.com/robfig/cron v1.2.0 h1:ZjScXvvxeQ63Dbyxy76Fj3AT3Ut0aKsyd2/tl3DTMuQ=
github.com/robfig/cron v1.2.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k=
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
-github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
+github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
+github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ=
github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU=
github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc=
@@ -631,16 +543,9 @@ github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIK
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM=
github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY=
-github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
-github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
-github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
-github.com/spf13/cobra v1.0.1-0.20201006035406-b97b5ead31f7/go.mod h1:yk5b0mALVusDL5fMM6Rd1wgnoO5jUPhwsQ6LQAJTidQ=
-github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
-github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
-github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg=
github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw=
github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw=
github.com/streadway/amqp v1.0.0 h1:kuuDrUJFZL1QYL9hUNuCxNObNzB0bV/ZG5jV3RWAQgo=
@@ -662,25 +567,27 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
-github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
-github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
+github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
+github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/teris-io/shortid v0.0.0-20171029131806-771a37caa5cf h1:Z2X3Os7oRzpdJ75iPqWZc0HeJWFYNCvKsfpQwFpRNTA=
github.com/teris-io/shortid v0.0.0-20171029131806-771a37caa5cf/go.mod h1:M8agBzgqHIhgj7wEn9/0hJUZcrvt9VY+Ln+S1I5Mha0=
github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
github.com/tidwall/pretty v1.0.1 h1:WE4RBSZ1x6McVVC8S/Md+Qse8YUv6HRObAx6ke00NY8=
github.com/tidwall/pretty v1.0.1/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
-github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc h1:9lRDQMhESg+zvGYmW5DyG0UqvY96Bu5QYsTLvCHdrgo=
github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc/go.mod h1:bciPuU6GHm1iF1pBvUfxfsH0Wmnc2VbpgvbI9ZWuIRs=
-github.com/twitchtv/twirp v7.1.0+incompatible/go.mod h1:RRJoFSAmTEh2weEqWtpPE3vFK5YBhA6bqp2l1kfCC5A=
github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI=
github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw=
github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY=
github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65EE=
github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg=
+github.com/uptrace/opentelemetry-go-extra/otelgorm v0.1.0 h1:Gq/eOuR0xoil14I/T2/IIisVzWJRl+WXp/6VX+4G2mI=
+github.com/uptrace/opentelemetry-go-extra/otelgorm v0.1.0/go.mod h1:onagKwCZ+SgR8Tcaw7g8b92L/sEzEUn46FxOsi1iFYI=
+github.com/uptrace/opentelemetry-go-extra/otelsql v0.3.2 h1:ZjUj9BLYf9PEqBn8W/OapxhPjVRdC6CsXTdULHsyk5c=
+github.com/uptrace/opentelemetry-go-extra/otelsql v0.3.2/go.mod h1:O8bHQfyinKwTXKkiKNGmLQS7vRsqRxIQTFZpYpHK3IQ=
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
github.com/vmihailenco/bufpool v0.1.11 h1:gOq2WmBrq0i2yW5QJ16ykccQ4wH9UyEsgLm6czKAd94=
@@ -697,32 +604,37 @@ github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc/go.mod h1:Jhud4/sHM
github.com/xdg/stringprep v1.0.0 h1:d9X0esnoa3dFsV0FG35rAT0RIhYFlPq7MiP+DW89La0=
github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y=
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
-github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
-github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
-github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q=
-go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg=
go.mongodb.org/mongo-driver v1.4.1 h1:38NSAyDPagwnFpUA/D5SFgbugUYR3NzYRNa4Qk9UxKs=
go.mongodb.org/mongo-driver v1.4.1/go.mod h1:llVBH2pkj9HywK0Dtdt6lDikOjFLbceHVu/Rc0iMKLs=
go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
-go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
-go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
-go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
-go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
-go.opencensus.io v0.22.6/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
-go.opentelemetry.io/otel v0.17.0 h1:6MKOu8WY4hmfpQ4oQn34u6rYhnf2sWf1LXYO/UFm71U=
-go.opentelemetry.io/otel v0.17.0/go.mod h1:Oqtdxmf7UtEvL037ohlgnaYa1h7GtMh0NcSd9eqkC9s=
-go.opentelemetry.io/otel/metric v0.17.0 h1:t+5EioN8YFXQ2EH+1j6FHCKMUj+57zIDSnSGr/mWuug=
-go.opentelemetry.io/otel/metric v0.17.0/go.mod h1:hUz9lH1rNXyEwWAhIWCMFWKhYtpASgSnObJFnU26dJ0=
-go.opentelemetry.io/otel/oteltest v0.17.0 h1:TyAihUowTDLqb4+m5ePAsR71xPJaTBJl4KDArIdi9k4=
-go.opentelemetry.io/otel/oteltest v0.17.0/go.mod h1:JT/LGFxPwpN+nlsTiinSYjdIx3hZIGqHCpChcIZmdoE=
-go.opentelemetry.io/otel/trace v0.17.0 h1:SBOj64/GAOyWzs5F680yW1ITIfJkm6cJWL2YAvuL9xY=
-go.opentelemetry.io/otel/trace v0.17.0/go.mod h1:bIujpqg6ZL6xUTubIUgziI1jSaUPthmabA/ygf/6Cfg=
+go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA=
+go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A=
+go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.59.0 h1:iQZYNQ7WwIcYXzOPR46FQv9O0dS1PW16RjvR0TjDOe8=
+go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.59.0/go.mod h1:54CaSNqYEXvpzDh8KPjiMVoWm60t5R0dZRt0leEPgAs=
+go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.59.0 h1:CV7UdSGJt/Ao6Gp4CXckLxVRRsRgDHoI8XjbL3PDl8s=
+go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.59.0/go.mod h1:FRmFuRJfag1IZ2dPkHnEoSFVgTVPUd2qf5Vi69hLb8I=
+go.opentelemetry.io/otel v1.34.0 h1:zRLXxLCgL1WyKsPVrgbSdMN4c0FMkDAskSTQP+0hdUY=
+go.opentelemetry.io/otel v1.34.0/go.mod h1:OWFPOQ+h4G8xpyjgqo4SxJYdDQ/qmRH+wivy7zzx9oI=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0 h1:OeNbIYk/2C15ckl7glBlOBp5+WlYsOElzTNmiPW/x60=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.34.0/go.mod h1:7Bept48yIeqxP2OZ9/AqIpYS94h2or0aB4FypJTc8ZM=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0 h1:tgJ0uaNS4c98WRNUEx5U3aDlrDOI5Rs+1Vifcw4DJ8U=
+go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.34.0/go.mod h1:U7HYyW0zt/a9x5J1Kjs+r1f/d4ZHnYFclhYY2+YbeoE=
+go.opentelemetry.io/otel/metric v1.34.0 h1:+eTR3U0MyfWjRDhmFMxe2SsW64QrZ84AOhvqS7Y+PoQ=
+go.opentelemetry.io/otel/metric v1.34.0/go.mod h1:CEDrp0fy2D0MvkXE+dPV7cMi8tWZwX3dmaIhwPOaqHE=
+go.opentelemetry.io/otel/sdk v1.34.0 h1:95zS4k/2GOy069d321O8jWgYsW3MzVV+KuSPKp7Wr1A=
+go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU=
+go.opentelemetry.io/otel/sdk/metric v1.34.0 h1:5CeK9ujjbFVL5c1PhLuStg1wxA7vQv7ce1EK0Gyvahk=
+go.opentelemetry.io/otel/sdk/metric v1.34.0/go.mod h1:jQ/r8Ze28zRKoNRdkjCZxfs6YvBTG1+YIqyFVFYec5w=
+go.opentelemetry.io/otel/trace v1.34.0 h1:+ouXS2V8Rd4hp4580a8q23bg0azF2nI8cqLYnC8mh/k=
+go.opentelemetry.io/otel/trace v1.34.0/go.mod h1:Svm7lSjQD7kG7KJ/MUHPVXSDGz2OX4h0M2jHBhmSfRE=
+go.opentelemetry.io/proto/otlp v1.5.0 h1:xJvq7gMzB31/d406fB8U5CBdyQGw4P399D1aQWU/3i4=
+go.opentelemetry.io/proto/otlp v1.5.0/go.mod h1:keN8WnHxOy8PG0rQZjJJ5A2ebUoafqWp0eVQ4yIXvJ4=
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
@@ -731,6 +643,8 @@ go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw=
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
go.uber.org/automaxprocs v1.3.0 h1:II28aZoGdaglS5vVNnspf28lnZpXScxtIozx1lAjdb0=
go.uber.org/automaxprocs v1.3.0/go.mod h1:9CWT6lKIep8U41DDaPiH6eFscnTyjfTANNQNx6LrIcA=
+go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
+go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4=
go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU=
@@ -753,7 +667,6 @@ golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaE
golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE=
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
-golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
@@ -765,41 +678,21 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh
golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
-golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI=
-golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
+golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc=
+golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
-golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
-golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
-golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek=
-golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY=
-golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
-golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
-golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
-golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
-golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
-golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
-golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
-golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
-golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
+golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f h1:J5lckAjkw6qYlOZNj90mLYNTEKDvWeuc1yieZ8qUzUE=
golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=
-golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
-golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
-golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 h1:2M3HP5CCK1Si9FQhwnzYhXdG6DXeebvUHFpre8QvbyI=
-golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
-golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
-golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o=
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
-golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
-golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
-golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
-golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8=
+golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA=
+golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -812,45 +705,22 @@ golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73r
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
-golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
-golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
-golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
-golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
-golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
-golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
-golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20200904194848-62affa334b73/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
-golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
-golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
-golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc=
-golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac=
-golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
+golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0=
+golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
-golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
-golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
-golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
-golang.org/x/oauth2 v0.0.0-20210427180440-81ed05c6b58c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -858,11 +728,9 @@ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
-golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ=
+golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -873,68 +741,42 @@ golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5h
golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210923061019-b8560ed6a9b7/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
-golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
+golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU=
+golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
-golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
-golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk=
-golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
+golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo=
+golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
-golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
-golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
@@ -942,145 +784,57 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
-golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
-golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
-golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
-golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
-golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
-golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
-golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw=
-golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8=
-golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
-golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
-golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
-golang.org/x/tools v0.0.0-20200522201501-cb1345f3a375/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
-golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
-golang.org/x/tools v0.0.0-20200717024301-6ddee64345a6/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
-golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
-golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
-golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
-golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM=
+golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d h1:vU5i/LfpvrRCpgM/VPfJLg5KjxD3E+hfT1SH+d9zLwg=
+golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk=
golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk=
-google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
-google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=
-google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
-google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
-google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
-google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
-google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
-google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
-google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
-google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
-google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
-google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE=
-google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
-google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE=
-google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM=
-google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
-google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
-google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
-google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
-google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
-google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
-google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s=
-google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
-google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8=
-google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
-google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
-google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
-google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
-google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
-google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
-google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA=
-google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U=
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
-google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=
-google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20210207032614-bba0dbe2a9ea/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20210426193834-eac7f76ac494 h1:KMgpo2lWy1vfrYjtxPAzR0aNWeAR1UdQykt6sj/hpBY=
-google.golang.org/genproto v0.0.0-20210426193834-eac7f76ac494/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A=
+google.golang.org/genproto/googleapis/api v0.0.0-20250115164207-1a7da9e5054f h1:gap6+3Gk41EItBuyi4XX/bp4oqJ3UwuIMl25yGinuAA=
+google.golang.org/genproto/googleapis/api v0.0.0-20250115164207-1a7da9e5054f/go.mod h1:Ic02D47M+zbarjYYUlK57y316f2MoN0gjAwI3f2S95o=
+google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f h1:OxYkA3wjPsZyBylwymxSHa7ViiW1Sml4ToBrncvFehI=
+google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f/go.mod h1:+2Yz8+CLJbIfL9z73EW45avw8Lmge3xVElCP9zEKi50=
google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM=
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
-google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
-google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
-google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
-google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60=
-google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
-google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
-google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
-google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
-google.golang.org/grpc v1.35.0-dev.0.20201218190559-666aea1fb34c/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
-google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
-google.golang.org/grpc v1.37.0 h1:uSZWeQJX5j11bIQ4AJoj+McDBo29cY1MCoC1wO3ts+c=
-google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
-google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.0.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
+google.golang.org/grpc v1.69.4 h1:MF5TftSMkd8GLw/m0KM6V8CMOCY6NZ1NQDPGFgbTt4A=
+google.golang.org/grpc v1.69.4/go.mod h1:vyjdE6jLBI76dgpDojsFGNaHlxdjXN9ghpnd2o7JGZ4=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
@@ -1089,21 +843,17 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi
google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
-google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
-google.golang.org/protobuf v1.25.1-0.20200805231151-a709e31e5d12/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
-google.golang.org/protobuf v1.25.1-0.20201208041424-160c7477e0e8/go.mod h1:hFxJC2f0epmp1elRCiEGJTKAWbwxZ2nvqZdHl3FQXCY=
-google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
-google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
-google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg=
-google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
+google.golang.org/protobuf v1.36.3 h1:82DV7MYdb8anAVi3qge1wSnMDrnKK7ebr+I0hHRN1BU=
+google.golang.org/protobuf v1.36.3/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b h1:QRR6H1YWRnHb4Y/HeNFCTJLFVxaq6wH4YuVdsUOr75U=
gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
+gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
@@ -1111,7 +861,6 @@ gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o=
gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE=
gopkg.in/go-playground/validator.v9 v9.29.1/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWdVbfP1avr/N00E2vyQ=
gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s=
-gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/jcmturner/aescts.v1 v1.0.1 h1:cVVZBK2b1zY26haWB4vbBiZrfFQnfbTVrE3xZq6hrEw=
gopkg.in/jcmturner/aescts.v1 v1.0.1/go.mod h1:nsR8qBOg+OucoIW+WMhB3GspUQXq9XorLnQb9XtvcOo=
gopkg.in/jcmturner/dnsutils.v1 v1.0.1 h1:cIuC1OLRGZrld+16ZJvvZxVJeKPsvd5eUIvxfoN5hSM=
@@ -1135,7 +884,6 @@ gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
-gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gorm.io/driver/mysql v1.1.0 h1:3PgFPJlFq5Xt/0WRiRjxIVaXjeHY+2TQ5feXgpSpEC4=
@@ -1143,16 +891,12 @@ gorm.io/driver/mysql v1.1.0/go.mod h1:KdrTanmfLPPyAOeYGyG+UpDys7/7eeWT1zCq+oekYn
gorm.io/driver/postgres v1.1.0 h1:afBljg7PtJ5lA6YUWluV2+xovIPhS+YiInuL3kUjrbk=
gorm.io/driver/postgres v1.1.0/go.mod h1:hXQIwafeRjJvUm+OMxcFWyswJ/vevcpPLlGocwAwuqw=
gorm.io/gorm v1.21.9/go.mod h1:F+OptMscr0P2F2qU97WT1WimdH9GaQPoDW7AYd5i2Y0=
-gorm.io/gorm v1.21.10 h1:kBGiBsaqOQ+8f6S2U6mvGFz6aWWyCeIiuaFcaBozp4M=
-gorm.io/gorm v1.21.10/go.mod h1:F+OptMscr0P2F2qU97WT1WimdH9GaQPoDW7AYd5i2Y0=
+gorm.io/gorm v1.21.16 h1:YBIQLtP5PLfZQz59qfrq7xbrK7KWQ+JsXXCH/THlMqs=
+gorm.io/gorm v1.21.16/go.mod h1:F+OptMscr0P2F2qU97WT1WimdH9GaQPoDW7AYd5i2Y0=
honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
-honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
-honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
-honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
-honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
honnef.co/go/tools v0.1.1 h1:EVDuO03OCZwpV2t/tLLxPmPiomagMoBOgfPt0FM+4IY=
honnef.co/go/tools v0.1.1/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las=
mellium.im/sasl v0.2.1 h1:nspKSRg7/SyO0cRGY71OkfHab8tf9kCts6a6oTDut0w=
@@ -1160,9 +904,6 @@ mellium.im/sasl v0.2.1/go.mod h1:ROaEDLQNuf9vjKqE1SrAfnsobm2YKXT1gnN1uDp1PjQ=
moul.io/http2curl v1.0.0 h1:6XwpyZOYsgZJrU8exnG87ncVkU1FVCcTRpwzOkTDUi8=
moul.io/http2curl v1.0.0/go.mod h1:f6cULg+e4Md/oW1cYmwW4IWQOVl2lGbmCNGOHvzX2kE=
nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50=
-rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
-rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
-rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU=
diff --git a/metric.go b/metric.go
index 8d21f05..05b9c8c 100644
--- a/metric.go
+++ b/metric.go
@@ -18,7 +18,7 @@ var (
boxMetricGauge = metric.Default.NewGaugeVec(
"box_info",
"Information about the box config and environment.",
- []string{"name", "version", "tags", "ip", "localhost", "start"})
+ []string{"tags", "ip", "localhost", "start"})
)
func (boxMetric) Name() string {
@@ -27,8 +27,6 @@ func (boxMetric) Name() string {
func (boxMetric) Serve(ctx context.Context) error {
boxMetricGauge.WithLabelValues(
- config.ServiceName(),
- config.ServiceVersion(),
strings.Join(config.ServiceTag(), ","),
system.IP(),
system.Hostname(),
diff --git a/pkg/cache/cache.go b/pkg/cache/cache.go
index 16530b1..9bda62f 100644
--- a/pkg/cache/cache.go
+++ b/pkg/cache/cache.go
@@ -3,10 +3,7 @@ package cache
import (
"context"
"errors"
- "fmt"
"time"
-
- "github.com/boxgo/box/pkg/config"
)
type (
@@ -21,7 +18,3 @@ type (
var (
ErrCacheMiss = errors.New("cache: key is missing")
)
-
-func UnifiedKey(key string) string {
- return fmt.Sprintf("%s.cache.%s", config.ServiceName(), key)
-}
diff --git a/pkg/cache/rediscache/config.go b/pkg/cache/rediscache/config.go
index b0ec44f..e5327df 100644
--- a/pkg/cache/rediscache/config.go
+++ b/pkg/cache/rediscache/config.go
@@ -9,7 +9,7 @@ import (
type (
Config struct {
path string
- Prefix string `config:"prefix" desc:"cache key prefix. if empty, auto prefix with format: ${serviceName}.cache.${key}."`
+ Prefix string `config:"prefix" desc:"cache key prefix."`
Marshaller string `config:"marshaller" desc:"support json only"`
Config string `config:"config" desc:"redis config path. eg: 'default' means use 'redis.default' config"`
BigCacheSize int `config:"bigCacheSize" desc:"big cache size, unit: byte"`
diff --git a/pkg/cache/rediscache/rediscache.go b/pkg/cache/rediscache/rediscache.go
index 76dbb84..67cb569 100644
--- a/pkg/cache/rediscache/rediscache.go
+++ b/pkg/cache/rediscache/rediscache.go
@@ -66,10 +66,9 @@ func (l *redisCache) Expire(ctx context.Context, key string, expiration time.Dur
}
func (l redisCache) cacheKey(key string) string {
- cacheKey := l.cfg.Prefix
- if cacheKey == "" {
- cacheKey = cache.UnifiedKey(key)
+ if l.cfg.Prefix != "" {
+ return l.cfg.Prefix + key
}
- return cacheKey
+ return key
}
diff --git a/pkg/client/gormx/gorm.go b/pkg/client/gormx/gorm.go
index 9cd38a6..c2565d2 100644
--- a/pkg/client/gormx/gorm.go
+++ b/pkg/client/gormx/gorm.go
@@ -8,6 +8,8 @@ import (
"gorm.io/driver/postgres"
"gorm.io/gorm"
"gorm.io/gorm/schema"
+
+ "github.com/uptrace/opentelemetry-go-extra/otelgorm"
)
type (
@@ -75,6 +77,10 @@ func newGorm(c *Config) *Gorm {
sqlDB.SetConnMaxIdleTime(c.MaxIdleTime)
sqlDB.SetConnMaxLifetime(c.MaxLifeTime)
+ if err := db.Use(otelgorm.NewPlugin()); err != nil {
+ panic(err)
+ }
+
metric := newMetric(c.Driver, c.Key(), c.MetricInterval)
if err := metric.registerCallback(db); err != nil {
logger.Panicf("metric register callback error: %s", err)
diff --git a/pkg/client/gormx/metric.go b/pkg/client/gormx/metric.go
index 498fe41..6539723 100644
--- a/pkg/client/gormx/metric.go
+++ b/pkg/client/gormx/metric.go
@@ -24,19 +24,19 @@ const (
)
var (
- metricConnIdle = metric.NewGaugeVec("db_connections_idle", `The number of idle connections.`, []string{labelDriver, labelDatabase})
- metricConnInUse = metric.NewGaugeVec("db_connections_in_use", `The number of connections currently in use.`, []string{labelDriver, labelDatabase})
- metricConnOpen = metric.NewGaugeVec("db_connections_open", `The number of established connections both in use and idle.`, []string{labelDriver, labelDatabase})
- metricConnMaxOpen = metric.NewGaugeVec("db_connections_max_open", `Maximum number of open connections to the database.`, []string{labelDriver, labelDatabase})
- metricWaitCount = metric.NewGaugeVec("db_wait_count", `The total number of connections waited for.`, []string{labelDriver, labelDatabase})
- metricWaitDuration = metric.NewGaugeVec("db_wait_duration_seconds", `The total time blocked waiting for a new connection.`, []string{labelDriver, labelDatabase})
- metricSQLSeconds = metric.NewSummaryVec("db_sql_seconds", `All queries requested seconds`, []string{labelDriver, labelDatabase, labelType, labelError}, map[float64]float64{
- 0.5: 0.05,
- 0.75: 0.05,
- 0.9: 0.01,
- 0.99: 0.001,
- 1: 0.001,
- })
+ metricConnIdle = metric.NewGaugeVec("db_client_connections_idle", `The number of idle connections.`, []string{labelDriver, labelDatabase})
+ metricConnInUse = metric.NewGaugeVec("db_client_connections_in_use", `The number of connections currently in use.`, []string{labelDriver, labelDatabase})
+ metricConnOpen = metric.NewGaugeVec("db_client_connections_open", `The number of established connections both in use and idle.`, []string{labelDriver, labelDatabase})
+ metricConnMaxOpen = metric.NewGaugeVec("db_client_connections_max_open", `Maximum number of open connections to the database.`, []string{labelDriver, labelDatabase})
+ metricWaitCount = metric.NewGaugeVec("db_client_connections_wait_total", `The total number of connections waited for.`, []string{labelDriver, labelDatabase})
+ metricWaitDuration = metric.NewGaugeVec("db_client_connections_wait_seconds", `The total time blocked waiting for a new connection.`, []string{labelDriver, labelDatabase})
+ metricSQLDuration = metric.NewHistogramVec(
+ "db_client_request_duration_seconds",
+ "The SQL execution latencies in seconds.",
+ []string{labelDriver, labelDatabase, labelType, "result"},
+ // 250us, 500us, 1ms, 2.5ms, 5ms, 10ms, 25ms, 50ms, 100ms, 250ms, 500ms, 1s, 2.5s
+ []float64{0.00025, 0.0005, 0.001, 0.0025, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5},
+ )
)
func newMetric(driver, database string, statsInterval time.Duration) *Metric {
@@ -115,11 +115,11 @@ func (m *Metric) beforeCallback(db *DB) {
func (m *Metric) afterCallback(cmdType string) func(*DB) {
return func(db *DB) {
- err := ""
+ result := "success"
second := 0.0
if db.Statement.Error != nil {
- err = db.Statement.Error.Error()
+ result = "error"
}
if ts, ok := db.InstanceGet("startTime"); ok {
@@ -128,7 +128,7 @@ func (m *Metric) afterCallback(cmdType string) func(*DB) {
}
}
- metricSQLSeconds.WithLabelValues(m.driver, m.database, cmdType, err).Observe(second)
+ metricSQLDuration.WithLabelValues(m.driver, m.database, cmdType, result).Observe(second)
}
}
diff --git a/pkg/client/kafka/config.go b/pkg/client/kafka/config.go
index 0d092d0..ecc6051 100644
--- a/pkg/client/kafka/config.go
+++ b/pkg/client/kafka/config.go
@@ -172,6 +172,7 @@ func StdConfig(key string, optionFunc ...OptionFunc) *Config {
// DefaultConfig 默认配置
func DefaultConfig(key string) *Config {
kfkCfg := sarama.NewConfig()
+ kfkCfg.Version = sarama.V2_6_0_0 // Explicitly set to match broker
return &Config{
path: "kafka." + key,
diff --git a/pkg/client/kafka/kafka.go b/pkg/client/kafka/kafka.go
index 661a431..f3f9103 100644
--- a/pkg/client/kafka/kafka.go
+++ b/pkg/client/kafka/kafka.go
@@ -42,6 +42,10 @@ func (kfk Kafka) NewConsumerGroup(groupID string) (ConsumerGroup, error) {
return sarama.NewConsumerGroupFromClient(groupID, kfk.client)
}
+func (kfk Kafka) NewClusterAdmin() (ClusterAdmin, error) {
+ return sarama.NewClusterAdmin(kfk.cfg.Addrs, kfk.client.Config())
+}
+
// Config returns the Config struct of the client. This struct should not be
// altered after it has been created.
func (kfk Kafka) Config() *ConfigKafka {
diff --git a/pkg/client/kafka/kafka_test.go b/pkg/client/kafka/kafka_test.go
index 66bf77e..a3e48ff 100644
--- a/pkg/client/kafka/kafka_test.go
+++ b/pkg/client/kafka/kafka_test.go
@@ -5,6 +5,7 @@ import (
"os"
"os/signal"
"sync/atomic"
+ "testing"
"time"
"github.com/boxgo/box/pkg/client/kafka"
@@ -73,3 +74,78 @@ func Example() {
fmt.Println(offset >= 0, partition == 0, atomic.LoadInt32(&cnt) > 0)
// Output: true true true
}
+
+func TestKafka_ConsumerGroupOperations(t *testing.T) {
+ kfk := kafka.StdConfig("default").Build()
+
+ admin, err := kfk.NewClusterAdmin()
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ defer func() {
+ if err := admin.Close(); err != nil {
+ t.Fatal(err)
+ }
+ }()
+
+ // Test ListConsumerGroups
+ t.Run("ListConsumerGroups", func(t *testing.T) {
+ groups, err := admin.ListConsumerGroups()
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ t.Logf("Found %d consumer groups", len(groups))
+ for groupID, groupType := range groups {
+ t.Logf("Group: %s, Type: %s", groupID, groupType)
+ }
+ })
+
+ // Test DescribeConsumerGroups
+ t.Run("DescribeConsumerGroups", func(t *testing.T) {
+ // First, get the list of consumer groups
+ groups, err := admin.ListConsumerGroups()
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if len(groups) == 0 {
+ t.Skip("No consumer groups found, skipping describe test")
+ }
+
+ // Get the first group ID for testing
+ var groupIDs []string
+ for groupID := range groups {
+ groupIDs = append(groupIDs, groupID)
+ break // Only test with the first group
+ }
+
+ descriptions, err := admin.DescribeConsumerGroups(groupIDs)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ for _, desc := range descriptions {
+ t.Logf("Group: %s, State: %s, Protocol: %s", desc.GroupId, desc.State, desc.ProtocolType)
+ t.Logf("Members: %d", len(desc.Members))
+ }
+ })
+
+ // Test DeleteConsumerGroup
+ t.Run("DeleteConsumerGroup", func(t *testing.T) {
+ // Create a test consumer group first
+ testGroupID := "wechat_switch_change_v2.cache.push-v2-6d5797558-nhrnz"
+
+ // Note: In a real test environment, you would create a consumer group first
+ // For this test, we'll just test the delete operation on a non-existent group
+ // which should return an error
+ err := admin.DeleteConsumerGroup(testGroupID)
+ if err != nil {
+ // This is expected for a non-existent group
+ t.Logf("Delete consumer group returned error (expected): %v", err)
+ } else {
+ t.Logf("Successfully deleted consumer group: %s", testGroupID)
+ }
+ })
+}
diff --git a/pkg/client/mongodb/metric.go b/pkg/client/mongodb/metric.go
index 1e65d73..b3614bf 100644
--- a/pkg/client/mongodb/metric.go
+++ b/pkg/client/mongodb/metric.go
@@ -19,25 +19,20 @@ type (
var (
cmdTotal = metric.NewCounterVec(
- "mongo_client_command_total",
- "mongodb client command counter",
- []string{"command", "error"},
+ "mongo_client_requests_total",
+ "The total number of MongoDB commands executed.",
+ []string{"command", "result"},
)
- cmdDuration = metric.NewSummaryVec(
- "mongo_client_command_duration_seconds",
- "mongodb client command duration seconds",
- []string{"command", "error"},
- map[float64]float64{
- 0.5: 0.05,
- 0.75: 0.05,
- 0.9: 0.01,
- 0.99: 0.001,
- 1: 0.001,
- },
+ cmdDuration = metric.NewHistogramVec(
+ "mongo_client_request_duration_seconds",
+ "The MongoDB command latencies in seconds.",
+ []string{"command", "result"},
+ // 250us, 500us, 1ms, 2.5ms, 5ms, 10ms, 25ms, 50ms, 100ms, 250ms, 500ms, 1s, 2.5s
+ []float64{0.00025, 0.0005, 0.001, 0.0025, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5},
)
workingSession = metric.NewGaugeVec(
- "mongo_client_session_in_progress",
- "mongo client session in progress gauge",
+ "mongo_client_sessions_inflight",
+ "The number of MongoDB sessions currently in progress.",
[]string{},
)
)
@@ -80,7 +75,7 @@ func (mon *metricMonitor) Started(ctx context.Context, ev *event.CommandStartedE
}
func (mon *metricMonitor) Succeeded(ctx context.Context, ev *event.CommandSucceededEvent) {
- labels := []string{ev.CommandName, ""}
+ labels := []string{ev.CommandName, "success"}
cmdTotal.WithLabelValues(labels...).Inc()
cmdDuration.WithLabelValues(labels...).Observe(time.Duration(ev.DurationNanos).Seconds())
@@ -88,7 +83,7 @@ func (mon *metricMonitor) Succeeded(ctx context.Context, ev *event.CommandSuccee
}
func (mon *metricMonitor) Failed(ctx context.Context, ev *event.CommandFailedEvent) {
- labels := []string{ev.CommandName, ev.Failure}
+ labels := []string{ev.CommandName, "error"}
cmdTotal.WithLabelValues(labels...).Inc()
cmdDuration.WithLabelValues(labels...).Observe(time.Duration(ev.DurationNanos).Seconds())
diff --git a/pkg/client/redis/alias.go b/pkg/client/redis/alias.go
index cf2e9ba..645f297 100644
--- a/pkg/client/redis/alias.go
+++ b/pkg/client/redis/alias.go
@@ -1,7 +1,7 @@
package redis
import (
- "github.com/go-redis/redis/v8"
+ "github.com/redis/go-redis/v9"
)
const (
diff --git a/pkg/client/redis/default.go b/pkg/client/redis/default.go
index a269548..a44f7d8 100644
--- a/pkg/client/redis/default.go
+++ b/pkg/client/redis/default.go
@@ -4,7 +4,7 @@ import (
"context"
"time"
- "github.com/go-redis/redis/v8"
+ "github.com/redis/go-redis/v9"
)
var (
@@ -24,7 +24,7 @@ func Set(ctx context.Context, key string, value interface{}, expiration time.Dur
}
func SetEX(ctx context.Context, key string, value interface{}, expiration time.Duration) *redis.StatusCmd {
- return Client().SetEX(ctx, key, value, expiration)
+ return Client().SetEx(ctx, key, value, expiration)
}
func SetNX(ctx context.Context, key string, value interface{}, expiration time.Duration) *redis.BoolCmd {
@@ -115,7 +115,7 @@ func HGet(ctx context.Context, key, field string) *redis.StringCmd {
return Client().HGet(ctx, key, field)
}
-func HGetAll(ctx context.Context, key string) *redis.StringStringMapCmd {
+func HGetAll(ctx context.Context, key string) *redis.MapStringStringCmd {
return Client().HGetAll(ctx, key)
}
@@ -219,42 +219,18 @@ func SUnionStore(ctx context.Context, destination string, keys ...string) *redis
return Client().SUnionStore(ctx, destination, keys...)
}
-func ZAdd(ctx context.Context, key string, members ...*redis.Z) *redis.IntCmd {
+func ZAdd(ctx context.Context, key string, members ...redis.Z) *redis.IntCmd {
return Client().ZAdd(ctx, key, members...)
}
-func ZAddNX(ctx context.Context, key string, members ...*redis.Z) *redis.IntCmd {
+func ZAddNX(ctx context.Context, key string, members ...redis.Z) *redis.IntCmd {
return Client().ZAddNX(ctx, key, members...)
}
-func ZAddXX(ctx context.Context, key string, members ...*redis.Z) *redis.IntCmd {
+func ZAddXX(ctx context.Context, key string, members ...redis.Z) *redis.IntCmd {
return Client().ZAddXX(ctx, key, members...)
}
-func ZAddCh(ctx context.Context, key string, members ...*redis.Z) *redis.IntCmd {
- return Client().ZAddCh(ctx, key, members...)
-}
-
-func ZAddNXCh(ctx context.Context, key string, members ...*redis.Z) *redis.IntCmd {
- return Client().ZAddNXCh(ctx, key, members...)
-}
-
-func ZAddXXCh(ctx context.Context, key string, members ...*redis.Z) *redis.IntCmd {
- return Client().ZAddXXCh(ctx, key, members...)
-}
-
-func ZIncr(ctx context.Context, key string, member *redis.Z) *redis.FloatCmd {
- return Client().ZIncr(ctx, key, member)
-}
-
-func ZIncrNX(ctx context.Context, key string, member *redis.Z) *redis.FloatCmd {
- return Client().ZIncrNX(ctx, key, member)
-}
-
-func ZIncrXX(ctx context.Context, key string, member *redis.Z) *redis.FloatCmd {
- return Client().ZIncrXX(ctx, key, member)
-}
-
func ZCard(ctx context.Context, key string) *redis.IntCmd {
return Client().ZCard(ctx, key)
}
diff --git a/pkg/client/redis/logger.go b/pkg/client/redis/logger.go
index a3924c5..780ca2f 100644
--- a/pkg/client/redis/logger.go
+++ b/pkg/client/redis/logger.go
@@ -3,35 +3,54 @@ package redis
import (
"context"
"strings"
- "time"
"github.com/boxgo/box/pkg/logger"
- "github.com/go-redis/redis/v8"
+ "github.com/redis/go-redis/v9"
)
type (
Logger struct {
- cfg *Config
+ cfg *Config
+ addr string
}
)
-func (inst *Logger) BeforeProcess(ctx context.Context, cmd redis.Cmder) (context.Context, error) {
- return ctx, nil
+func newLogger(cfg *Config) *Logger {
+ return &Logger{
+ cfg: cfg,
+ addr: strings.Join(cfg.Address, ","),
+ }
}
-func (inst *Logger) AfterProcess(ctx context.Context, cmd redis.Cmder) error {
- return nil
+func (inst *Logger) DialHook(next redis.DialHook) redis.DialHook {
+ return next
}
-func (inst *Logger) BeforeProcessPipeline(ctx context.Context, cmds []redis.Cmder) (context.Context, error) {
- return ctx, nil
+func (inst *Logger) ProcessHook(next redis.ProcessHook) redis.ProcessHook {
+ return func(ctx context.Context, cmd redis.Cmder) error {
+ err := next(ctx, cmd)
+
+ if err != nil {
+ inst.log(ctx, false, cmd)
+ }
+
+ return err
+ }
}
-func (inst *Logger) AfterProcessPipeline(ctx context.Context, cmds []redis.Cmder) error {
- return nil
+func (inst *Logger) ProcessPipelineHook(next redis.ProcessPipelineHook) redis.ProcessPipelineHook {
+ return func(ctx context.Context, cmds []redis.Cmder) error {
+ err := next(ctx, cmds)
+
+ if err != nil {
+ inst.log(ctx, false, cmds...)
+ }
+
+ return err
+ }
}
-func (inst *Logger) log(ctx context.Context, pipe bool, elapsed time.Duration, cmds ...redis.Cmder) {
+func (inst *Logger) log(ctx context.Context, pipe bool, cmds ...redis.Cmder) {
var (
cmdArr = make([]string, len(cmds))
errArr = make([]string, len(cmds))
@@ -47,7 +66,7 @@ func (inst *Logger) log(ctx context.Context, pipe bool, elapsed time.Duration, c
if len(errArr) > 0 {
logger.Trace(ctx).Errorw("Redis.Error",
- "address", strings.Join(inst.cfg.Address, ","),
+ "address", inst.addr,
"db", inst.cfg.DB,
"err", strings.Join(errArr, ";"),
"cmd", strings.Join(cmdArr, ";"),
diff --git a/pkg/client/redis/metric.go b/pkg/client/redis/metric.go
index 867b0c4..ce7513e 100644
--- a/pkg/client/redis/metric.go
+++ b/pkg/client/redis/metric.go
@@ -2,102 +2,101 @@ package redis
import (
"context"
- "fmt"
+ "strconv"
"strings"
"time"
"github.com/boxgo/box/pkg/metric"
- "github.com/boxgo/box/pkg/trace"
- "github.com/go-redis/redis/v8"
+ "github.com/redis/go-redis/v9"
)
type (
Metric struct {
- cfg *Config
+ cfg *Config
+ addr string
}
startKey struct{}
)
+func newMetric(cfg *Config) *Metric {
+ return &Metric{
+ cfg: cfg,
+ addr: strings.Join(cfg.Address, ","),
+ }
+}
+
var (
cmdTotal = metric.NewCounterVec(
- "redis_client_command_total",
- "redis command counter",
- []string{"bid", "address", "db", "masterName", "pipe", "cmd", "error"},
+ "redis_client_requests_total",
+ "The total number of Redis commands executed.",
+ []string{"address", "db", "masterName", "pipe", "cmd", "result"},
)
- cmdDuration = metric.NewSummaryVec(
- "redis_client_command_duration_seconds",
- "redis command duration seconds",
- []string{"bid", "address", "db", "masterName", "pipe", "cmd", "error"},
- map[float64]float64{
- 0.5: 0.05,
- 0.75: 0.05,
- 0.9: 0.01,
- 0.99: 0.001,
- 1: 0.001,
- },
+ cmdDuration = metric.NewHistogramVec(
+ "redis_client_request_duration_seconds",
+ "The Redis command latencies in seconds.",
+ []string{"address", "db", "masterName", "pipe", "cmd", "result"},
+ // 100us, 250us, 500us, 1ms, 2.5ms, 5ms, 10ms, 25ms, 50ms, 100ms, 250ms, 500ms
+ []float64{0.0001, 0.00025, 0.0005, 0.001, 0.0025, 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5},
)
)
-func (m *Metric) BeforeProcess(ctx context.Context, cmd redis.Cmder) (context.Context, error) {
- return context.WithValue(ctx, startKey{}, time.Now()), nil
+func (m *Metric) DialHook(next redis.DialHook) redis.DialHook {
+ return next
}
-func (m *Metric) AfterProcess(ctx context.Context, cmd redis.Cmder) error {
- start := ctx.Value(startKey{}).(time.Time)
- elapsed := time.Since(start)
+func (m *Metric) ProcessHook(next redis.ProcessHook) redis.ProcessHook {
+ return func(ctx context.Context, cmd redis.Cmder) error {
+ start := time.Now()
- m.report(ctx, false, elapsed, cmd)
+ err := next(ctx, cmd)
- return nil
-}
+ m.report(ctx, false, time.Since(start), cmd)
-func (m *Metric) BeforeProcessPipeline(ctx context.Context, cmds []redis.Cmder) (context.Context, error) {
- return context.WithValue(ctx, startKey{}, time.Now()), nil
+ return err
+ }
}
-func (m *Metric) AfterProcessPipeline(ctx context.Context, cmds []redis.Cmder) error {
- start := ctx.Value(startKey{}).(time.Time)
- elapsed := time.Since(start)
+func (m *Metric) ProcessPipelineHook(next redis.ProcessPipelineHook) redis.ProcessPipelineHook {
+ return func(ctx context.Context, cmds []redis.Cmder) error {
+ start := time.Now()
+
+ err := next(ctx, cmds)
- m.report(ctx, true, elapsed, cmds...)
+ m.report(ctx, false, time.Since(start), cmds...)
- return nil
+ return err
+ }
}
func (m *Metric) report(ctx context.Context, pipe bool, elapsed time.Duration, cmds ...redis.Cmder) {
- addressStr := strings.Join(m.cfg.Address, ",")
- dbStr := fmt.Sprintf("%d", m.cfg.DB)
- masterNameStr := m.cfg.MasterName
- errStr := ""
cmdStr := ""
- pipeStr := fmt.Sprintf("%t", pipe)
+ result := "success"
+ masterNameStr := m.cfg.MasterName
+ addressStr := m.addr
+ dbStr := strconv.Itoa(m.cfg.DB)
+ pipeStr := strconv.FormatBool(pipe)
+
+ if pipe {
+ cmdStr = "pipeline"
+ } else if len(cmds) > 0 {
+ cmdStr = cmds[0].Name()
+ }
for _, cmd := range cmds {
- cmdStr += cmd.Name() + ";"
-
if err := cmd.Err(); err != nil && err != redis.Nil {
- errStr += err.Error() + ";"
+ result = "error"
+ break
}
}
- cmdStr = strings.TrimSuffix(cmdStr, ";")
-
- var (
- bizID string
- )
-
- if bizIDStr, ok := ctx.Value(trace.BizID()).(string); ok {
- bizID = bizIDStr
- }
values := []string{
- bizID,
addressStr,
dbStr,
masterNameStr,
pipeStr,
cmdStr,
- errStr,
+ result,
}
cmdDuration.WithLabelValues(values...).Observe(elapsed.Seconds())
diff --git a/pkg/client/redis/redis.go b/pkg/client/redis/redis.go
index dc4d08d..da382df 100644
--- a/pkg/client/redis/redis.go
+++ b/pkg/client/redis/redis.go
@@ -4,7 +4,9 @@ import (
"context"
"errors"
- "github.com/go-redis/redis/v8"
+ "github.com/boxgo/box/pkg/logger"
+ "github.com/redis/go-redis/extra/redisotel/v9"
+ "github.com/redis/go-redis/v9"
)
type (
@@ -24,8 +26,12 @@ func newRedis(cfg *Config) *Redis {
MinIdleConns: cfg.MinIdleConnCnt,
})
- client.AddHook(&Metric{cfg: cfg})
- client.AddHook(&Logger{})
+ client.AddHook(newMetric(cfg))
+ client.AddHook(newLogger(cfg))
+
+ if err := redisotel.InstrumentTracing(client); err != nil {
+ logger.Panicf("Redis.InstrumentTracing.Error: %s", err)
+ }
r := &Redis{
cfg: cfg,
diff --git a/pkg/client/redis/script.go b/pkg/client/redis/script.go
index 6c961e0..dbb5a16 100644
--- a/pkg/client/redis/script.go
+++ b/pkg/client/redis/script.go
@@ -3,7 +3,7 @@ package redis
import (
"context"
- "github.com/go-redis/redis/v8"
+ "github.com/redis/go-redis/v9"
)
type (
diff --git a/pkg/client/wukong/logger.go b/pkg/client/wukong/logger.go
index c5cd3b0..03ee573 100644
--- a/pkg/client/wukong/logger.go
+++ b/pkg/client/wukong/logger.go
@@ -57,9 +57,9 @@ func loggerAfter(req *Request, resp *Response) error {
}
if level&LoggerResponse == 0 {
- logger.Trace(req.Context).Infow("http_client_end", "baseUrl", req.BaseUrl, "url", req.Url)
+ logger.Trace(req.Context).Infow("http_client_end", "elapsed", req.TraceInfo.ElapsedTime.Milliseconds(), "statusCode", resp.StatusCode(), "request", req.curl)
} else {
- logger.Trace(req.Context).Infow("http_client_end", "elapsed", req.TraceInfo.ElapsedTime.Milliseconds(), "request", req.curl, "response", string(resp.Bytes()))
+ logger.Trace(req.Context).Infow("http_client_end", "elapsed", req.TraceInfo.ElapsedTime.Milliseconds(), "statusCode", resp.StatusCode(), "request", req.curl, "response", string(resp.Bytes()))
}
return nil
diff --git a/pkg/client/wukong/metric.go b/pkg/client/wukong/metric.go
index c7c9767..7d709fd 100644
--- a/pkg/client/wukong/metric.go
+++ b/pkg/client/wukong/metric.go
@@ -1,11 +1,12 @@
package wukong
import (
+ "context"
"strconv"
+ "strings"
"time"
"github.com/boxgo/box/pkg/metric"
- "golang.org/x/net/context"
)
type (
@@ -18,36 +19,39 @@ const (
var (
requestInflight = metric.NewGaugeVec(
- "http_client_request_in_process",
- "http client requesting",
+ "http_client_requests_inflight",
+ "The number of HTTP client requests currently in flight.",
[]string{"method", "baseUrl", "url"},
)
requestCounter = metric.NewCounterVec(
- "http_client_request_total",
- "http client request counter",
- []string{"method", "baseUrl", "url", "statusCode", "error"},
+ "http_client_requests_total",
+ "The total number of HTTP client requests sent.",
+ []string{"method", "baseUrl", "url", "status", "error"},
)
- requestDuration = metric.NewSummaryVec(
- "http_client_request_seconds",
- "http client request duration",
- []string{"method", "baseUrl", "url", "statusCode", "error"},
- map[float64]float64{
- 0.5: 0.05,
- 0.75: 0.05,
- 0.9: 0.01,
- 0.99: 0.001,
- 1: 0.001,
- },
+ requestDuration = metric.NewHistogramVec(
+ "http_client_request_duration_seconds",
+ "The HTTP client request latencies in seconds.",
+ []string{"method", "baseUrl", "url", "status", "error"},
+ // 5ms, 10ms, 25ms, 50ms, 100ms, 250ms, 500ms, 1s, 2.5s, 5s, 10s
+ []float64{0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10},
)
)
+// stripQuery removes query parameters and fragment from URL
+func stripQuery(url string) string {
+ if idx := strings.IndexAny(url, "?#"); idx != -1 {
+ return url[:idx]
+ }
+ return url
+}
+
func metricStart(request *Request) error {
if val, ok := request.Context.Value(metricSwitchKey).(bool); ok && !val {
return nil
}
- requestInflight.WithLabelValues(request.Method, request.BaseUrl, request.Url).Inc()
-
+ url := stripQuery(request.Url)
+ requestInflight.WithLabelValues(request.Method, request.BaseUrl, url).Inc()
request.Context = context.WithValue(request.Context, metricDurationKey{}, time.Now())
return nil
@@ -59,22 +63,23 @@ func metricEnd(request *Request, resp *Response) error {
}
var (
- errMsg = ""
- duration = time.Duration(0)
- statusCode = strconv.Itoa(resp.StatusCode())
+ errMsg = ""
+ duration = time.Duration(0)
+ status = strconv.Itoa(resp.StatusCode())
)
if resp.Error() != nil {
- errMsg = resp.Error().Error()
+ errMsg = "error"
}
if start, ok := request.Context.Value(metricDurationKey{}).(time.Time); ok {
duration = time.Since(start)
}
- requestInflight.WithLabelValues(request.Method, request.BaseUrl, request.Url).Dec()
- requestCounter.WithLabelValues(request.Method, request.BaseUrl, request.Url, statusCode, errMsg).Inc()
- requestDuration.WithLabelValues(request.Method, request.BaseUrl, request.Url, statusCode, errMsg).Observe(duration.Seconds())
+ url := stripQuery(request.Url)
+ requestInflight.WithLabelValues(request.Method, request.BaseUrl, url).Dec()
+ requestCounter.WithLabelValues(request.Method, request.BaseUrl, url, status, errMsg).Inc()
+ requestDuration.WithLabelValues(request.Method, request.BaseUrl, url, status, errMsg).Observe(duration.Seconds())
return nil
}
diff --git a/pkg/client/wukong/request.go b/pkg/client/wukong/request.go
index 970467e..5289bde 100644
--- a/pkg/client/wukong/request.go
+++ b/pkg/client/wukong/request.go
@@ -127,32 +127,65 @@ func (request *Request) Param(param map[string]interface{}) *Request {
return request
}
-// Query
+// Query Method sets multiple URL query key-value pairs. It replaces any existing. array values will contact with ",".
// format:
//
-// 1.map[string]interface{} {"key": "value", "key1": 1}
+// 1.map[string]interface{} {"key": "value", "key1": 1, "key2": [1,2,3]}
func (request *Request) Query(query interface{}) *Request {
switch v := reflect.ValueOf(query); v.Kind() {
case reflect.Map, reflect.Struct:
- request.queryMapOrStruct(request.QueryData, v.Interface())
+ request.queryMapOrStruct(request.QueryData, v.Interface(), true)
case reflect.Ptr:
switch v.Elem().Kind() {
case reflect.Map, reflect.Struct:
- request.queryMapOrStruct(request.QueryData, v.Interface())
+ request.queryMapOrStruct(request.QueryData, v.Interface(), true)
}
}
return request
}
+// AddQuery Method sets multiple URL query key-value pairs. It appends any existing. array values will contact with ",".
+func (request *Request) AddQuery(query interface{}) *Request {
+ switch v := reflect.ValueOf(query); v.Kind() {
+ case reflect.Map, reflect.Struct:
+ request.queryMapOrStruct(request.QueryData, v.Interface(), false)
+ case reflect.Ptr:
+ switch v.Elem().Kind() {
+ case reflect.Map, reflect.Struct:
+ request.queryMapOrStruct(request.QueryData, v.Interface(), false)
+ }
+ }
+
+ return request
+}
+
+// Form Method sets multiple URL form key-value pairs. It replaces any existing. array values will contact with ",".
func (request *Request) Form(form interface{}) *Request {
switch v := reflect.ValueOf(form); v.Kind() {
case reflect.Map, reflect.Struct:
- request.queryMapOrStruct(request.FormData, v.Interface())
+ request.queryMapOrStruct(request.FormData, v.Interface(), true)
case reflect.Ptr:
switch v.Elem().Kind() {
case reflect.Map, reflect.Struct:
- request.queryMapOrStruct(request.FormData, v.Interface())
+ request.queryMapOrStruct(request.FormData, v.Interface(), true)
+ }
+ }
+
+ request.Type(MimeTypeFormData)
+
+ return request
+}
+
+// AddForm Method sets multiple URL form key-value pairs. It appends any existing. array values will contact with ",".
+func (request *Request) AddForm(form interface{}) *Request {
+ switch v := reflect.ValueOf(form); v.Kind() {
+ case reflect.Map, reflect.Struct:
+ request.queryMapOrStruct(request.FormData, v.Interface(), false)
+ case reflect.Ptr:
+ switch v.Elem().Kind() {
+ case reflect.Map, reflect.Struct:
+ request.queryMapOrStruct(request.FormData, v.Interface(), false)
}
}
@@ -338,13 +371,13 @@ func (request *Request) RawRequest() (*http.Request, error) {
return req, err
}
-func (request *Request) queryMapOrStruct(urlVal url.Values, query interface{}) {
- if err := Map2URLValues(urlVal, query); err != nil {
+func (request *Request) queryMapOrStruct(urlVal url.Values, query interface{}, replace bool) {
+ if err := Map2URLValues(urlVal, query, replace); err != nil {
request.Error = err
}
}
-func Map2URLValues(values url.Values, data interface{}) error {
+func Map2URLValues(values url.Values, data interface{}, replace bool) error {
var (
err error
dataMap = map[string]interface{}{}
@@ -357,20 +390,39 @@ func Map2URLValues(values url.Values, data interface{}) error {
for k, v := range dataMap {
switch val := v.(type) {
case []interface{}:
- for _, e := range val {
- values.Add(k, fmt.Sprintf("%v", e))
+ vals := make([]string, len(val))
+ for i, e := range val {
+ vals[i] = fmt.Sprintf("%v", e)
+ }
+
+ if replace {
+ values.Set(k, strings.Join(vals, ","))
+ } else {
+ values.Add(k, strings.Join(vals, ","))
}
case nil:
continue
case string:
- values.Add(k, val)
+ if replace {
+ values.Set(k, val)
+ } else {
+ values.Add(k, val)
+ }
case float64:
- values.Add(k, strconv.FormatFloat(val, 'f', -1, 64))
+ if replace {
+ values.Set(k, strconv.FormatFloat(val, 'f', -1, 64))
+ } else {
+ values.Add(k, strconv.FormatFloat(val, 'f', -1, 64))
+ }
default:
if j, err := json.NewMarshaler().Marshal(v); err != nil {
continue
} else {
- values.Add(k, string(j))
+ if replace {
+ values.Set(k, string(j))
+ } else {
+ values.Add(k, string(j))
+ }
}
}
}
diff --git a/pkg/client/wukong/request_test.go b/pkg/client/wukong/request_test.go
index 3ecde58..3c5706f 100644
--- a/pkg/client/wukong/request_test.go
+++ b/pkg/client/wukong/request_test.go
@@ -6,6 +6,7 @@ import (
"io/ioutil"
"net/http"
"net/http/httptest"
+ "net/url"
"os"
"path/filepath"
"strings"
@@ -123,7 +124,9 @@ func TestParam(t *testing.T) {
func TestQuery(t *testing.T) {
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- testutil.ExpectEqual(t, r.URL.String(), "/?bool=true&float32=2.3&float64=4.5&int=1&int_array=1&int_array=2&interface_array=0&interface_array=true&interface_array=1.1&interface_array=string&string=string&string_array=a&string_array=b&uint=0")
+ q, _ := url.QueryUnescape(r.URL.String())
+
+ testutil.ExpectEqual(t, q, "/?bool=true&float32=2.3&float64=4.5&int=1&int_array=1,2&interface_array=0,true,1.1,string&string=string&string_array=a,b&uint=0")
w.WriteHeader(200)
}))
diff --git a/pkg/client/wukong/wukong.go b/pkg/client/wukong/wukong.go
index d825278..12e3124 100644
--- a/pkg/client/wukong/wukong.go
+++ b/pkg/client/wukong/wukong.go
@@ -1,13 +1,17 @@
package wukong
import (
+ "context"
"math/rand"
"net"
"net/http"
+ "net/http/httptrace"
"sync"
"time"
"github.com/boxgo/box/pkg/logger"
+ "go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace"
+ "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
)
type (
@@ -58,20 +62,26 @@ func newClients(count int) []*http.Client {
func newClient() *http.Client {
return &http.Client{
- Transport: &http.Transport{
- Proxy: http.ProxyFromEnvironment,
- DialContext: (&net.Dialer{
- Timeout: 30 * time.Second,
- KeepAlive: 30 * time.Second,
- }).DialContext,
- ForceAttemptHTTP2: true,
- MaxIdleConns: 0,
- MaxIdleConnsPerHost: 50,
- MaxConnsPerHost: 0,
- IdleConnTimeout: 90 * time.Second,
- TLSHandshakeTimeout: 10 * time.Second,
- ExpectContinueTimeout: 1 * time.Second,
- },
+ Transport: otelhttp.NewTransport(
+ &http.Transport{
+ Proxy: http.ProxyFromEnvironment,
+ DialContext: (&net.Dialer{
+ Timeout: 30 * time.Second,
+ KeepAlive: 30 * time.Second,
+ }).DialContext,
+ DisableKeepAlives: false, // 启用连接复用 (KeepAlive)
+ ForceAttemptHTTP2: true, // 尝试http2
+ MaxIdleConns: 500, // 允许最大空闲连接数
+ MaxIdleConnsPerHost: 100, // 限制每个主机的最大空闲连接数
+ MaxConnsPerHost: 200, // 限制每个主机的最大连接数 (防止过载)
+ IdleConnTimeout: 90 * time.Second, // 空闲连接超时时间
+ TLSHandshakeTimeout: 10 * time.Second, // TLS握手超时时间
+ ExpectContinueTimeout: 1 * time.Second, // 100-continue 超时时间
+ },
+ otelhttp.WithClientTrace(func(ctx context.Context) *httptrace.ClientTrace {
+ return otelhttptrace.NewClientTrace(ctx)
+ }),
+ ),
Timeout: time.Second * 10,
}
}
diff --git a/pkg/config/source/redis/redis.go b/pkg/config/source/redis/redis.go
index a8e2c21..c62d955 100644
--- a/pkg/config/source/redis/redis.go
+++ b/pkg/config/source/redis/redis.go
@@ -7,7 +7,7 @@ import (
"github.com/boxgo/box/pkg/config/source"
"github.com/boxgo/box/pkg/util/strutil"
- "github.com/go-redis/redis/v8"
+ "github.com/redis/go-redis/v9"
)
type (
diff --git a/pkg/locker/locker.go b/pkg/locker/locker.go
index f301411..476d518 100644
--- a/pkg/locker/locker.go
+++ b/pkg/locker/locker.go
@@ -10,8 +10,8 @@ import (
type (
MutexLocker interface {
- Lock(context.Context, string, time.Duration) (bool, error)
- IsLocked(context.Context, string) (bool, error)
+ Lock(context.Context, string, time.Duration) (success bool, err error)
+ IsLocked(context.Context, string) (locked bool, err error)
UnLock(context.Context, string) error
}
)
diff --git a/pkg/metric/metric.go b/pkg/metric/metric.go
index b74a970..30d96e8 100644
--- a/pkg/metric/metric.go
+++ b/pkg/metric/metric.go
@@ -52,8 +52,9 @@ func (m *Metric) Serve(context.Context) error {
defer ticker.Stop()
pusher := push.
- New(m.cfg.PushTargetURL, config.ServiceName()+"-"+config.ServiceVersion()).
+ New(m.cfg.PushTargetURL, config.ServiceName()).
Gatherer(prometheus.DefaultRegisterer.(prometheus.Gatherer)).
+ Grouping("namespace", config.ServiceNamespace()).
Grouping("instance", system.Hostname())
for {
diff --git a/pkg/otle/otle.go b/pkg/otle/otle.go
new file mode 100644
index 0000000..a8b0d6e
--- /dev/null
+++ b/pkg/otle/otle.go
@@ -0,0 +1,65 @@
+package otle
+
+import (
+ "context"
+ "time"
+
+ "github.com/boxgo/box/pkg/config"
+ "github.com/boxgo/box/pkg/system"
+ "google.golang.org/grpc"
+
+ "go.opentelemetry.io/otel"
+ "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc"
+ "go.opentelemetry.io/otel/propagation"
+ sdkresour "go.opentelemetry.io/otel/sdk/resource"
+ sdktrace "go.opentelemetry.io/otel/sdk/trace"
+ semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
+)
+
+func InitProvider(ctx context.Context, agentAddr string) (func(), error) {
+ res, err := sdkresour.New(ctx,
+ sdkresour.WithFromEnv(),
+ sdkresour.WithProcess(),
+ sdkresour.WithTelemetrySDK(),
+ sdkresour.WithHost(),
+ sdkresour.WithOSType(),
+ sdkresour.WithContainerID(),
+ sdkresour.WithAttributes(
+ semconv.ServiceNamespaceKey.String(config.ServiceNamespace()),
+ semconv.ServiceNameKey.String(config.ServiceName()),
+ semconv.ServiceVersionKey.String(config.ServiceVersion()),
+ semconv.ServiceInstanceIDKey.String(system.Hostname()),
+ ),
+ )
+
+ if err != nil {
+ return nil, err
+ }
+
+ traceExp, err := otlptracegrpc.New(
+ ctx,
+ otlptracegrpc.WithInsecure(),
+ otlptracegrpc.WithEndpoint(agentAddr),
+ otlptracegrpc.WithDialOption(grpc.WithBlock()))
+ if err != nil {
+ return nil, err
+ }
+
+ bsp := sdktrace.NewBatchSpanProcessor(traceExp)
+ tracerProvider := sdktrace.NewTracerProvider(
+ sdktrace.WithSampler(sdktrace.AlwaysSample()),
+ sdktrace.WithResource(res),
+ sdktrace.WithSpanProcessor(bsp),
+ )
+
+ otel.SetTextMapPropagator(propagation.NewCompositeTextMapPropagator(propagation.TraceContext{}, propagation.Baggage{}))
+ otel.SetTracerProvider(tracerProvider)
+
+ return func() {
+ cxt, cancel := context.WithTimeout(ctx, time.Second)
+ defer cancel()
+ if err := traceExp.Shutdown(cxt); err != nil {
+ otel.Handle(err)
+ }
+ }, nil
+}
diff --git a/pkg/schedule/schedule.go b/pkg/schedule/schedule.go
index 34bca12..53cc744 100644
--- a/pkg/schedule/schedule.go
+++ b/pkg/schedule/schedule.go
@@ -48,9 +48,16 @@ type (
var (
scheduleCounter = metric.NewCounterVec(
- "schedule_total",
- "schedule counter",
- []string{"task", "error", "panic"},
+ "schedule_jobs_total",
+ "The total number of scheduled jobs executed.",
+ []string{"task", "result"},
+ )
+ scheduleDuration = metric.NewHistogramVec(
+ "schedule_job_duration_seconds",
+ "The duration of scheduled jobs.",
+ []string{"task", "result"},
+ // 1s, 2.5s, 5s, 10s, 30s, 60s, 5m, 10m, 30m, 1h
+ []float64{1, 2.5, 5, 10, 30, 60, 300, 600, 1800, 3600},
)
)
@@ -208,24 +215,28 @@ func (sch *Schedule) exec(handler Handler) {
defer func() {
journal.EndTime = time.Now()
journal.Panic = recover()
+ duration := journal.EndTime.Sub(journal.StartTime).Seconds()
+ result := "success"
if journal.Panic != nil {
+ result = "panic"
logger.Trace(ctx).Errorf("Schedule crash: %+v\n%s", journal.Panic, debug.Stack())
- scheduleCounter.WithLabelValues(sch.key(), "", fmt.Sprintf("%s", journal.Panic)).Inc()
+ } else if journal.Error != nil {
+ result = "error"
+ logger.Trace(ctx).Errorf("Schedule run error: [%s]", journal.Error)
+ } else {
+ logger.Trace(ctx).Infof("Schedule run success")
}
+ scheduleCounter.WithLabelValues(sch.key(), result).Inc()
+ scheduleDuration.WithLabelValues(sch.key(), result).Observe(duration)
+
sch.recorder(journal)
}()
logger.Trace(ctx).Infof("Schedule run start")
- if journal.Error = handler(ctx); journal.Error != nil {
- logger.Trace(ctx).Errorf("Schedule run error: [%s]", journal.Error)
- scheduleCounter.WithLabelValues(sch.key(), journal.Error.Error(), "").Inc()
- } else {
- logger.Trace(ctx).Infof("Schedule run success")
- scheduleCounter.WithLabelValues(sch.key(), "", "").Inc()
- }
+ journal.Error = handler(ctx)
}()
}
diff --git a/pkg/server/ginserver/mid/ginotle/config.go b/pkg/server/ginserver/mid/ginotle/config.go
new file mode 100644
index 0000000..8bd150c
--- /dev/null
+++ b/pkg/server/ginserver/mid/ginotle/config.go
@@ -0,0 +1,77 @@
+package ginotle
+
+import (
+ "fmt"
+ "strings"
+
+ "github.com/boxgo/box/pkg/config"
+ "github.com/boxgo/box/pkg/logger"
+ "github.com/gin-gonic/gin"
+)
+
+type (
+ // Config 配置
+ Config struct {
+ path string
+ requestURLMappingFn func(*gin.Context) string
+ }
+
+ // OptionFunc 选项信息
+ OptionFunc func(*Config)
+)
+
+// WithURLMapping set up url mapping func
+// default is: UrlMapping
+func WithURLMapping(fn func(*gin.Context) string) OptionFunc {
+ return func(options *Config) {
+ options.requestURLMappingFn = fn
+ }
+}
+
+// StdConfig 标准配置
+func StdConfig(key string, optionFunc ...OptionFunc) *Config {
+ cfg := DefaultConfig(key)
+ for _, fn := range optionFunc {
+ fn(cfg)
+ }
+
+ if err := config.Scan(cfg); err != nil {
+ logger.Panicf("GinOTLE load config error: %s", err)
+ } else {
+ logger.Debugw("GinOTLE load config", "config", cfg)
+ }
+
+ return cfg
+}
+
+// DefaultConfig 默认配置
+func DefaultConfig(key string) *Config {
+ return &Config{
+ path: fmt.Sprintf("gin.%s.middlewares.otle", key),
+ requestURLMappingFn: UrlMapping,
+ }
+}
+
+// Build 构建实例
+func (c *Config) Build() *GinOTLE {
+ return newGinOTLE(c)
+}
+
+// Path 实例配置目录
+func (c *Config) Path() string {
+ return c.path
+}
+
+func UrlMapping(c *gin.Context) string {
+ url := c.Request.URL.Path
+
+ for _, p := range c.Params {
+ url = strings.Replace(url, "/"+p.Value, "/:"+p.Key, 1)
+ }
+
+ if len(url) > 200 {
+ return url[:197] + "..."
+ }
+
+ return url
+}
diff --git a/pkg/server/ginserver/mid/ginotle/default.go b/pkg/server/ginserver/mid/ginotle/default.go
new file mode 100644
index 0000000..3b7fc8e
--- /dev/null
+++ b/pkg/server/ginserver/mid/ginotle/default.go
@@ -0,0 +1,13 @@
+package ginotle
+
+import (
+ "github.com/gin-gonic/gin"
+)
+
+var (
+ Default = StdConfig("default").Build()
+)
+
+func Handler() gin.HandlerFunc {
+ return Default.Handler()
+}
diff --git a/pkg/server/ginserver/mid/ginotle/ginotle.go b/pkg/server/ginserver/mid/ginotle/ginotle.go
new file mode 100644
index 0000000..27da272
--- /dev/null
+++ b/pkg/server/ginserver/mid/ginotle/ginotle.go
@@ -0,0 +1,90 @@
+package ginotle
+
+import (
+ "fmt"
+
+ "github.com/boxgo/box/pkg/config"
+ "github.com/gin-gonic/gin"
+ "go.opentelemetry.io/otel"
+ "go.opentelemetry.io/otel/attribute"
+ "go.opentelemetry.io/otel/propagation"
+ "go.opentelemetry.io/otel/semconv/v1.13.0/httpconv"
+ semconv "go.opentelemetry.io/otel/semconv/v1.25.0"
+ "go.opentelemetry.io/otel/trace"
+)
+
+type (
+ GinOTLE struct {
+ cfg *Config
+ tracer trace.Tracer
+ textMapPropagator propagation.TextMapPropagator
+ }
+)
+
+func newGinOTLE(c *Config) *GinOTLE {
+ tracer := otel.Tracer("")
+ propagators := otel.GetTextMapPropagator()
+
+ return &GinOTLE{
+ cfg: c,
+ tracer: tracer,
+ textMapPropagator: propagators,
+ }
+}
+
+func (prom *GinOTLE) Handler() gin.HandlerFunc {
+ return func(c *gin.Context) {
+ savedCtx := c.Request.Context()
+ defer func() {
+ c.Request = c.Request.WithContext(savedCtx)
+ }()
+
+ ctx := prom.textMapPropagator.Extract(savedCtx, propagation.HeaderCarrier(c.Request.Header))
+ opts := []trace.SpanStartOption{
+ trace.WithAttributes(httpconv.ServerRequest(config.ServiceName(), c.Request)...),
+ trace.WithSpanKind(trace.SpanKindServer),
+ }
+ var spanName string
+ spanName = c.FullPath()
+ if spanName == "" {
+ spanName = fmt.Sprintf("HTTP %s route not found", c.Request.Method)
+ } else {
+ rAttr := semconv.HTTPRoute(spanName)
+ opts = append(opts, trace.WithAttributes(rAttr))
+ }
+
+ traceID := c.Request.Header.Get("trace-id")
+ spanID := c.Request.Header.Get("span-id")
+
+ traceId, _ := trace.TraceIDFromHex(traceID)
+ spanId, _ := trace.SpanIDFromHex(spanID)
+
+ spanCtx := trace.NewSpanContext(trace.SpanContextConfig{
+ TraceID: traceId,
+ SpanID: spanId,
+ TraceFlags: trace.FlagsSampled, // 这个没写,是不会记录的
+ TraceState: trace.TraceState{},
+ Remote: true,
+ })
+ // 不用 pctx,不会把 spanctx 当做 parentCtx
+ ctx = trace.ContextWithRemoteSpanContext(ctx, spanCtx)
+
+ ctx, span := prom.tracer.Start(ctx, spanName, opts...)
+ defer span.End()
+
+ // pass the span through the request context
+ c.Request = c.Request.WithContext(ctx)
+
+ // serve the request to the next middleware
+ c.Next()
+
+ status := c.Writer.Status()
+ span.SetStatus(httpconv.ServerStatus(status))
+ if status > 0 {
+ span.SetAttributes(semconv.HTTPStatusCode(status))
+ }
+ if len(c.Errors) > 0 {
+ span.SetAttributes(attribute.String("gin.errors", c.Errors.String()))
+ }
+ }
+}
diff --git a/pkg/server/ginserver/mid/ginotle/testdata/ci.yaml b/pkg/server/ginserver/mid/ginotle/testdata/ci.yaml
new file mode 100644
index 0000000..3848c1c
--- /dev/null
+++ b/pkg/server/ginserver/mid/ginotle/testdata/ci.yaml
@@ -0,0 +1,16 @@
+name: box
+version: 1.0.0
+
+logger:
+ default:
+ level: error
+ outputPaths:
+ - stdout
+ errorOutputPaths:
+ - stderr
+
+gin:
+ default:
+ addr: ":9000"
+ middlewares:
+ otle:
diff --git a/pkg/server/ginserver/mid/ginotle/testdata/local.yaml b/pkg/server/ginserver/mid/ginotle/testdata/local.yaml
new file mode 100644
index 0000000..3848c1c
--- /dev/null
+++ b/pkg/server/ginserver/mid/ginotle/testdata/local.yaml
@@ -0,0 +1,16 @@
+name: box
+version: 1.0.0
+
+logger:
+ default:
+ level: error
+ outputPaths:
+ - stdout
+ errorOutputPaths:
+ - stderr
+
+gin:
+ default:
+ addr: ":9000"
+ middlewares:
+ otle:
diff --git a/pkg/server/ginserver/mid/ginprom/ginprom.go b/pkg/server/ginserver/mid/ginprom/ginprom.go
index 7567b14..ad21696 100644
--- a/pkg/server/ginserver/mid/ginprom/ginprom.go
+++ b/pkg/server/ginserver/mid/ginprom/ginprom.go
@@ -10,70 +10,59 @@ import (
type (
GinProm struct {
- cfg *Config
- processingGauge *metric.GaugeVec
- reqSizeSummary *metric.SummaryVec
- reqBeginCounter *metric.CounterVec
- reqFinishCounter *metric.CounterVec
- reqDurationSummary *metric.SummaryVec
- resSizeSummary *metric.SummaryVec
+ cfg *Config
}
)
+var (
+ // Saturation: 饱和度 (Requests Inflight)
+ // 衡量服务当前的忙碌程度,通常使用正在处理的请求数来表示。
+ reqInFlight = metric.NewGaugeVec(
+ "http_server_requests_inflight",
+ "The number of HTTP requests currently being processed.",
+ []string{"method", "url"},
+ )
+
+ // Traffic: 流量 (Request Rate & Size)
+ // 衡量服务的吞吐量,通常使用每秒请求数 (QPS) 或带宽 (IOPS) 来表示。
+ // 这里包含了请求总数(reqTotal)、请求包大小(reqSize)和响应包大小(resSize)。
+ // Errors: 错误 (Error Rate)
+ // 衡量请求失败的比例。
+ // 通过 reqTotal 指标中的 status 和 errcode 标签来计算错误率。
+ reqTotal = metric.NewCounterVec(
+ "http_server_requests_total",
+ "The total number of HTTP requests processed.",
+ []string{"method", "url", "status", "errcode"},
+ )
+ reqSize = metric.NewHistogramVec(
+ "http_server_request_size_bytes",
+ "The HTTP request body sizes in bytes.",
+ []string{"method", "url"},
+ // 1KB, 5KB, 10KB, 100KB, 1MB, 10MB
+ []float64{1024, 5120, 10240, 102400, 1048576, 10485760},
+ )
+ resSize = metric.NewHistogramVec(
+ "http_server_response_size_bytes",
+ "The HTTP response body sizes in bytes.",
+ []string{"method", "url", "status", "errcode"},
+ // 1KB, 5KB, 10KB, 100KB, 1MB, 10MB
+ []float64{1024, 5120, 10240, 102400, 1048576, 10485760},
+ )
+
+ // Latency: 延迟 (Request Duration)
+ // 衡量服务处理请求所需的时间。
+ reqDuration = metric.NewHistogramVec(
+ "http_server_request_duration_seconds",
+ "The HTTP request latencies in seconds.",
+ []string{"method", "url", "status", "errcode"},
+ // 5ms, 10ms, 25ms, 50ms, 100ms, 250ms, 500ms, 1s, 2.5s, 5s, 10s
+ []float64{0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10},
+ )
+)
+
func newGinProm(c *Config) *GinProm {
return &GinProm{
cfg: c,
- processingGauge: metric.NewGaugeVec(
- "http_server_processing_request",
- "http server processing request",
- []string{"method", "url"},
- ),
- reqSizeSummary: metric.NewSummaryVec(
- "http_server_request_size_bytes",
- "The HTTP request sizes in bytes.",
- []string{"method", "url"},
- map[float64]float64{
- 0.5: 0.05,
- 0.75: 0.05,
- 0.9: 0.01,
- 0.99: 0.001,
- 1: 0.001,
- },
- ),
- reqBeginCounter: metric.NewCounterVec(
- "http_server_request_begin_total",
- "How many HTTP requests ready to process.",
- []string{"method", "url"},
- ),
- reqFinishCounter: metric.NewCounterVec(
- "http_server_request_finish_total",
- "How many HTTP requests processed.",
- []string{"method", "url", "status", "errcode"},
- ),
- reqDurationSummary: metric.NewSummaryVec(
- "http_server_request_duration_seconds",
- "The HTTP request latencies in seconds.",
- []string{"method", "url", "status", "errcode"},
- map[float64]float64{
- 0.5: 0.05,
- 0.75: 0.05,
- 0.9: 0.01,
- 0.99: 0.001,
- 1: 0.001,
- },
- ),
- resSizeSummary: metric.NewSummaryVec(
- "http_server_response_size_bytes",
- "The HTTP response sizes in bytes.",
- []string{"method", "url", "status", "errcode"},
- map[float64]float64{
- 0.5: 0.05,
- 0.75: 0.05,
- 0.9: 0.01,
- 0.99: 0.001,
- 1: 0.001,
- },
- ),
}
}
@@ -85,13 +74,13 @@ func (prom *GinProm) Handler() gin.HandlerFunc {
prom.cfg.requestURLMappingFn(ctx),
}
- reqSz := computeApproximateRequestSize(ctx.Request)
+ // Saturation: +1
+ reqInFlight.WithLabelValues(labels...).Inc()
+ defer reqInFlight.WithLabelValues(labels...).Dec()
- prom.processingGauge.WithLabelValues(labels...).Inc()
- prom.reqSizeSummary.WithLabelValues(labels...).Observe(reqSz)
- prom.reqBeginCounter.WithLabelValues(labels...).Inc()
-
- defer prom.processingGauge.WithLabelValues(labels...).Dec()
+ // Traffic: Request Size
+ reqSz := computeApproximateRequestSize(ctx.Request)
+ reqSize.WithLabelValues(labels...).Observe(reqSz)
ctx.Next()
@@ -101,8 +90,12 @@ func (prom *GinProm) Handler() gin.HandlerFunc {
}
labels = append(labels, strconv.Itoa(ctx.Writer.Status()), strconv.Itoa(ctx.GetInt("errcode")))
- prom.resSizeSummary.WithLabelValues(labels...).Observe(float64(resSz))
- prom.reqFinishCounter.WithLabelValues(labels...).Inc()
- prom.reqDurationSummary.WithLabelValues(labels...).Observe(time.Since(start).Seconds())
+
+ // Traffic: Response Size & Total Count (implies Errors via labels)
+ resSize.WithLabelValues(labels...).Observe(float64(resSz))
+ reqTotal.WithLabelValues(labels...).Inc()
+
+ // Latency
+ reqDuration.WithLabelValues(labels...).Observe(time.Since(start).Seconds())
}
}
diff --git a/pkg/server/ginserver/mid/ginsession/default.go b/pkg/server/ginserver/mid/ginsession/default.go
index dcc3efe..a3bb912 100644
--- a/pkg/server/ginserver/mid/ginsession/default.go
+++ b/pkg/server/ginserver/mid/ginsession/default.go
@@ -1,7 +1,7 @@
package ginsession
import (
- "github.com/boxgo/redisstore/v2/serializer"
+ "github.com/boxgo/redisstore/v3/serializer"
"github.com/gin-gonic/gin"
)
diff --git a/pkg/server/ginserver/mid/ginsession/ginsession.go b/pkg/server/ginserver/mid/ginsession/ginsession.go
index 341d5e8..9e2755a 100644
--- a/pkg/server/ginserver/mid/ginsession/ginsession.go
+++ b/pkg/server/ginserver/mid/ginsession/ginsession.go
@@ -3,8 +3,8 @@ package ginsession
import (
"github.com/boxgo/box/pkg/client/redis"
- "github.com/boxgo/redisstore/v2"
- "github.com/boxgo/redisstore/v2/serializer"
+ "github.com/boxgo/redisstore/v3"
+ "github.com/boxgo/redisstore/v3/serializer"
"github.com/gin-contrib/sessions"
"github.com/gin-contrib/sessions/cookie"
"github.com/gin-gonic/gin"
diff --git a/pkg/server/ginserver/mid/ginsession/mock.go b/pkg/server/ginserver/mid/ginsession/mock.go
index c7a5733..9c2f66f 100644
--- a/pkg/server/ginserver/mid/ginsession/mock.go
+++ b/pkg/server/ginserver/mid/ginsession/mock.go
@@ -6,8 +6,8 @@ import (
"net/http"
"net/http/httptest"
- "github.com/boxgo/redisstore/v2"
- "github.com/boxgo/redisstore/v2/serializer"
+ "github.com/boxgo/redisstore/v3"
+ "github.com/boxgo/redisstore/v3/serializer"
"github.com/gorilla/sessions"
)
diff --git a/pkg/server/ginserver/mid/ginsession/redis_store.go b/pkg/server/ginserver/mid/ginsession/redis_store.go
index 94a6680..17cd658 100644
--- a/pkg/server/ginserver/mid/ginsession/redis_store.go
+++ b/pkg/server/ginserver/mid/ginsession/redis_store.go
@@ -1,7 +1,7 @@
package ginsession
import (
- "github.com/boxgo/redisstore/v2"
+ "github.com/boxgo/redisstore/v3"
"github.com/gin-contrib/sessions"
)
diff --git a/pkg/server/grpcserver/interceptor/metric/metric.go b/pkg/server/grpcserver/interceptor/metric/metric.go
index ea3bb8f..d25425b 100644
--- a/pkg/server/grpcserver/interceptor/metric/metric.go
+++ b/pkg/server/grpcserver/interceptor/metric/metric.go
@@ -11,32 +11,41 @@ import (
)
var (
- handledCounter = metric.NewCounterVec(
- "grpc_server_handled_total",
- "gGPC server handle msg count",
+ // Saturation
+ reqInflight = metric.NewGaugeVec(
+ "grpc_server_requests_inflight",
+ "The number of gRPC requests currently being processed.",
+ []string{"method", "type"},
+ )
+
+ // Traffic & Errors
+ reqTotal = metric.NewCounterVec(
+ "grpc_server_requests_total",
+ "The total number of gRPC requests processed.",
[]string{"method", "type", "code"},
)
- handledSeconds = metric.NewSummaryVec(
- "grpc_server_handled_second",
- "gGPC server handle msg duration",
+
+ // Latency
+ reqDuration = metric.NewHistogramVec(
+ "grpc_server_request_duration_seconds",
+ "The gRPC request latencies in seconds.",
[]string{"method", "type", "code"},
- map[float64]float64{
- 0.5: 0.05,
- 0.75: 0.05,
- 0.9: 0.01,
- 0.99: 0.001,
- 1: 0.001,
- },
+ // .005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10
+ []float64{0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10},
)
)
func UnaryServerInterceptor() grpc.UnaryServerInterceptor {
return func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) {
start := time.Now()
+ typ := "unary"
+
+ reqInflight.WithLabelValues(info.FullMethod, typ).Inc()
+ defer reqInflight.WithLabelValues(info.FullMethod, typ).Dec()
resp, err := handler(ctx, req)
- report(info.FullMethod, "unary", start, err)
+ report(info.FullMethod, typ, start, err)
return resp, err
}
@@ -45,17 +54,22 @@ func UnaryServerInterceptor() grpc.UnaryServerInterceptor {
func StreamServerInterceptor() grpc.StreamServerInterceptor {
return func(srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error {
start := time.Now()
-
- err := handler(srv, ss)
-
+ typ := "stream"
if info.IsClientStream && info.IsServerStream {
- report(info.FullMethod, "stream_bidi", start, err)
+ typ = "stream_bidi"
} else if info.IsClientStream {
- report(info.FullMethod, "stream_client", start, err)
+ typ = "stream_client"
} else if info.IsServerStream {
- report(info.FullMethod, "stream_server", start, err)
+ typ = "stream_server"
}
+ reqInflight.WithLabelValues(info.FullMethod, typ).Inc()
+ defer reqInflight.WithLabelValues(info.FullMethod, typ).Dec()
+
+ err := handler(srv, ss)
+
+ report(info.FullMethod, typ, start, err)
+
return err
}
}
@@ -69,6 +83,6 @@ func report(method, typ string, start time.Time, err error) {
labels = []string{method, typ, "0"}
}
- handledCounter.WithLabelValues(labels...).Inc()
- handledSeconds.WithLabelValues(labels...).Observe(time.Since(start).Seconds())
+ reqTotal.WithLabelValues(labels...).Inc()
+ reqDuration.WithLabelValues(labels...).Observe(time.Since(start).Seconds())
}
diff --git a/pkg/server/grpcserver/interceptor/recovery/recovery.go b/pkg/server/grpcserver/interceptor/recovery/recovery.go
index 67f2b96..cdcd83a 100644
--- a/pkg/server/grpcserver/interceptor/recovery/recovery.go
+++ b/pkg/server/grpcserver/interceptor/recovery/recovery.go
@@ -12,9 +12,9 @@ import (
var (
panicCounter = metric.NewCounterVec(
- "grpc_server_panic_total",
- "grpc server panic counter",
- []string{"method", "panic"},
+ "grpc_server_panics_total",
+ "The total number of gRPC server panics.",
+ []string{"method"},
)
)
@@ -27,7 +27,7 @@ func UnaryServerInterceptor() grpc.UnaryServerInterceptor {
logger.Errorw("grpc unary server panic:", "panicked", panicked, "panic", panicErr)
err = errcode.ErrGRPCServerPanic.Build(panicErr)
- panicCounter.WithLabelValues(info.FullMethod, fmt.Sprintf("%s", panicErr)).Inc()
+ panicCounter.WithLabelValues(info.FullMethod).Inc()
}
}()
@@ -47,7 +47,7 @@ func StreamServerInterceptor() grpc.StreamServerInterceptor {
logger.Errorw("grpc stream server panic:", "panicked", panicked, "panic", panicErr)
err = errcode.ErrGRPCServerPanic.Build(panicErr)
- panicCounter.WithLabelValues(info.FullMethod, fmt.Sprintf("%s", panicErr)).Inc()
+ panicCounter.WithLabelValues(info.FullMethod).Inc()
}
}()
diff --git a/pkg/trace/config.go b/pkg/trace/config.go
index beda781..f0b22ef 100644
--- a/pkg/trace/config.go
+++ b/pkg/trace/config.go
@@ -33,7 +33,7 @@ func StdConfig() *Config {
func DefaultConfig() *Config {
return &Config{
TraceUID: "box.trace.uid",
- TraceReqID: "box.trace.reqId",
+ TraceReqID: "X-Request-Id",
TraceSpanID: "box.trace.spanId",
TraceBizID: "box.trace.bizId",
}