{
  "repo": "tidbcloud/metrics-integration",
  "binary": "prometheus",
  "binary_path": "pipeline/cmd/prometheus/main.go",
  "dependencies": {
    "HTTP GET /ping": {
      "infrastructure": {},
      "services": []
    },
    "HTTP GET /healthz": {
      "infrastructure": {},
      "services": []
    },
    "HTTP GET /public_api/v1/clusters/:cluster_id/metrics": {
      "infrastructure": {
        "kubernetes": {
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "Read ConfigMap in Prometheus integration namespace",
              "trigger": "Resolve metrics key and query endpoint for the cluster",
              "implementation": "clientset.CoreV1().ConfigMaps(...).Get(...) in pipeline/internal/service/prometheus/manager.go"
            }
          ]
        }
      },
      "services": [
        {
          "name": "observability-prometheus",
          "target_interface": "Prometheus query API",
          "operation_type": "http_get",
          "conditions": [
            "Always"
          ],
          "operations": [
            {
              "operation": "Prometheus query_range/query",
              "trigger": "Fetch cluster metrics from the configured query endpoint",
              "implementation": "Manager.QueryMetrics / QueryClusterMetrics"
            }
          ]
        }
      ]
    },
    "HTTP GET /metrics": {
      "infrastructure": {},
      "services": []
    }
  }
}
