Grafana dashboard: Decision Service Summary
Description: Basic measurements of decision evaluations using data from Sparkling Logic SMARTS(tm)

# Decision Evaluation Metrics

This dashboard is for use with  Sparkling Logic SMARTS(tm) Decision Services and can show you the following information for decision evaluations
- Request per second
- Average duration per request
- Number of requests in progress
- Request duration histogram and 90% quantile

## SMARTS Configuration
If you deployed SMARTS using a helm chart, then you can easily enable your deployment for metrics scraping as follows:
```
metrics:
  enabled: true
  serviceMonitor:
    enabled: true
```
## Prometheus Configuration
If you are using a Prometheus Server then you may need to configure this server to `remote write` your metrics to Grafana.
For example:
```
prometheus:
  prometheusSpec:
    remoteWrite:
    - url: "https://prometheus-blocks-prod-us-central1.grafana.net/api/prom/push"
      basicAuth:
          username:
            name: grafanasecret
            key: username
          password:
            name: grafanasecret
            key: password
```

{
  "__inputs": [
    {
      "name": "DS_GRAFANACLOUD-SPLOG-PROM",
      "label": "grafanacloud-splog-prom",
      "description": "",
      "type": "datasource",
      "pluginId": "prometheus",
      "pluginName": "Prometheus"
    }
  ],
  "__elements": [],
  "__requires": [
    {
      "type": "panel",
      "id": "bargauge",
      "name": "Bar gauge",
      "version": ""
    },
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "8.5.2"
    },
    {
      "type": "panel",
      "id": "heatmap",
      "name": "Heatmap",
      "version": ""
    },
    {
      "type": "datasource",
      "id": "prometheus",
      "name": "Prometheus",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "stat",
      "name": "Stat",
      "version": ""
    },
    {
      "type": "panel",
      "id": "timeseries",
      "name": "Time series",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_GRAFANACLOUD-SPLOG-PROM}"
        },
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "limit": 100,
        "name": "Annotations & Alerts",
        "showIn": 0,
        "type": "dashboard"
      }
    ]
  },
  "description": "Basic measurements of decision evaluations using data from Sparkling Logic SMARTS(tm)",
  "editable": true,
  "fiscalYearStartMonth": 0,
  "gnetId": 14644,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1653708785044,
  "links": [],
  "liveNow": false,
  "panels": [
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 20,
      "panels": [],
      "title": "Service Metrics",
      "type": "row"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_GRAFANACLOUD-SPLOG-PROM}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "decimals": 0,
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 2,
        "w": 3,
        "x": 0,
        "y": 1
      },
      "id": 24,
      "options": {
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {
          "valueSize": 30
        },
        "textMode": "auto"
      },
      "pluginVersion": "8.5.2",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_GRAFANACLOUD-SPLOG-PROM}"
          },
          "expr": "sum(increase(sl_decision_evaluation_duration_seconds_count{pod =~ \"$instances\"}[$__range]))",
          "refId": "A"
        }
      ],
      "title": "Invocations",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_GRAFANACLOUD-SPLOG-PROM}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "fixedColor": "green",
            "mode": "fixed"
          },
          "mappings": [
            {
              "options": {
                "match": "null",
                "result": {
                  "text": "N/A"
                }
              },
              "type": "special"
            }
          ],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "reqps"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 2,
        "w": 3,
        "x": 3,
        "y": 1
      },
      "id": 31,
      "links": [],
      "maxDataPoints": 100,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "8.5.2",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_GRAFANACLOUD-SPLOG-PROM}"
          },
          "exemplar": true,
          "expr": "sum(rate(sl_decision_evaluation_duration_seconds_count{pod =~ \"$instances\"}[$__rate_interval]))",
          "instant": false,
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "title": "Total req/s",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_GRAFANACLOUD-SPLOG-PROM}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [
            {
              "options": {
                "match": "null",
                "result": {
                  "text": "N/A"
                }
              },
              "type": "special"
            }
          ],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "requests"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 2,
        "w": 3,
        "x": 6,
        "y": 1
      },
      "id": 30,
      "links": [],
      "maxDataPoints": 100,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "8.5.2",
      "targets": [
        {
          "exemplar": true,
          "expr": "sum(sl_decision_evaluation_in_progress{pod=~ \"$instances\"})",
          "instant": false,
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "title": "In progress",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_GRAFANACLOUD-SPLOG-PROM}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [
            {
              "options": {
                "match": "null",
                "result": {
                  "text": "N/A"
                }
              },
              "type": "special"
            }
          ],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "requests"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 2,
        "w": 3,
        "x": 9,
        "y": 1
      },
      "id": 28,
      "links": [],
      "maxDataPoints": 100,
      "options": {
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "max"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "8.5.2",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_GRAFANACLOUD-SPLOG-PROM}"
          },
          "exemplar": true,
          "expr": "sum(max_over_time(sl_decision_evaluation_in_progress{pod=~ \"$instances\"}[$__range]))",
          "instant": false,
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "title": "Max Concurrent",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_GRAFANACLOUD-SPLOG-PROM}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "decimals": 0,
          "mappings": [],
          "noValue": "0",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 2,
        "w": 2,
        "x": 12,
        "y": 1
      },
      "id": 26,
      "options": {
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {
          "valueSize": 30
        },
        "textMode": "auto"
      },
      "pluginVersion": "8.5.2",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_GRAFANACLOUD-SPLOG-PROM}"
          },
          "expr": "sum(increase(sl_decision_evaluation_duration_seconds_count{pod =~ \"$instances\", code!=\"200\"}[$__range]))",
          "refId": "A"
        }
      ],
      "title": "Errors",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_GRAFANACLOUD-SPLOG-PROM}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 0,
            "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"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 10,
        "w": 10,
        "x": 14,
        "y": 1
      },
      "id": 32,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "right"
        },
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_GRAFANACLOUD-SPLOG-PROM}"
          },
          "editorMode": "code",
          "expr": "sum(rate(sl_decision_evaluation_duration_seconds_count{pod =~ \"$instances\"}[$__rate_interval])) by (pod)",
          "legendFormat": "{{pod}}",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "Evaluations",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_GRAFANACLOUD-SPLOG-PROM}"
      },
      "description": "Service invocations across all selected instances",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 0,
            "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
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "reqps"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 14,
        "x": 0,
        "y": 3
      },
      "id": 22,
      "options": {
        "legend": {
          "calcs": [
            "lastNotNull",
            "min",
            "max",
            "mean"
          ],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_GRAFANACLOUD-SPLOG-PROM}"
          },
          "editorMode": "code",
          "expr": "sum(rate(sl_decision_evaluation_duration_seconds_count{pod =~ \"$instances\"}[$__rate_interval]))",
          "legendFormat": "{{pod}}",
          "range": true,
          "refId": "A"
        }
      ],
      "title": "Evaluations",
      "type": "timeseries"
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 11
      },
      "id": 14,
      "panels": [],
      "title": "Decision Metrics",
      "type": "row"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_GRAFANACLOUD-SPLOG-PROM}"
      },
      "description": "Counts all requests, both successful and failed",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "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": "never",
            "spanNulls": true,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "links": [],
          "mappings": [],
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "reqps"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 14,
        "x": 0,
        "y": 12
      },
      "id": 2,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "right"
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        }
      },
      "pluginVersion": "8.5.2",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_GRAFANACLOUD-SPLOG-PROM}"
          },
          "exemplar": true,
          "expr": "sum(rate(sl_decision_evaluation_duration_seconds_count{pod =~ \"$instances\", workspace=~ \"$workspaces\", deployment=~ \"$deployments\", decision=~ \"$decisions\"}[$__rate_interval])) by (workspace, deployment, decision) > 0",
          "interval": "",
          "legendFormat": "{{workspace}}/{{deployment}}/{{decision}}",
          "refId": "A"
        }
      ],
      "title": "Requests received by decision",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_GRAFANACLOUD-SPLOG-PROM}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "fixedColor": "green",
            "mode": "fixed"
          },
          "mappings": [
            {
              "options": {
                "match": "null",
                "result": {
                  "text": "N/A"
                }
              },
              "type": "special"
            }
          ],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "reqps"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 5,
        "x": 14,
        "y": 12
      },
      "id": 5,
      "links": [],
      "maxDataPoints": 100,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "8.5.2",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_GRAFANACLOUD-SPLOG-PROM}"
          },
          "exemplar": true,
          "expr": "sum(rate(sl_decision_evaluation_duration_seconds_count{pod =~ \"$instances\", workspace=~ \"$workspaces\", deployment=~ \"$deployments\", decision =~ \"$decisions\"}[$__rate_interval]))",
          "instant": false,
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "title": "Total req/s",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_GRAFANACLOUD-SPLOG-PROM}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "decimals": 2,
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "short"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 2,
        "w": 3,
        "x": 19,
        "y": 12
      },
      "id": 34,
      "options": {
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {
          "valueSize": 30
        },
        "textMode": "auto"
      },
      "pluginVersion": "8.5.2",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_GRAFANACLOUD-SPLOG-PROM}"
          },
          "expr": "sum(increase(sl_decision_evaluation_duration_seconds_count{pod =~ \"$instances\", workspace=~ \"$workspaces\", deployment=~ \"$deployments\", decision =~ \"$decisions\"}[$__range]))",
          "refId": "A"
        }
      ],
      "title": "Invocations",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_GRAFANACLOUD-SPLOG-PROM}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "decimals": 0,
          "mappings": [],
          "noValue": "0",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "short"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 2,
        "w": 2,
        "x": 22,
        "y": 12
      },
      "id": 36,
      "options": {
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {
          "valueSize": 30
        },
        "textMode": "auto"
      },
      "pluginVersion": "8.5.2",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_GRAFANACLOUD-SPLOG-PROM}"
          },
          "expr": "sum(increase(sl_decision_evaluation_duration_seconds_count{pod =~ \"$instances\", workspace=~ \"$workspaces\", deployment=~ \"$deployments\", decision =~ \"$decisions\", code=\"500\"}[$__range]))",
          "refId": "A"
        }
      ],
      "title": "Errors",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_GRAFANACLOUD-SPLOG-PROM}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "decimals": 0,
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "s"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 2,
        "w": 3,
        "x": 19,
        "y": 14
      },
      "id": 38,
      "options": {
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {
          "valueSize": 30
        },
        "textMode": "auto"
      },
      "pluginVersion": "8.5.2",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_GRAFANACLOUD-SPLOG-PROM}"
          },
          "editorMode": "code",
          "exemplar": false,
          "expr": "sum(increase(sl_decision_evaluation_duration_seconds_sum{pod =~ \"$instances\", workspace=~ \"$workspaces\", deployment=~ \"$deployments\", decision=~ \"$decisions\"}[$__range])) / sum(increase(sl_decision_evaluation_duration_seconds_count{pod =~ \"$instances\", workspace=~ \"$workspaces\", deployment=~ \"$deployments\", decision=~ \"$decisions\"}[$__range])) ",
          "instant": false,
          "range": true,
          "refId": "A"
        }
      ],
      "title": "Average",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_GRAFANACLOUD-SPLOG-PROM}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "decimals": 0,
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "s"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 2,
        "w": 2,
        "x": 22,
        "y": 14
      },
      "id": 40,
      "options": {
        "colorMode": "value",
        "graphMode": "none",
        "justifyMode": "auto",
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {
          "valueSize": 30
        },
        "textMode": "auto"
      },
      "pluginVersion": "8.5.2",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_GRAFANACLOUD-SPLOG-PROM}"
          },
          "editorMode": "code",
          "exemplar": false,
          "expr": "histogram_quantile(0.90, sum by (le) (increase(sl_decision_evaluation_duration_seconds_bucket{pod =~ \"$instances\", workspace=~ \"$workspaces\", deployment=~ \"$deployments\", decision=~ \"$decisions\"}[$__range]))) > 0",
          "instant": false,
          "range": true,
          "refId": "A"
        }
      ],
      "title": "90%",
      "type": "stat"
    },
    {
      "cards": {},
      "color": {
        "cardColor": "#b4ff00",
        "colorScale": "linear",
        "colorScheme": "interpolateOranges",
        "exponent": 0.5,
        "mode": "opacity"
      },
      "dataFormat": "tsbuckets",
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_GRAFANACLOUD-SPLOG-PROM}"
      },
      "description": "Does NOT include requests that return error states!",
      "gridPos": {
        "h": 12,
        "w": 10,
        "x": 14,
        "y": 16
      },
      "heatmap": {},
      "hideZeroBuckets": false,
      "highlightCards": true,
      "id": 8,
      "legend": {
        "show": false
      },
      "reverseYBuckets": false,
      "targets": [
        {
          "exemplar": true,
          "expr": "sum(increase(sl_decision_evaluation_duration_seconds_bucket{code=\"200\", pod =~ \"$instances\", workspace=~ \"$workspaces\", deployment=~ \"$deployments\", decision =~ \"$decisions\"}[$__interval])) by (le)",
          "format": "heatmap",
          "instant": false,
          "interval": "5m",
          "intervalFactor": 1,
          "legendFormat": "{{le}}",
          "refId": "A"
        }
      ],
      "title": "Decision evaluation request duration ",
      "tooltip": {
        "show": true,
        "showHistogram": false
      },
      "type": "heatmap",
      "xAxis": {
        "show": true
      },
      "yAxis": {
        "decimals": 0,
        "format": "s",
        "logBase": 1,
        "show": true
      },
      "yBucketBound": "auto"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_GRAFANACLOUD-SPLOG-PROM}"
      },
      "description": "Counts all requests, both successful and failed",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 10,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "smooth",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "never",
            "spanNulls": true,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "links": [],
          "mappings": [],
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "s"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 14,
        "x": 0,
        "y": 20
      },
      "id": 10,
      "options": {
        "legend": {
          "calcs": [
            "mean"
          ],
          "displayMode": "list",
          "placement": "right"
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        }
      },
      "pluginVersion": "8.5.2",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_GRAFANACLOUD-SPLOG-PROM}"
          },
          "exemplar": true,
          "expr": "sum(rate(sl_decision_evaluation_duration_seconds_sum{pod =~ \"$instances\", workspace=~ \"$workspaces\", deployment=~ \"$deployments\", decision=~ \"$decisions\"}[$__rate_interval])) by (workspace, deployment, decision) / sum(rate(sl_decision_evaluation_duration_seconds_count{pod =~ \"$instances\", workspace=~ \"$workspaces\", deployment=~ \"$deployments\", decision=~ \"$decisions\"}[$__rate_interval])) by (workspace, deployment, decision) > 0",
          "hide": false,
          "interval": "",
          "legendFormat": "{{workspace}}/{{deployment}}/{{decision}}",
          "refId": "B"
        }
      ],
      "title": "Average duration by decision",
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_GRAFANACLOUD-SPLOG-PROM}"
      },
      "description": "Estimated 90% quantile, computed form histogram",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green"
              },
              {
                "color": "red",
                "value": 1
              }
            ]
          },
          "unit": "s"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 6,
        "w": 14,
        "x": 0,
        "y": 28
      },
      "id": 12,
      "options": {
        "displayMode": "gradient",
        "minVizHeight": 10,
        "minVizWidth": 0,
        "orientation": "horizontal",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "showUnfilled": true,
        "text": {}
      },
      "pluginVersion": "8.5.2",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_GRAFANACLOUD-SPLOG-PROM}"
          },
          "exemplar": true,
          "expr": "histogram_quantile(0.90, sum by (workspace, deployment, decision, le) (rate(sl_decision_evaluation_duration_seconds_bucket{pod =~ \"$instances\", workspace=~ \"$workspaces\", deployment=~ \"$deployments\", decision=~ \"$decisions\"}[$__range]))) > 0",
          "interval": "",
          "legendFormat": "{{workspace}}/{{deployment}}/{{decision}}",
          "refId": "A"
        }
      ],
      "title": "90%",
      "type": "bargauge"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_GRAFANACLOUD-SPLOG-PROM}"
      },
      "description": "4xx and 5xx status codes",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "points",
            "fillOpacity": 10,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "never",
            "spanNulls": true,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "links": [],
          "mappings": [],
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green"
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "reqps"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 6,
        "w": 10,
        "x": 14,
        "y": 28
      },
      "id": 3,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "right"
        },
        "tooltip": {
          "mode": "multi",
          "sort": "none"
        }
      },
      "pluginVersion": "8.5.2",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_GRAFANACLOUD-SPLOG-PROM}"
          },
          "exemplar": true,
          "expr": "sum(rate(sl_decision_evaluation_duration_seconds_count{pod=~ \"$instances\", workspace=~ \"$workspaces\", deployment=~ \"$deployments\", decision =~ \"$decisions\", code =~ \"5\\\\d\\\\d|4\\\\d\\\\d\"}[$__rate_interval])) by (decision) > 0",
          "interval": "",
          "legendFormat": "{{decision}}",
          "refId": "A"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_GRAFANACLOUD-SPLOG-PROM}"
          },
          "exemplar": true,
          "expr": "sum(rate(sl_decision_evaluation_duration_seconds_count{pod=~ \"$instances\", decision = \"\", code =~ \"5\\\\d\\\\d|4\\\\d\\\\d\"}[$__rate_interval])) by (decision)",
          "hide": true,
          "interval": "",
          "legendFormat": "(None)",
          "refId": "B"
        }
      ],
      "title": "Error rate by decision",
      "type": "timeseries"
    }
  ],
  "refresh": "1m",
  "schemaVersion": 36,
  "style": "dark",
  "tags": [
    "Sparkling Logic",
    "smarts"
  ],
  "templating": {
    "list": [
      {
        "current": {},
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_GRAFANACLOUD-SPLOG-PROM}"
        },
        "definition": "label_values(sl_decision_evaluation_duration_seconds_count, pod)",
        "hide": 0,
        "includeAll": true,
        "label": "Instances",
        "multi": true,
        "name": "instances",
        "options": [],
        "query": {
          "query": "label_values(sl_decision_evaluation_duration_seconds_count, pod)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 5,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "current": {},
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_GRAFANACLOUD-SPLOG-PROM}"
        },
        "definition": "label_values(sl_decision_evaluation_duration_seconds_count{pod =~ \"$instances\"}, workspace)",
        "hide": 0,
        "includeAll": true,
        "label": "Workspaces",
        "multi": true,
        "name": "workspaces",
        "options": [],
        "query": {
          "query": "label_values(sl_decision_evaluation_duration_seconds_count{pod =~ \"$instances\"}, workspace)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "current": {},
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_GRAFANACLOUD-SPLOG-PROM}"
        },
        "definition": "label_values(sl_decision_evaluation_duration_seconds_count{pod =~ \"$instances\", workspace=~\"$workspaces\"}, deployment)",
        "hide": 0,
        "includeAll": true,
        "label": "Deployments",
        "multi": true,
        "name": "deployments",
        "options": [],
        "query": {
          "query": "label_values(sl_decision_evaluation_duration_seconds_count{pod =~ \"$instances\", workspace=~\"$workspaces\"}, deployment)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "current": {},
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_GRAFANACLOUD-SPLOG-PROM}"
        },
        "definition": "label_values(sl_decision_evaluation_duration_seconds_count{pod =~ \"$instances\", workspace=~\"$workspaces\", deployment=~\"$deployments\"}, decision)",
        "hide": 0,
        "includeAll": true,
        "label": "Decisions",
        "multi": true,
        "name": "decisions",
        "options": [],
        "query": {
          "query": "label_values(sl_decision_evaluation_duration_seconds_count{pod =~ \"$instances\", workspace=~\"$workspaces\", deployment=~\"$deployments\"}, decision)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-3h",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ]
  },
  "timezone": "",
  "title": "Decision Service Summary",
  "uid": "Xq5VWpeGk",
  "version": 24,
  "weekStart": ""
}