Supported OS Linux Windows Mac OS

インテグレーションバージョン1.0.2

To find out if this integration is available in your organization, see your Datadog Integrations page or ask your organization administrator.

To initiate an exception request to enable this integration for your organization, email [email protected].

概要

このインテグレーションは、Mergify で構成された各リポジトリのマージキュー長を監視し、Mergify のグローバル可用性を追跡します。メトリクスを Datadog アカウントに送信することで、異常アラート用のモニターをセットアップし、マージキューのパフォーマンスを分析することができます。この Datadog インテグレーションを使用して、Mergify サービスの可用性を意識し、開発ワークフローを最適化することができます。

セットアップ

インストール

リリースから

datadog-agent integration install -t datadog-mergify==<INTEGRATION_VERSION> を実行します。

ソースから

Mergify チェックをホストにインストールするには

  1. マシンに開発ツールをインストールします。

  2. ddev release build mergify を実行してパッケージをビルドします。

  3. Datadog Agent をダウンロードします

  4. ビルドの成果物を Agent をインストール済みのホストにアップロードし、以下を実行します。 datadog-agent integration install -w path/to/mergify/dist/<ARTIFACT_NAME>.whl.

構成

  1. Mergify のメトリクスの収集を開始するには、Agent のコンフィギュレーションディレクトリのルートにある conf.d/ フォルダーの mergify.d/conf.yaml ファイルを編集します。

    使用可能なすべての構成オプションの詳細については、サンプル mergify.d/conf.yaml.example ファイルを参照してください。

  2. Agent を再起動します

検証

Agent の status サブコマンドを実行し、Checks セクションで mergify を探します。

収集データ

メトリクス

mergify.merge_queue_length
(gauge)
[Deprecated] Merge queue length. Use mergify.queue.size.max instead
mergify.time_to_merge.median
(gauge)
[Deprecated] Median time to merge. Use mergify.queue.total_queue_time instead
Shown as second
mergify.time_to_merge.mean
(gauge)
[Deprecated] Mean time to merge. Use mergify.queue.total_queue_time instead
Shown as second
mergify.queue_checks_outcome
(gauge)
[Deprecated] Number of queue operation outcomes by outcome_type tag. Use mergify.queue.check_outcome instead
mergify.queue.entered
(count)
Number of pull requests that entered the merge queue
mergify.queue.merged
(count)
Number of pull requests merged from the queue
mergify.queue.size.max
(gauge)
Maximum number of pull requests waiting in the queue during the period
mergify.queue.batch_size.sum
(count)
Sum of batch sizes in pull requests per batch. Divide by mergify.queue.batch_size.count for the average batch size
mergify.queue.batch_size.count
(count)
Number of batches observed. Denominator for the average batch size
mergify.queue.running_checks.max
(gauge)
Maximum number of concurrent CI checks running for the queue during the period
mergify.queue.exit_reason
(count)
Number of pull requests that left the queue split by reason in the exit_reason tag
mergify.queue.check_outcome
(count)
Number of batch check outcomes split by result in the outcome tag
mergify.queue.checks_retries.recovered
(count)
Number of CI check sessions that recovered after a retry
mergify.queue.checks_retries.not_recovered
(count)
Number of CI check sessions that did not recover after a retry
mergify.queue.bisection.started
(count)
Number of batch bisections started to isolate a failing pull request
mergify.queue.total_queue_time.sum
(count)
Sum of total time pull requests spent in the queue. Divide by mergify.queue.total_queue_time.count for the average queue time
Shown as second
mergify.queue.total_queue_time.count
(count)
Number of pull requests that left the queue. Denominator for the average total queue time
mergify.queue.ci_runtime.sum
(count)
Sum of CI runtime across queued pull requests. Divide by mergify.queue.ci_runtime.count for the average CI runtime
Shown as second
mergify.queue.ci_runtime.count
(count)
Number of CI runtime samples. Denominator for the average CI runtime
mergify.queue.idle.capacity.sum
(count)
Sum of time pull requests spent waiting for queue capacity (CI slots). Divide by mergify.queue.idle.count for the average
Shown as second
mergify.queue.idle.schedule.sum
(count)
Sum of time pull requests spent waiting on a merge schedule. Divide by mergify.queue.idle.count for the average
Shown as second
mergify.queue.idle.freeze.sum
(count)
Sum of time pull requests spent waiting on a queue freeze. Divide by mergify.queue.idle.count for the average
Shown as second
mergify.queue.idle.count
(count)
Number of queue-leave events. Shared denominator for the mergify.queue.idle.*.sum metrics

The merge queue stats metrics (prefixed mergify.queue.) cover three categories:

  • Throughput: pull requests entered and merged, queue size, batch size, and concurrent running checks.
  • Queue Health: queue exit reasons, batch check outcomes, CI check retries, and batch bisections.
  • Performance: total queue time, CI runtime, and idle time spent waiting for capacity, schedules, or freezes.

These metrics are tagged by repository, branch, queue, and priority_rule. Duration and size averages are submitted as sum and count companions, derived in Datadog as sum / count (for example, mergify.queue.total_queue_time.sum / mergify.queue.total_queue_time.count).

イベント

Mergify には、イベントは含まれません。

トラブルシューティング

ご不明な点は、Mergify サポートまでお問い合わせください。