{
  "repo": "tidbcloud/observability",
  "binary": "diagnosis-compute",
  "binary_path": "cmd/diagnosis-compute/main.go",
  "surface_kind": "worker_service",
  "type": "worker_service",
  "services": [],
  "extensions": {
    "http_routes": [
      {
        "method": "GET",
        "path": "/metrics",
        "handler": "promhttp.Handler",
        "name_key": "HTTP GET /metrics"
      },
      {
        "method": "GET",
        "path": "/debug/pprof/",
        "handler": "pprof.Index",
        "name_key": "HTTP GET /debug/pprof/"
      },
      {
        "method": "GET",
        "path": "/debug/pprof/cmdline",
        "handler": "pprof.Cmdline",
        "name_key": "HTTP GET /debug/pprof/cmdline"
      },
      {
        "method": "GET",
        "path": "/debug/pprof/profile",
        "handler": "pprof.Profile",
        "name_key": "HTTP GET /debug/pprof/profile"
      },
      {
        "method": "GET",
        "path": "/debug/pprof/symbol",
        "handler": "pprof.Symbol",
        "name_key": "HTTP GET /debug/pprof/symbol"
      },
      {
        "method": "GET",
        "path": "/debug/pprof/trace",
        "handler": "pprof.Trace",
        "name_key": "HTTP GET /debug/pprof/trace"
      }
    ],
    "runtime_components": [
      {
        "name": "DiagnosisCompute",
        "kind": "background_worker",
        "description": "Load cluster metadata before processing.",
        "name_key": "Runtime DiagnosisCompute.LoadClusterInfo"
      },
      {
        "name": "DiagnosisCompute",
        "kind": "background_worker",
        "description": "Load checkpoints before continuing processing.",
        "name_key": "Runtime DiagnosisCompute.LoadCheckpoint"
      },
      {
        "name": "DiagnosisCompute",
        "kind": "background_worker",
        "description": "Long-lived worker processing diagnosis data for each cluster.",
        "name_key": "Runtime DiagnosisCompute.RunCluster"
      },
      {
        "name": "DiagnosisCompute",
        "kind": "background_worker",
        "description": "Analyze merged diagnosis data and sync to downstream storage.",
        "name_key": "Runtime DiagnosisCompute.RunClusterAnalyzeTask"
      },
      {
        "name": "DiagnosisCompute",
        "kind": "background_worker",
        "description": "Merge raw logs into intermediate artifacts.",
        "name_key": "Runtime DiagnosisCompute.RunClusterMergeTask"
      },
      {
        "name": "DiagnosisCompute",
        "kind": "background_worker",
        "description": "Persist updated checkpoints.",
        "name_key": "Runtime DiagnosisCompute.SaveCheckpoint"
      }
    ],
    "notes": [
      "Background task processor for diagnosis data. Runs long-lived RunCluster workers, seeds infra clusters, scans diagnosis/tasks/processor-dedicated/, persists checkpoints, writes local SQLite files, and syncs to Delta Lake."
    ]
  }
}
