Skip to content

Latest commit

 

History

History
53 lines (39 loc) · 2.44 KB

monitoring-metrics.md

File metadata and controls

53 lines (39 loc) · 2.44 KB
description
Aviator provides monitoring metrics for Prometheus. Monitor your queue length and GitHub API usage.

Monitoring Metrics

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.

NameTypeLabelsDescription
mergequeue_queued_pr_countGaugerepoNumber of queued pull requests
mergequeue_reset_event_countCounterrepo, branch, reset_typeNumber of reset events over time
mergequeue_github_rest_api_quota_remaining_countGaugeRemaining quota for GitHub REST API
mergequeue_github_rest_api_quota_limit_countGaugeMax quota limit for GitHub REST API
mergequeue_github_graphql_api_quota_remaining_countGaugeRemaining quota for GitHub GraphQL API
mergequeue_github_graphql_api_quota_limit_countGaugeMax 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