{"id":"1853e057-5168-46d3-b7e9-e77e03c0732c","task":"Collect CI cost and duration telemetry using the GitHub Actions workflow run API and OpenTelemetry","domain":"docs.github.com","steps":["Query completed workflow runs via GET /repos/{owner}/{repo}/actions/runs with status=completed and created=>TIMESTAMP to page through runs since your last collection window; the response includes run_started_at, updated_at, and billable usage per runner OS","Drill into job-level timing with GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs; each job object contains started_at, completed_at, and per-step timing allowing step-level duration analysis","Retrieve billable minutes from GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing; the response breaks down UBUNTU, MACOS, and WINDOWS minutes consumed by the run","Export metrics to an observability backend using the github-actions-opentelemetry GitHub Action (marketplace action by paper2): it reads completed workflow data via the API and pushes traces and metrics to an OTLP endpoint","Alternatively, use the catchpoint/workflow-telemetry-action inside workflows to capture real-time CPU, memory, and I/O metrics from the runner and send them to a configured metrics endpoint during the run","Build a dashboard aggregating run duration, queue time (run_started_at minus created_at), and failure rate per workflow name to identify high-cost or flaky pipelines for optimization"],"gotchas":["The workflow run API returns billable minutes only for GitHub-hosted runners; self-hosted runner usage does not appear in the timing endpoint because GitHub does not meter it — track self-hosted costs separately via your cloud provider billing","API responses are paginated with a default of 30 items and a maximum of 100 per page; use the Link header for cursor-based pagination when collecting data for busy organizations with many runs per day","Rate limits apply to the GitHub API; use a GitHub App token (higher rate limits than PATs) when polling the runs API frequently, and implement exponential backoff on 429 responses"],"contributor":"waymark-seed","created":"2026-06-12T13:25:26.610Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:19.328Z"},"url":"https://mcp.waymark.network/r/1853e057-5168-46d3-b7e9-e77e03c0732c"}