CtrlK
BlogDocsLog inGet started
Tessl Logo
PluginPublic

apavithraa/springboot-architecture

Skills for creating, testing, reviewing, migrating and guarding Spring Boot 4 projects with Java 25: project scaffolding with architecture patterns, Boot 4 test templates, code review, Boot 3 to 4 migration, and a team harness of build gates and agent hooks.

Quality

93%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Low

Low-risk findings worth noting

Overview
Quality
Evals
Security
Files

service-health.jsonskills/spring-boot-team-harness/assets/observability/dashboards/

{
  "uid": "project-service-health",
  "title": "Service health",
  "schemaVersion": 39,
  "version": 1,
  "editable": true,
  "time": {
    "from": "now-30m",
    "to": "now"
  },
  "refresh": "30s",
  "tags": [
    "project"
  ],
  "panels": [
    {
      "id": 1,
      "title": "Request rate",
      "type": "stat",
      "datasource": {
        "type": "prometheus",
        "uid": "${prometheus}"
      },
      "gridPos": {
        "x": 0,
        "y": 0,
        "w": 6,
        "h": 4
      },
      "targets": [
        {
          "refId": "A",
          "expr": "sum(rate(http_server_requests_milliseconds_count{job=\"$service\", deployment_environment_name=\"$environment\", uri!~\"/actuator.*\"}[$__rate_interval]))",
          "legendFormat": "req/s"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "reqps"
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ]
        },
        "colorMode": "value",
        "graphMode": "area"
      }
    },
    {
      "id": 2,
      "title": "Server error rate",
      "type": "stat",
      "datasource": {
        "type": "prometheus",
        "uid": "${prometheus}"
      },
      "gridPos": {
        "x": 6,
        "y": 0,
        "w": 6,
        "h": 4
      },
      "targets": [
        {
          "refId": "A",
          "expr": "sum(rate(http_server_requests_milliseconds_count{job=\"$service\", deployment_environment_name=\"$environment\", uri!~\"/actuator.*\", status=~\"5..\"}[$__rate_interval])) or vector(0)",
          "legendFormat": "5xx/s"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "reqps"
        },
        "overrides": []
      },
      "description": "Requests that ended in 5xx. Actuator is excluded.",
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ]
        },
        "colorMode": "value",
        "graphMode": "area"
      }
    },
    {
      "id": 3,
      "title": "p95 latency",
      "type": "stat",
      "datasource": {
        "type": "prometheus",
        "uid": "${prometheus}"
      },
      "gridPos": {
        "x": 12,
        "y": 0,
        "w": 6,
        "h": 4
      },
      "targets": [
        {
          "refId": "A",
          "expr": "histogram_quantile(0.95, sum by (le) (rate(http_server_requests_milliseconds_bucket{job=\"$service\", deployment_environment_name=\"$environment\", uri!~\"/actuator.*\"}[$__rate_interval])))",
          "legendFormat": "p95"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "ms"
        },
        "overrides": []
      },
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ]
        },
        "colorMode": "value",
        "graphMode": "area"
      }
    },
    {
      "id": 4,
      "title": "Connections waiting",
      "type": "stat",
      "datasource": {
        "type": "prometheus",
        "uid": "${prometheus}"
      },
      "gridPos": {
        "x": 18,
        "y": 0,
        "w": 6,
        "h": 4
      },
      "targets": [
        {
          "refId": "A",
          "expr": "sum(hikaricp_connections_pending{job=\"$service\", deployment_environment_name=\"$environment\"})",
          "legendFormat": "pending"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "short"
        },
        "overrides": []
      },
      "description": "Requests queued for a database connection. Above 0 for long means the pool is the bottleneck.",
      "options": {
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ]
        },
        "colorMode": "value",
        "graphMode": "area"
      },
      "optional": true
    },
    {
      "id": 5,
      "title": "Latency",
      "type": "timeseries",
      "datasource": {
        "type": "prometheus",
        "uid": "${prometheus}"
      },
      "gridPos": {
        "x": 0,
        "y": 4,
        "w": 12,
        "h": 8
      },
      "targets": [
        {
          "refId": "A",
          "expr": "histogram_quantile(0.5, sum by (le) (rate(http_server_requests_milliseconds_bucket{job=\"$service\", deployment_environment_name=\"$environment\", uri!~\"/actuator.*\"}[$__rate_interval])))",
          "legendFormat": "p50"
        },
        {
          "refId": "B",
          "expr": "histogram_quantile(0.95, sum by (le) (rate(http_server_requests_milliseconds_bucket{job=\"$service\", deployment_environment_name=\"$environment\", uri!~\"/actuator.*\"}[$__rate_interval])))",
          "legendFormat": "p95"
        },
        {
          "refId": "C",
          "expr": "histogram_quantile(0.99, sum by (le) (rate(http_server_requests_milliseconds_bucket{job=\"$service\", deployment_environment_name=\"$environment\", uri!~\"/actuator.*\"}[$__rate_interval])))",
          "legendFormat": "p99"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "ms"
        },
        "overrides": []
      }
    },
    {
      "id": 6,
      "title": "Requests by outcome",
      "type": "timeseries",
      "datasource": {
        "type": "prometheus",
        "uid": "${prometheus}"
      },
      "gridPos": {
        "x": 12,
        "y": 4,
        "w": 12,
        "h": 8
      },
      "targets": [
        {
          "refId": "A",
          "expr": "sum by (outcome) (rate(http_server_requests_milliseconds_count{job=\"$service\", deployment_environment_name=\"$environment\", uri!~\"/actuator.*\"}[$__rate_interval]))",
          "legendFormat": "{{outcome}}"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "reqps"
        },
        "overrides": []
      },
      "description": "A request refused by Spring Security has uri UNKNOWN, because it never reaches a controller."
    },
    {
      "id": 7,
      "title": "Slowest routes (p95)",
      "type": "timeseries",
      "datasource": {
        "type": "prometheus",
        "uid": "${prometheus}"
      },
      "gridPos": {
        "x": 0,
        "y": 12,
        "w": 12,
        "h": 8
      },
      "targets": [
        {
          "refId": "A",
          "expr": "topk(8, histogram_quantile(0.95, sum by (le, method, uri) (rate(http_server_requests_milliseconds_bucket{job=\"$service\", deployment_environment_name=\"$environment\", uri!~\"/actuator.*\"}[$__rate_interval]))))",
          "legendFormat": "{{method}} {{uri}}"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "ms"
        },
        "overrides": []
      }
    },
    {
      "id": 8,
      "title": "Database query time",
      "type": "timeseries",
      "datasource": {
        "type": "prometheus",
        "uid": "${prometheus}"
      },
      "gridPos": {
        "x": 12,
        "y": 12,
        "w": 12,
        "h": 8
      },
      "targets": [
        {
          "refId": "A",
          "expr": "histogram_quantile(0.95, sum by (le, jdbc_datasource_pool) (rate(jdbc_query_milliseconds_bucket{job=\"$service\", deployment_environment_name=\"$environment\"}[$__rate_interval])))",
          "legendFormat": "p95 {{jdbc_datasource_pool}}"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "ms"
        },
        "overrides": []
      },
      "optional": true
    },
    {
      "id": 9,
      "title": "Slow or failed requests",
      "type": "table",
      "datasource": {
        "type": "tempo",
        "uid": "${tempo}"
      },
      "description": "Click a trace id to see every span and SQL statement of that request.",
      "gridPos": {
        "x": 0,
        "y": 20,
        "w": 12,
        "h": 9
      },
      "targets": [
        {
          "refId": "A",
          "queryType": "traceql",
          "limit": 20,
          "tableType": "traces",
          "query": "{ resource.service.name = \"$service\" && resource.deployment.environment.name = \"$environment\" && (status = error || span.outcome = \"SERVER_ERROR\" || duration > 500ms) && name !~ \".*actuator.*\" }"
        }
      ],
      "optional": true
    },
    {
      "id": 10,
      "title": "Error logs",
      "type": "logs",
      "datasource": {
        "type": "loki",
        "uid": "${loki}"
      },
      "optional": true,
      "description": "Empty is good: no ERROR lines in this period.",
      "gridPos": {
        "x": 12,
        "y": 20,
        "w": 12,
        "h": 9
      },
      "options": {
        "showTime": true,
        "wrapLogMessage": true,
        "sortOrder": "Descending"
      },
      "targets": [
        {
          "refId": "A",
          "logql": true,
          "expr": "{service_name=\"$service\", deployment_environment_name=\"$environment\"} | detected_level=\"error\""
        }
      ]
    },
    {
      "id": 11,
      "type": "timeseries",
      "title": "Log lines by level",
      "datasource": {
        "type": "loki",
        "uid": "${loki}"
      },
      "description": "Empty means logs aren't reaching Loki, not that the app is quiet.",
      "gridPos": {
        "x": 0,
        "y": 29,
        "w": 24,
        "h": 6
      },
      "targets": [
        {
          "refId": "A",
          "logql": true,
          "expr": "sum by (detected_level) (count_over_time({service_name=\"$service\", deployment_environment_name=\"$environment\"}[1m]))",
          "legendFormat": "{{detected_level}}"
        }
      ],
      "fieldConfig": {
        "defaults": {
          "unit": "short"
        },
        "overrides": []
      }
    }
  ],
  "templating": {
    "list": [
      {
        "name": "prometheus",
        "label": "Metrics",
        "type": "datasource",
        "query": "prometheus"
      },
      {
        "name": "tempo",
        "label": "Traces",
        "type": "datasource",
        "query": "tempo"
      },
      {
        "name": "loki",
        "label": "Logs",
        "type": "datasource",
        "query": "loki"
      },
      {
        "name": "service",
        "label": "Service",
        "type": "query",
        "datasource": {
          "type": "prometheus",
          "uid": "${prometheus}"
        },
        "refresh": 2,
        "sort": 1,
        "query": "label_values(http_server_requests_milliseconds_count, job)",
        "definition": "label_values(http_server_requests_milliseconds_count, job)"
      },
      {
        "name": "environment",
        "label": "Environment",
        "type": "query",
        "datasource": {
          "type": "prometheus",
          "uid": "${prometheus}"
        },
        "refresh": 2,
        "sort": 1,
        "query": "label_values(http_server_requests_milliseconds_count{job=\"$service\"}, deployment_environment_name)",
        "definition": "label_values(http_server_requests_milliseconds_count{job=\"$service\"}, deployment_environment_name)"
      }
    ]
  }
}

tile.json