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 support@ddog-gov.com.
概要
このインテグレーションは、Mergify で構成された各リポジトリのマージキュー長を監視し、Mergify のグローバル可用性を追跡します。メトリクスを Datadog アカウントに送信することで、異常アラート用のモニターをセットアップし、マージキューのパフォーマンスを分析することができます。この Datadog インテグレーションを使用して、Mergify サービスの可用性を意識し、開発ワークフローを最適化することができます。
セットアップ
インストール
リリースから
datadog-agent integration install -t datadog-mergify==<INTEGRATION_VERSION> を実行します。
ソースから
Mergify チェックをホストにインストールするには
マシンに開発ツールをインストールします。
ddev release build mergify を実行してパッケージをビルドします。
Datadog Agent をダウンロードします。
ビルドの成果物を Agent をインストール済みのホストにアップロードし、以下を実行します。
datadog-agent integration install -w path/to/mergify/dist/<ARTIFACT_NAME>.whl.
構成
Mergify のメトリクスの収集を開始するには、Agent のコンフィギュレーションディレクトリのルートにある conf.d/ フォルダーの mergify.d/conf.yaml ファイルを編集します。
使用可能なすべての構成オプションの詳細については、サンプル mergify.d/conf.yaml.example ファイルを参照してください。
Agent を再起動します。
検証
Agent の status サブコマンドを実行し、Checks セクションで mergify を探します。
収集データ
メトリクス
| |
|---|
mergify.merge_queue_length (gauge) | Merge queue length |
mergify.time_to_merge.median (gauge) | Median time to merge Shown as second |
mergify.time_to_merge.mean (gauge) | Mean time to merge Shown as second |
mergify.queue_checks_outcome (gauge) | Number of outcomes for the queue operation. Each outcome type can be found in the tag ‘outcome_type’ |
mergify.queue_freeze.duration (gauge) | Merge queue freeze duration Shown as second |
For the metric mergify.queue_checks_outcome, the available outcome_type tags are :
PR_DEQUEUED: The number of PRs that have been manually removed from the queuePR_AHEAD_DEQUEUED: The number of PRs that have been removed from the queue because a PR ahead of it was removed from the queuePR_AHEAD_FAILED_TO_MERGE: The number of PRs that have been removed from the queue because a PR ahead of it failed to mergePR_WITH_HIGHER_PRIORITY_QUEUED: The number of PRs that have been removed from the queue because a PR with higher priority has been queuedPR_QUEUED_TWICE: The number of PRs that have been removed from the queue because they have been queued twiceSPECULATIVE_CHECK_NUMBER_REDUCED: The number of PRs that have been removed from the queue because the number of speculative checks in the config was changedCHECKS_TIMEOUT: The number of PRs that have been removed from the queue because the speculative checks have timed outCHECKS_FAILED: The number of PRs that have been removed from the queue because the speculative checks have failedQUEUE_RULE_MISSING: The number of PRs that have been removed from the queue because the queue rule that was used to queue the PR has been removed from the configUNEXPECTED_QUEUE_CHANGE: The number of PRs that have been removed from the queue because a user made an operation on the queued pull requestPR_FROZEN_NO_CASCADING: The number of PRs that have been removed from the queue because they were frozen by a freeze with no cascading effectTARGET_BRANCH_CHANGED: The number of PRs that have been removed from the queue because the PR’s target branch was changedTARGET_BRANCH_MISSING: The number of PRs that have been removed from the queue because the PR’s target branch does not exist anymorePR_UNEXPECTEDLY_FAILED_TO_MERGE: The number of PRs that have been removed from the queue because they unexpectedly failed to get mergedBATCH_MAX_FAILURE_RESOLUTION_ATTEMPTS: The number of PRs that have been removed from the queue because the maximum batch failure resolution attempts have been reached
イベント
Mergify には、イベントは含まれません。
トラブルシューティング
ご不明な点は、Mergify サポートまでお問い合わせください。