Java Vert.x イベント バス インテグレーションは、監視 (Vert.x)[https://vertx.io/] のインストゥルメンテーションを提供します イベント バス。バス全体のイベント フローを追跡できます。 Vert.x専用に設計 AbstractVerticle
を拡張する頂点では、この拡張により各デプロイ クラスがインストゥルメントされ、 AbstractVerticle
で明示的に定義されているメソッドを除くすべてのメソッドが監視されます。
サポート対象のメソッド
インテグレーションはメトリックを追跡または除外します。 それぞれのリストは次のとおりです。
追跡されたメソッド:
- イベントフローの追跡を容易にする方法
- アプリケーションの動作とパフォーマンスの可視性を高める方法。
除外される方法:
- 特定のライフサイクルと設定方法 (
start
、stop
、rxStart
、rxStop
、config
、deploymentID
、getVertx
、init
、processArgs
)
Javaエージェントのインストール
Java Vert.x 拡張機能を構成するには、Java APM エージェントをインストールする必要があります。 指示に従ってJava APM エージェントをインストールします。
Java APM エージェントがアプリケーションにインストールされ、構成されたら、 newrelic
ディレクトリの下にextensions
フォルダがまだ存在しない場合は作成します。
$# 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のスムーズで信頼性の高い監視エクスペリエンスを保証します。 アプリケーション。 弊社インテグレーションの向上にご協力いただき誠にありがとうございます。