{
  "openapi": "3.0.1",
  "info": {
    "title": "OTel Instrumentation Coverage Auditor",
    "description": "Find what isn't instrumented: dark dependencies, broken context propagation, uninstrumented time, missing resource metadata and log correlation gaps across a fleet of OpenTelemetry traces, with a prioritized fix plan.",
    "version": "0.1",
    "x-build-id": "Gx0h4qqH8NmYZIxkT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/michiganpublictech~otel-coverage-auditor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-michiganpublictech-otel-coverage-auditor",
        "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~otel-coverage-auditor/runs": {
      "post": {
        "operationId": "runs-sync-michiganpublictech-otel-coverage-auditor",
        "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~otel-coverage-auditor/run-sync": {
      "post": {
        "operationId": "run-sync-michiganpublictech-otel-coverage-auditor",
        "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",
        "properties": {
          "traces": {
            "title": "Traces",
            "type": "array",
            "description": "Spans or export documents to audit as one trace set. Accepts a list of spans (simplified format or Zipkin v2), or a list of documents: OTLP/JSON ExportTraceServiceRequest ({\"resourceSpans\": …}, hex or base64 ids), Jaeger JSON ({\"data\": [...]}) — wrap a single document in [ ]. Strings holding JSON / JSON Lines (Collector file exporter output) are accepted as list items."
          },
          "traceSetName": {
            "title": "Trace set name",
            "type": "string",
            "description": "Name shown as the report target for the 'traces' field (e.g. 'shop-production 2026-10-01')."
          },
          "traceSets": {
            "title": "Additional trace sets",
            "type": "array",
            "description": "Audit several independent trace sets in one run, each producing its own report and billed separately: [{\"name\": \"prod\", \"traces\": [...], \"logs\": [...], \"metrics\": [...], \"expectedServices\": [...] or {service: [deps]}}]. Instead of (or as well as) inline 'traces', an entry can read its traces from storage with \"datasetId\", or \"recordKey\" plus optional \"keyValueStoreId\"."
          },
          "traceDatasetId": {
            "title": "Traces dataset",
            "type": "string",
            "description": "Apify dataset whose items are spans (simplified or Zipkin v2) or whole export documents (OTLP/JSON, Jaeger JSON). Up to 200,000 items are read."
          },
          "traceRecordKey": {
            "title": "Traces record key",
            "type": "string",
            "description": "Key of a key-value store record holding an export: OTLP/JSON, Jaeger JSON, a span list, or JSON Lines text (Collector file exporter)."
          },
          "traceKeyValueStoreId": {
            "title": "Traces key-value store",
            "type": "string",
            "description": "Key-value store holding 'Traces record key'. Leave empty to use this run's default store."
          },
          "expectedServices": {
            "title": "Expected services",
            "type": "array",
            "description": "service.name values you expect to see. Services never observed in any signal are reported, and calls to these names are treated as calls to your own (instrumentable) services.",
            "items": {
              "type": "string"
            }
          },
          "serviceMap": {
            "title": "Expected service map",
            "type": "object",
            "description": "Optional {service: [dependencies]} map, e.g. {\"checkout\": [\"inventory\", \"postgresql\"]}. Keys are added to the expected services; declared edges that never appear are reported. Dependencies can be services, db.system / messaging.system names or host labels."
          },
          "logs": {
            "title": "Logs (OTLP/JSON)",
            "type": "array",
            "description": "ExportLogsServiceRequest documents ({\"resourceLogs\": …}) or simplified records ({\"service\", \"traceId\", \"spanId\", \"time\"}). Used to find log records without trace context, trace ids missing from the trace set, and services that log but don't trace. Log bodies are never copied to the output."
          },
          "metrics": {
            "title": "Metrics (OTLP/JSON)",
            "type": "array",
            "description": "ExportMetricsServiceRequest documents ({\"resourceMetrics\": …}) or simplified resources ({\"service\": \"billing\", \"metrics\": [\"db.client.operation.duration\"]}). Only resources and metric names are used (no values)."
          },
          "minGapMs": {
            "title": "Minimum uninstrumented time (ms)",
            "minimum": 1,
            "maximum": 3600000,
            "type": "integer",
            "description": "Spans shorter than this, and uncovered time below it, are never reported as gaps.",
            "default": 100
          },
          "gapRatio": {
            "title": "Child coverage ratio",
            "minimum": 0.01,
            "maximum": 1,
            "type": "number",
            "description": "A SERVER/CONSUMER/INTERNAL span is a suspected gap when the union of its children's intervals covers less than this share of its duration (0.01–1).",
            "default": 0.5
          },
          "clockSkewMs": {
            "title": "Clock skew tolerance (ms)",
            "minimum": 0,
            "maximum": 60000,
            "type": "integer",
            "description": "How far apart caller and callee clocks may be when matching a call to a server span that started a new trace (propagation breaks). Raise it if hosts' clocks drift; larger values allow more timing-only matches on busy routes.",
            "default": 100
          },
          "baseline": {
            "title": "Baseline",
            "type": "array",
            "description": "Trace-set dataset items from a previous run of this Actor (copied from its dataset), or compact summaries [{\"traceSet\": \"shop-production\", \"services\": {\"checkout\": 72}, \"fleetScore\": 70}]. A single entry without a trace set name applies to every set."
          },
          "baselineDatasetId": {
            "title": "Baseline dataset",
            "type": "string",
            "description": "A previous run's default dataset. Its trace-set items are used as the baseline (per-service items are ignored). If it can't be read, the run continues without a baseline."
          },
          "perServiceItems": {
            "title": "Also output one item per service",
            "type": "boolean",
            "description": "Push an extra (free) dataset item per service with its score, breakdown and findings, in addition to the trace-set report.",
            "default": false
          },
          "failOnSeverity": {
            "title": "Fail run at severity",
            "enum": [
              "none",
              "critical",
              "high",
              "medium",
              "low"
            ],
            "type": "string",
            "description": "CI gate: mark the run as FAILED when any finding is at or above this severity.",
            "default": "none"
          },
          "disabledRules": {
            "title": "Disabled rules",
            "type": "array",
            "description": "Rule IDs to skip, e.g. COV-META-004 (see RULES.md). Requires the custom_rules feature (Pro plan and above).",
            "items": {
              "type": "string"
            }
          },
          "licenseKey": {
            "title": "License key",
            "type": "string",
            "description": "Optional. Enterprise / prepaid license key. Store users don't need one."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}