Monitoring Metrics

Aviator provides monitoring metrics for Prometheus. Monitor your queue length and GitHub API usage.

Aviator provides some monitoring metrics for Prometheus. You can monitor your queue length and GitHub API usage with this.

Endpoint

https://app.aviator.co/api/metrics serves Prometheus metrics. This is authed with your Aviator API key.

In Prometheus config, you can add a scrape config like this:

scrape_configs:
  - job_name: "aviator-mergequeue"
    metrics_path: "/api/metrics"
    scheme: "https"
    params:
      # REQUIRED: repository names to expose
      repos:
        - "octocat/Hello-World"
        - "octocat/Spoon-Knife"
      # OPTIONAL: target branch names of the PRs (the merge destination).
      # If it's not specified, grab all PRs.
      branches:
        - "main"
    authorization:
      type: "Bearer"
      credentials: "mq_live_... YOUR API KEY HERE"
    static_configs:
      - targets:
        - "app.aviator.co"

You need to update the credentials part and the repository list part.

Metrics

This endpoint exports following metrics.

Name
Type
Labels
Description

mergequeue_queued_pr_count

Gauge

repo

Number of queued pull requests

mergequeue_reset_event_count

Counter

repo, branch, reset_type

Number of reset events over time

mergequeue_github_rest_api_quota_remaining_count

Gauge

Remaining quota for GitHub REST API

mergequeue_github_rest_api_quota_limit_count

Gauge

Max quota limit for GitHub REST API

mergequeue_github_graphql_api_quota_remaining_count

Gauge

Remaining quota for GitHub GraphQL API

mergequeue_github_graphql_api_quota_limit_count

Gauge

Max quota limit for GitHub GraphQL API

Note on metric names

You will likely see metrics with some suffixes like _total and _created. This is Prometheus ecosystem's convention that we need to follow. See the OpenMetrics format spec for details.

See Also

Last updated

Was this helpful?