Skip to main content

Documentation Index

Fetch the complete documentation index at: https://bilanc.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Workflow Metrics

Workflow metrics provide insights into the performance, reliability, and cost of your CI/CD pipelines.

Available Metrics

workflow-runs-count
string
Number of workflow runs
workflow-run-duration
string
Average workflow run duration
workflow-run-duration-p95
string
95th percentile workflow run duration
workflow-run-success-rate
string
Percentage of workflow runs that succeeded
artifact-sizes
string
Size of build artifacts produced by workflow runs
estimated-workflow-run-cost
string
Estimated compute cost of workflow runs

Workflow Runs Count

Retrieve the number of workflow runs over time, grouped by workflow name.
curl -X POST 'https://api.bilanc.co/metrics/workflow-runs-count' \
  -H 'Authorization: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "filters": {
      "repositories": [{"repository_name": "backend-api"}],
      "run_conclusions": ["success", "failure"],
      "start_date": "2024-01-01",
      "end_date": "2024-03-31"
    },
    "group_by": ["workflow_name", "run_conclusion"],
    "date_level": "week",
    "date_field": "created_at"
  }'

Workflow Run Duration

Retrieve the average or percentile duration of workflow runs to identify slow pipelines.
curl -X POST 'https://api.bilanc.co/metrics/workflow-run-duration' \
  -H 'Authorization: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "filters": {
      "workflow_names": ["CI", "Deploy"],
      "run_conclusions": ["success"],
      "start_date": "2024-01-01",
      "end_date": "2024-03-31"
    },
    "group_by": ["workflow_name"],
    "date_level": "month",
    "aggregation": "AVG",
    "date_field": "created_at"
  }'

Workflow Run Success Rate

Track the success rate of your CI/CD pipelines over time.
curl -X POST 'https://api.bilanc.co/metrics/workflow-run-success-rate' \
  -H 'Authorization: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "filters": {
      "team": ["team123"],
      "start_date": "2024-01-01",
      "end_date": "2024-03-31"
    },
    "group_by": ["team_name"],
    "date_level": "month",
    "date_field": "created_at"
  }'

Parameter Notes

date_field
string
For workflow metrics, the following date fields are available:
  • created_at: When the workflow run was triggered
  • updated_at: When the workflow run last changed state
aggregation
string
Required for duration and cost metrics. Accepted values: SUM, MAX, MIN, AVG. Count and rate metrics (workflow-runs-count, workflow-run-success-rate) do not require an aggregation.
filters
object
Applicable filters for workflow metrics:
  • workflow_names: Filter by workflow names (e.g. CI, Deploy)
  • workflow_run_ids: Filter by specific workflow run IDs
  • run_conclusions: Workflow run conclusions — success, failure, cancelled, skipped, timed_out
  • branches: Filter by the branch that triggered the workflow
  • repositories: Array of {"repository_name": "..."} objects
  • team: Filter by team IDs
  • squad_ids: Filter by squad IDs
  • squad_levels: Filter by squad hierarchy level
  • manager_ids: Filter by manager user IDs
  • departments: Filter by department names
  • locations: Filter by employee location
  • levels: Filter by employee level
  • member: Filter by triggering user merged user IDs
  • associated_pr_ids: Filter by associated PR IDs

Common Use Cases

  • Pipeline Performance: Track duration trends to catch regressions early
  • Reliability Monitoring: Monitor success rate to identify flaky workflows
  • Cost Analysis: Use estimated-workflow-run-cost to track and reduce CI spend
  • Team Ownership: Compare workflow metrics across teams using group_by: ["team_name"]
  • Branch Filtering: Isolate metrics for specific branches (e.g. main) using the branches filter