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 support@ddog-gov.com.

概要

このインテグレーションは、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)
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 queue
  • PR_AHEAD_DEQUEUED: The number of PRs that have been removed from the queue because a PR ahead of it was removed from the queue
  • PR_AHEAD_FAILED_TO_MERGE: The number of PRs that have been removed from the queue because a PR ahead of it failed to merge
  • PR_WITH_HIGHER_PRIORITY_QUEUED: The number of PRs that have been removed from the queue because a PR with higher priority has been queued
  • PR_QUEUED_TWICE: The number of PRs that have been removed from the queue because they have been queued twice
  • SPECULATIVE_CHECK_NUMBER_REDUCED: The number of PRs that have been removed from the queue because the number of speculative checks in the config was changed
  • CHECKS_TIMEOUT: The number of PRs that have been removed from the queue because the speculative checks have timed out
  • CHECKS_FAILED: The number of PRs that have been removed from the queue because the speculative checks have failed
  • QUEUE_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 config
  • UNEXPECTED_QUEUE_CHANGE: The number of PRs that have been removed from the queue because a user made an operation on the queued pull request
  • PR_FROZEN_NO_CASCADING: The number of PRs that have been removed from the queue because they were frozen by a freeze with no cascading effect
  • TARGET_BRANCH_CHANGED: The number of PRs that have been removed from the queue because the PR’s target branch was changed
  • TARGET_BRANCH_MISSING: The number of PRs that have been removed from the queue because the PR’s target branch does not exist anymore
  • PR_UNEXPECTEDLY_FAILED_TO_MERGE: The number of PRs that have been removed from the queue because they unexpectedly failed to get merged
  • BATCH_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 サポートまでお問い合わせください。