• EnglishEspañol日本語한국어Português
  • ログイン今すぐ開始

この機械翻訳は、参考として提供されています。

In the event of any inconsistency between the English version and the translated version, the English versionwill take priority. Please visit this page for more information.

問題を作成する

CLI を使用して変更を追跡する

変更追跡機能は、顧客やシステムに対する特定の変更の影響を監視するための優れた方法です。これを行うには、監視する変更を指定し、New Relic UI で結果を表示します。

GraphQL または CI/CD 統合を使用して監視する変更を指定できますが、CLI を使用して同じことを行うこともできます。CLI を使用して監視する変更を指定する場合、 GraphQL クエリを実行するか、New Relic データベースに対してNRQL クエリを実行して、それらの変更のリストを取得できます。

こちらは 2 分間の概要ビデオです。または、以下の手順に直接ジャンプすることもできます。

CLI をインストールする

新しいバージョンのCLI を使用すると、GraphQL ミューテーションを送信してマーカーを作成できるようになります。CLI を使用している場合でも、この機能を利用するには CLI をアップグレードする必要があります。

CLI をインストールまたはアップグレードするには、こちらの手順に従ってください。

CLI を使用して変更マーカーを作成する

CLI にはさまざまなオプションがありますが (以下を参照)、 createコマンドは特定の New Relic エンティティに対する特定の変更をマークします。

マーカーを作成する構文は次のとおりです。

newrelic entity deployment create [flags]

次の例を見てみましょう。

newrelic entity deployment create --guid INSERT_YOUR_GUID_HERE --version <1.0.0>

プライマリ (親) オプション

-h, --help help for create
-g, --guid string the entity GUID to create change tracker
-v, --version string the tag names to add to the entity
--changelog string a URL for the changelog or list of changes if not linkable
--commit string the commit identifier, for example, a Git commit SHA
--deepLink string a link back to the system generating the deployment
--deploymentType string type of deployment, one of BASIC, BLUE_GREEN, CANARY, OTHER, ROLLING or SHADOW
--description string a description of the deployment
--groupId string string that can be used to correlate two or more events
-t --timestamp int64 the start time of the deployment, the number of milliseconds since the Unix epoch, defaults to now
-u --user string username of the deployer or bot

親コマンドから継承されたオプション

-a, --accountId int the account ID to use. Can be overridden by setting NEW_RELIC_ACCOUNT_ID
--debug debug level logging
--format string output text format [JSON, Text, YAML] (default "JSON")
--plain output compact text
--profile string the authentication profile to use
--trace trace level logging

次のステップ

CLI を使用して追跡する変更を指定したら、New Relic UI でそれらの変更の影響を分析できます。

Copyright © 2024 New Relic株式会社。

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.