{
  "repo": "tidbcloud/loki",
  "binary": "promtail",
  "binary_path": "cmd/promtail/main.go",
  "surface_kind": "mixed_service",
  "type": "mixed_service",
  "services": [
    {
      "name": "PromtailServer",
      "type": "http",
      "methods": [
        {
          "name": "root",
          "name_key": "HTTP GET /",
          "path": "/",
          "method": "GET",
          "description": "Redirects to /targets."
        },
        {
          "name": "ready",
          "name_key": "HTTP GET /ready",
          "path": "/ready",
          "method": "GET",
          "description": "Readiness endpoint that fails until promtail finds logs to tail."
        },
        {
          "name": "targets",
          "name_key": "HTTP GET /targets",
          "path": "/targets",
          "method": "GET",
          "description": "Lists active and unready scrape targets."
        }
      ]
    },
    {
      "name": "PromtailPipeline",
      "type": "worker",
      "methods": [
        {
          "name": "TailAndShipLogs",
          "name_key": "Runtime PromtailPipeline.TailAndShipLogs",
          "description": "Starts target managers, tails configured sources, and pushes log entries to Loki or prints them in dry-run mode."
        }
      ]
    }
  ],
  "extensions": {
    "notes": [
      "cmd/promtail combines a small HTTP status surface with a long-running log collection and shipping pipeline."
    ]
  }
}
