{
  "repo": "tidbcloud/loki",
  "binary": "promtail",
  "binary_path": "cmd/promtail/main.go",
  "dependencies": {
    "HTTP GET /": {
      "infrastructure": {},
      "services": []
    },
    "HTTP GET /ready": {
      "infrastructure": {},
      "services": []
    },
    "HTTP GET /targets": {
      "infrastructure": {},
      "services": []
    },
    "Runtime PromtailPipeline.TailAndShipLogs": {
      "infrastructure": {
        "filesystem-and-target-discovery": {
          "conditions": [
            "Based on scrape_config and target_config"
          ],
          "operations": [
            {
              "operation": "Tail files, syslog, journal, and discovered targets",
              "trigger": "Read local or discovered log sources",
              "implementation": "targets.NewTargetManagers(..., cfg.ScrapeConfig, &cfg.TargetConfig)"
            }
          ]
        }
      },
      "services": [
        {
          "name": "loki",
          "target_interface": "Push API client",
          "operation_type": "http_push",
          "conditions": [
            "!dryRun"
          ],
          "operations": [
            {
              "operation": "Push log batches",
              "trigger": "Ship tailed logs to Loki",
              "implementation": "client.NewMulti(..., cfg.ClientConfigs...)"
            }
          ]
        }
      ]
    }
  }
}
