Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
253 changes: 253 additions & 0 deletions docs/grafana-dashboard-billing-deduct.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,253 @@
{
"__inputs": [],
"__elements": {},
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "11.5.2"
},
{
"type": "datasource",
"id": "prometheus",
"name": "Prometheus",
"version": "2.x"
}
],
"annotations": { "list": [] },
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": null,
"links": [],
"panels": [
{
"collapsed": false,
"gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 },
"id": 1,
"panels": [],
"title": "Billing Deduct Latency",
"type": "row"
},
{
"datasource": { "type": "prometheus", "uid": "$datasource" },
"description": "Histogram showing the distribution of POST /api/billing/deduct response times",
"fieldConfig": {
"defaults": {
"color": { "mode": "palette-classic" },
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "bars",
"fillOpacity": 80,
"gradientMode": "none",
"hideFrom": {
"graph": false,
"legend": false,
"tooltip": false
},
"lineWidth": 1,
"scaleDistribution": { "type": "linear" },
"thresholdsStyle": { "mode": "off" }
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "green", "value": null },
{ "color": "red", "value": 80 }
]
},
"unit": "s"
},
"overrides": []
},
"gridPos": { "h": 8, "w": 12, "x": 0, "y": 1 },
"id": 2,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"hideZeros": false,
"mode": "multi",
"sort": "none"
}
},
"pluginVersion": "11.5.2",
"targets": [
{
"datasource": { "type": "prometheus", "uid": "$datasource" },
"disableTextWrap": false,
"editorMode": "code",
"expr": "rate(billing_deduct_duration_seconds_bucket{route=\"/api/billing/deduct\"}[$__rate_interval])",
"fullMetaSearch": false,
"includeNullMetadata": true,
"legendFormat": "le={{le}}",
"range": true,
"refId": "A",
"useBackend": false
}
],
"title": "Billing Deduct Duration (Cumulative Distribution)",
"type": "timeseries"
},
{
"datasource": { "type": "prometheus", "uid": "$datasource" },
"description": "P50, P95, and P99 latency percentiles for billing deduct",
"fieldConfig": {
"defaults": {
"color": { "mode": "palette-classic" },
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisLabel": "Latency (s)",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 10,
"gradientMode": "none",
"hideFrom": {
"graph": false,
"legend": false,
"tooltip": false
},
"lineInterpolation": "smooth",
"lineWidth": 2,
"pointSize": 3,
"scaleDistribution": { "type": "linear" },
"showPoints": "never",
"spanNulls": true,
"stacking": { "group": "A", "mode": "none" },
"thresholdsStyle": { "mode": "off" }
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{ "color": "green", "value": null },
{ "color": "red", "value": 80 }
]
},
"unit": "s"
},
"overrides": [
{
"matcher": { "id": "byName", "options": "P99" },
"properties": [
{ "id": "color", "value": { "fixed": "red" } },
{ "id": "custom.lineWidth", "value": 2 }
]
},
{
"matcher": { "id": "byName", "options": "P95" },
"properties": [
{ "id": "color", "value": { "fixed": "orange" } },
{ "id": "custom.lineWidth", "value": 2 }
]
},
{
"matcher": { "id": "byName", "options": "P50" },
"properties": [
{ "id": "color", "value": { "fixed": "green" } }
]
}
]
},
"gridPos": { "h": 8, "w": 12, "x": 12, "y": 1 },
"id": 3,
"options": {
"legend": {
"calcs": [],
"displayMode": "table",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"hideZeros": false,
"mode": "multi",
"sort": "none"
}
},
"pluginVersion": "11.5.2",
"targets": [
{
"datasource": { "type": "prometheus", "uid": "$datasource" },
"disableTextWrap": false,
"editorMode": "code",
"expr": "histogram_quantile(0.50, rate(billing_deduct_duration_seconds_bucket{route=\"/api/billing/deduct\"}[$__rate_interval]))",
"fullMetaSearch": false,
"includeNullMetadata": true,
"legendFormat": "P50",
"range": true,
"refId": "A",
"useBackend": false
},
{
"datasource": { "type": "prometheus", "uid": "$datasource" },
"disableTextWrap": false,
"editorMode": "code",
"expr": "histogram_quantile(0.95, rate(billing_deduct_duration_seconds_bucket{route=\"/api/billing/deduct\"}[$__rate_interval]))",
"hide": false,
"legendFormat": "P95",
"range": true,
"refId": "B",
"useBackend": false
},
{
"datasource": { "type": "prometheus", "uid": "$datasource" },
"disableTextWrap": false,
"editorMode": "code",
"expr": "histogram_quantile(0.99, rate(billing_deduct_duration_seconds_bucket{route=\"/api/billing/deduct\"}[$__rate_interval]))",
"hide": false,
"legendFormat": "P99",
"range": true,
"refId": "C",
"useBackend": false
}
],
"title": "Billing Deduct Latency Percentiles (P50 / P95 / P99)",
"type": "timeseries"
}
],
"preload": false,
"refresh": "30s",
"schemaVersion": 41,
"tags": ["callora", "billing", "deduct", "latency"],
"templating": {
"list": [
{
"current": { "selected": false, "text": "default", "value": "default" },
"hide": 0,
"includeAll": false,
"label": "Datasource",
"multi": false,
"name": "datasource",
"options": [],
"query": "prometheus",
"queryValue": "",
"refresh": 1,
"regex": "",
"skipUrlSync": false,
"type": "datasource"
}
]
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "browser",
"title": "Callora / Billing Deduct Latency",
"uid": "callora-billing-deduct-latency",
"version": 1,
"weekStart": ""
}
Loading
Loading