{
  "openapi": "3.0.1",
  "info": {
    "title": "Distributed Trace Root Cause Analyzer",
    "description": "Find why a request was slow or failed from distributed traces (OTLP, Jaeger, Zipkin): critical path, error origin, slow queries, N+1, retries, timeouts and dependency bottlenecks, ranked with evidence.",
    "version": "0.1",
    "x-build-id": "03ysONzwsB4hAN8dx"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/michiganpublictech~trace-root-cause-analyzer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-michiganpublictech-trace-root-cause-analyzer",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/michiganpublictech~trace-root-cause-analyzer/runs": {
      "post": {
        "operationId": "runs-sync-michiganpublictech-trace-root-cause-analyzer",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/michiganpublictech~trace-root-cause-analyzer/run-sync": {
      "post": {
        "operationId": "run-sync-michiganpublictech-trace-root-cause-analyzer",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "traces"
        ],
        "properties": {
          "traces": {
            "title": "Traces",
            "type": "array",
            "description": "A list of trace payloads in any supported format: OTLP/JSON ExportTraceServiceRequest ({\"resourceSpans\": [...]}, hex or base64 ids; Tempo {\"batches\"}/{\"trace\"} and Jaeger v2 {\"result\"} responses too), Jaeger JSON ({\"data\": [...]}), a Zipkin v2 span array, or the simplified shape {\"trace_id\", \"spans\": [{\"span_id\", \"parent_span_id\", \"service\", \"name\", \"start_ms\", \"duration_ms\", \"status\", \"kind\", \"attributes\"}]}. A bare Zipkin span array can be pasted as-is; OTel Collector JSON-lines output can be given as one string. Without start_ms the analysis runs in a lower-confidence durations-only mode."
          },
          "baselineTraces": {
            "title": "Baseline traces (healthy)",
            "type": "array",
            "description": "Optional healthy traces of the same request type, in any supported format. Enables per-operation latency regression (robust median/p95), critical-path share shifts, new operations/services/errors and call-count increases. Operations are matched by service and span-name template (IDs in span names are ignored). Charged as 'baseline-comparison' per trace only when the baseline matches the trace's operations."
          },
          "latencySloMs": {
            "title": "Latency SLO (ms)",
            "minimum": 1,
            "type": "integer",
            "description": "Optional latency objective for the request. Traces slower than this get an SLO-breach finding, and the fleet summary reports the breach rate."
          },
          "focusService": {
            "title": "Focus service",
            "type": "string",
            "description": "Optional service name. The analysis window becomes this service's top-most span (the service and everything it calls). Traces without this service are skipped and not charged."
          },
          "topRootCauses": {
            "title": "Suspected root causes per trace",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many ranked suspects to return per trace.",
            "default": 5
          },
          "maxTraces": {
            "title": "Maximum traces",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Analyse at most this many traces (in input order). Protects your budget when an export contains many traces.",
            "default": 25
          },
          "thresholds": {
            "title": "Detector thresholds",
            "type": "object",
            "description": "Optional per-run overrides for detector thresholds, e.g. {\"slowDbMs\": 250, \"nPlusOneMin\": 10}. Unknown keys or out-of-range values fail the run before anything is charged. Ratios are 0-1. Keys and defaults: dominantSpanShare (0.5); dominantSpanHighShare (0.7); dominantSpanMinMs (50 ms); dominantServiceShare (0.75); gapMinMs (50 ms); gapMinFraction (0.2); cpuLeafMinMs (100 ms); cpuLeafShare (0.25); nPlusOneMin (5); nPlusOneHigh (20); sequentialSavingMinMs (50 ms); sequentialSavingFraction (0.15); fanOutChildren (50); fanOutConcurrency (25); fanOutHigh (200); slowDbMs (100 ms); verySlowDbMs (500 ms); poolWaitMs (20 ms); networkOverheadMs (50 ms); networkOverheadFraction (0.3); connectSlowMs (50 ms); externalSlowMs (200 ms); retryStormAmplification (4); retryStormTotal (6); noBackoffGapMs (10 ms); timeoutClusterMinMs (250 ms); cacheMissRatio (0.5); cacheMinLookups (3); slowCacheMs (50 ms); consumerLagMs (500 ms); consumerLagHighMs (5000 ms); chattyCalls (20); largeTraceSpans (1000). See README \"Tuning thresholds\" for what each one controls."
          },
          "includeWaterfall": {
            "title": "Include ASCII waterfall",
            "type": "boolean",
            "description": "Add a compact text waterfall (critical path highlighted) to each result and to INVESTIGATION.md.",
            "default": true
          },
          "fleetSummary": {
            "title": "Fleet summary across traces",
            "type": "boolean",
            "description": "When two or more traces are investigated, add one aggregate item: recurring root causes and bottlenecks, latency percentiles per operation, error origins and SLO breach rate. Charged once per run as 'fleet-summary' ($0.25). Untick to skip it and its charge; per-trace results are unaffected.",
            "default": true
          },
          "failOnSeverity": {
            "title": "Fail run at severity",
            "enum": [
              "none",
              "critical",
              "high",
              "medium",
              "low"
            ],
            "type": "string",
            "description": "Fail the run (non-zero exit, useful in CI or synthetic checks) when any finding is at or above this severity.",
            "default": "none"
          },
          "disabledRules": {
            "title": "Disabled rules",
            "type": "array",
            "description": "Rule IDs to skip, e.g. RCA-CODE-002 (see RULES.md). Requires a plan with the custom rules feature.",
            "items": {
              "type": "string"
            }
          },
          "licenseKey": {
            "title": "License key",
            "type": "string",
            "description": "Optional enterprise or prepaid license key. Leave empty to pay per event on Apify."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}