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

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

英語版と翻訳版に矛盾がある場合は、英語版が優先されます。詳細については、このページを参照してください。

問題を作成する

Java Vert.x イベント バスインテグレーション

Java Vert.x イベント バス インテグレーションは、監視 (Vert.x)[https://vertx.io/] のインストゥルメンテーションを提供します イベント バス。バス全体のイベント フローを追跡できます。 Vert.x専用に設計 AbstractVerticleを拡張する頂点では、この拡張により各デプロイ クラスがインストゥルメントされ、 AbstractVerticleで明示的に定義されているメソッドを除くすべてのメソッドが監視されます。

サポート対象のメソッド

インテグレーションはメトリックを追跡または除外します。 それぞれのリストは次のとおりです。

追跡されたメソッド:

  • イベントフローの追跡を容易にする方法
  • アプリケーションの動作とパフォーマンスの可視性を高める方法。

除外される方法:

  • 特定のライフサイクルと設定方法 ( startstoprxStartrxStopconfigdeploymentIDgetVertxinitprocessArgs )

Javaエージェントのインストール

Java Vert.x 拡張機能を構成するには、Java APM エージェントをインストールする必要があります。 指示に従ってJava APM エージェントをインストールします

Java APM エージェントがアプリケーションにインストールされ、構成されたら、 newrelicディレクトリの下にextensionsフォルダがまだ存在しない場合は作成します。

bash
$
# Open your Java APM Agent installation location and create 'extensions' folder ( if it is not existing)
$
cd path/to/newrelic
$
mkdir extensions

Java Vert.x をインストールして設定する イベント バスインテグレーション

Java Vert.xをインストールして設定するには イベント バス インテグレーションでは、次の手順に従ってください。

  • 提供された bash スクリプトで Java APM エージェントのextensionsフォルダーの場所を更新します。

  • 更新されたコマンドを bash スクリプトinstall_vertx_integration.shにコピーします。

  • スクリプトを実行してJava Vert.xを統合する New Relic APM によるイベント バスの監視。

    bash
    $
    #!/bin/bash
    $
    $
    # Define variables
    $
    apiUrl="https://api.github.com/repos/newrelic/newrelic-java-vertx/releases/latest"
    $
    tempZipPath="/tmp/latest.zip"
    $
    tempExtractPath="/tmp/Extracted"
    $
    extensionsDir="/path/to/newrelic/extensions"
    $
    $
    # Retrieve the download URL for the latest release ZIP file
    $
    downloadUrl=$(curl -s "$apiUrl" | grep -o "browser_download_url.*\.zip" | cut -d '"' -f 3)
    $
    $
    echo $downloadUrl
    $
    $
    # Check if the download URL is empty or invalid
    $
    if [ -z "$downloadUrl" ]; then
    $
    echo "Failed to retrieve download URL. Exiting."
    $
    exit 1
    $
    fi
    $
    $
    # Download the latest release ZIP file
    $
    curl -L -o "$tempZipPath" "$downloadUrl"
    $
    $
    # Check if the ZIP file was downloaded successfully
    $
    if [ ! -f "$tempZipPath" ]; then
    $
    echo "Failed to download the ZIP file. Exiting."
    $
    exit 1
    $
    fi
    $
    $
    # Create a temporary extraction folder
    $
    mkdir -p "$tempExtractPath"
    $
    $
    # Extract the contents of the ZIP file to the temporary folder
    $
    unzip -q "$tempZipPath" -d "$tempExtractPath"
    $
    $
    # Check if the extraction was successful
    $
    if [ $? -ne 0 ]; then
    $
    echo "Failed to extract the ZIP file. Exiting."
    $
    exit 1
    $
    fi
    $
    $
    # Copy all .jar files to the Java APM Agent 'extensions' directory
    $
    find "$tempExtractPath" -name "*.jar" -exec cp {} "$extensionsDir" \;
    $
    $
    # Clean up temporary files
    $
    rm "$tempZipPath"
    $
    rm -r "$tempExtractPath"
    $
    $
    echo "Installation completed successfully."

Java Vert.xをインストールして設定するには イベント バス インテグレーションでは、次の手順に従ってください。

  • 提供された PowerShell コマンドで、Java APM エージェントの「extensions」フォルダーの場所を更新します。

    bash
    $
    # Define variables
    $
    $apiUrl = "https://api.github.com/repos/newrelic/newrelic-java-vertx/releases/latest"
    $
    $tempZipPath = "C:\Temp\latest.zip"
    $
    $tempExtractPath = "C:\Temp\Extracted"
    $
    $extensionsDir = "C:\Path\To\newrelic\extensions"
    $
    $
    # Download the latest release ZIP file from GitHub
    $
    $response = Invoke-WebRequest -Uri $apiUrl
    $
    $downloadUrl = ($response.Content | ConvertFrom-Json).assets[0].browser_download_url
    $
    Invoke-WebRequest -Uri $downloadUrl -OutFile $tempZipPath
    $
    $
    # Extract the contents of the ZIP file to a temporary folder
    $
    New-Item -ItemType Directory -Path $tempExtractPath -Force
    $
    Expand-Archive -Path $tempZipPath -DestinationPath $tempExtractPath
    $
    $
    # Copy all .jar files to the Java APM Agent 'extensions' directory
    $
    Get-ChildItem -Path $tempExtractPath -Filter "*.jar" | Copy-Item -Destination $extensionsDir
    $
    $
    # Clean up temporary files
    $
    Remove-Item -Path $tempZipPath -Force
    $
    Remove-Item -Path $tempExtractPath -Recurse -Force

Java Vert.x イベント バス インテグレーション リリースから、 vertx-instrumentation-vx.y.z.zipを一時ディレクトリにダウンロードして解凍します。 すべての「jar」ファイルをNew Relic Java APMエージェントの「extensions」フォルダーにコピーします。

インテグレーションを確認する

Java Vert.xを設定した後 イベントバスインテグレーションでは、アプリケーションのVert.xを視覚化できます イベント バスのトランザクションとトレースを New Relic APM およびサービス内で直接実行します。

インテグレーションの問題の報告

Java Vert.xで問題が発生した場合 イベント Bus インテグレーションについては、 GitHub リポジトリに報告してください。 皆様からのフィードバックは、問題を迅速に特定して対処するのに役立ち、Vert.xのスムーズで信頼性の高い監視エクスペリエンスを保証します。 アプリケーション。 弊社インテグレーションの向上にご協力いただき誠にありがとうございます。

Copyright © 2024 New Relic株式会社。

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