Skip to content

AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

ci(benchmark): alert Betterstack when the nightly pipeline fails (#16546)

Amr Elmohamady41941cd22578
diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml
index 3caf0603faa..2d354b193bd 100644
--- a/.github/workflows/benchmark.yml
+++ b/.github/workflows/benchmark.yml
@@ -236,6 +236,22 @@ jobs:
if: always()
run: docker compose -f benchmark/docker-compose.yml -f benchmark/docker-compose.ci.yml down -v
+ - name: Report pipeline health to Betterstack (scheduled runs only)
+ if: '!cancelled() && github.event_name == ''schedule'''
+ env:
+ BETTERSTACK_WEBHOOK_URL: ${{ secrets.BETTERSTACK_WEBHOOK_URL }}
+ JOB_STATUS: ${{ job.status }}
+ LABEL: ${{ matrix.label }}
+ RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
+ run: |
+ if [ "$JOB_STATUS" = "success" ]; then STATE=ok; else STATE=alert; fi
+ jq -n --arg cell "$LABEL" --arg state "$STATE" --arg status "$JOB_STATUS" --arg url "$RUN_URL" '{
+ name: "Nightly bench pipeline failed: \($cell)",
+ cause: "Nightly benchmark job `\($cell)` finished with status `\($status)`.\n\n[Run details →](\($url))",
+ alertId: "bench-pipeline-\($cell)",
+ state: $state
+ }' | curl -sS --fail-with-body -H 'Content-Type: application/json; charset=utf-8' --data-binary @- "$BETTERSTACK_WEBHOOK_URL"
+
summary:
runs-on: ubuntu-latest
needs: benchmark