otel-bootstrap 2.11.0

One-call OpenTelemetry bootstrap — traces + metrics with OTLP export
Documentation
name: CI

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]
  schedule:
    - cron: "0 6 * * 1"   # weekly Monday 06:00 UTC — surfaces expired allowlist entries and new advisories

permissions:
  contents: read

jobs:
  ci:
    uses: brefwiz/shared-ci-workflows/.github/workflows/rust.yml@main
    with:
      run-coverage: false   # coverage handled in e2e job
      run-no-std: false
      run-no-default-features: false   # crate requires at least one of: grpc, http
      extra-test-flags: "-E 'not binary(e2e)'"  # re-enable via run-collector once shared workflow merges

  # Coverage gate requires a live OTel Collector on :4317.
  e2e:
    name: E2E + Coverage
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6

      - uses: dtolnay/rust-toolchain@stable
        with:
          components: llvm-tools-preview

      - name: Install cargo-nextest and cargo-llvm-cov
        run: |
          cargo install cargo-nextest --version 0.9.114 --locked
          cargo install cargo-llvm-cov --locked

      - name: Start OTel Collector
        env:
          OTEL_COLLECTOR_IMAGE: otel/opentelemetry-collector-contrib:0.150.1
          PYROSCOPE_IMAGE: grafana/pyroscope:1.13.0
        run: |
          mkdir -p collector-output && chmod 777 collector-output
          docker compose up -d
          echo "Waiting for collector health endpoint on :13133..."
          for i in $(seq 1 60); do
            if curl -sf http://localhost:13133/ > /dev/null 2>&1; then
              echo "Collector ready after ${i}s"
              exit 0
            fi
            sleep 1
          done
          echo "Collector did not become ready within 60 seconds"
          docker compose ps
          docker compose logs --tail=100
          exit 1

      - name: Coverage gate (≤1 uncovered line)
        run: make ci-coverage

      - name: Collector diagnostics
        if: failure()
        run: |
          echo "=== Collector logs ===" && docker compose logs --tail=100
          echo "=== Traces ===" && cat collector-output/traces.jsonl 2>/dev/null || true

      - name: Teardown
        if: always()
        run: docker compose down 2>/dev/null || true