Docs » Splunk APMのセットアップ » トレースをSplunk APMに送信する

トレースをSplunk APMに送信する 🔗

サービスからAPMにトレースを送信することで、APMのエクスペリエンスをセットアップします。

前提条件 🔗

セットアッププロセスを開始する前に、以下を考慮してください:

  • If you are using multiple components of Splunk Observability Cloud and want to collect host metrics, logs, or other application data in addition to traces, follow the steps in Splunk Observability Cloud にデータを取り込む to get data into Splunk Observability Cloud. Then see データがSplunk APMに取り込まれていることを確認する in this topic to make sure your data is coming into Splunk APM as you expect.

  • OpenTelemetry Collector Contribプロジェクト(アップストリームコレクターとしても知られています)をすでにデプロイしている場合は、既存のデプロイメントを使用してトレースをSplunk APMに送信できます。詳細は OpenTelemetry Collector Contribプロジェクトを使用してテレメトリを送信します。 を参照してください。ただし、Splunk Distribution of OpenTelemetry Collectorを使用すると、Splunk Observability Cloud用にカスタマイズされた、より手厚いサポートのエクスペリエンスが提供されることに注意してください。

  • Splunk APMでガイド付きセットアップウィザードを使用して、Splunk Distribution of OpenTelemetry Collectorを使ったSplunk APMへのトレース送信を開始したい場合は、以下のセクションの手順に従ってください。ガイド付きプロセスを使わずに自分でセットアップする場合は、Splunk Distribution of the OpenTelemetry Collector の利用開始 を参照してください。

注釈

スパンにスパンタグを追加する

OpenTelemetryでは「属性」として知られているスパンタグは、トラブルシューティングや分析を可能にするために、スパンに重要なコンテキストを追加します。スパンへのタグの追加は、インストルメンテーションの最中か、複数サービスからのデータの集約に使用しているOpenTelemetry CollectorのYAML設定ファイルに追加されたプロセッサーの中で行います。詳細は OpenTelemetryでタグや属性を使用する を参照してください。

deployment.environment タグは、Splunk APMをデプロイ環境でフィルタリングできるため、特に便利です。環境タグの詳細については、Splunk APMでデプロイ環境を設定する を参照してください。

スパンにスパンタグを追加する方法については Splunk APMでスパンタグを使ってスパンにコンテキストを追加する を参照してください。

Splunk APMを設定しているだけで、Splunk Distribution of OpenTelemetry Collectorとガイド付きセットアップウィザードを使用したいという場合は、次の順序で、手順に従ってください:

Deploy the Splunk Distribution of the OpenTelemetry Collector on your hosts 🔗

To send traces to Splunk APM, first deploy the Splunk Distribution of OpenTelemetry Collector on the hosts in which your applications are running. Splunk Observability Cloud offers OpenTelemetry Collector distributions for Kubernetes, Linux, and Windows. These distributions integrate the collection of data from hosts and data forwarding to Splunk Observability Cloud.

注釈

Splunk Distribution of OpenTelemetry Collectorのメリット

Splunk Distribution of OpenTelemetry Collectorのインストールは必須ではありませんが、インストールすると以下のメリットが得られます:

  • このコレクターは、アプリケーションが実行されているインフラストラクチャに関連するスパンメタデータを追加できます。

  • 認証の詳細情報を指定できる単一の設定ポイントを確立します。

  • カスタムタグとカスタム処理をスパンに追加する単一の設定ポイントを確立します。

  • 多くのソースからスパンをまとめてバッチ処理することができます。スパンをバッチ処理することで、バックエンドの負荷を軽減します。

To deploy the Splunk Distribution of OpenTelemetry Collector on a host, follow these steps:

  1. Splunk Observability Cloudにログインします。

  2. In the left navigation menu, select Data Management.

  3. Go to the Available integrations tab, or select Add Integration in the Deployed integrations tab.

  4. Select the setup wizard for the Collector, and follow the instructions according to your host.

See the following table for more information about deploying the Splunk Distribution of the OpenTelemetry Collector on Kubernetes, Linux, and Windows hosts:

ホストタイプ

コレクター

ドキュメント

Kubernetes

Splunk Distribution of OpenTelemetry Collector for Kubernetes

Kubernetesデータを収集する

Linux

Splunk Distribution of OpenTelemetry Collector for Linux

Linuxデータを収集する

Windows

Splunk Distribution of OpenTelemetry Collector for Windows

Windowsデータを収集する

アプリケーションとサービスをインストルメントして、Splunk APMにスパンを取り込む 🔗

Splunk Observability Cloudが提供する自動インストルメンテーションライブラリを使用して、サポートされているプログラミング言語でサービスをインストルメントします。最高レベルのサポートを得るには、前のステップでデプロイしたOpenTelemetry Collectorにアプリケーションからのスパンを送信します。

サービスをインストルメントするには、サービスが稼働しているホストまたはKubernetesクラスターにデプロイされたOpenTelemetry Collectorに、サービスからスパンを送信します。OpenTelemetry Collectorのエンドポイントの指定方法は、インストルメントする言語によって異なります。

以下のテーブルを参照して、各アプリケーションを実行している言語のインストルメンテーション手順に従ってください。

言語

利用可能なインストルメンテーション

ドキュメント

Java

Splunk Distribution of OpenTelemetry Java

Splunk Observability Cloud 用 Java アプリケーションのインストルメンテーション

.NET

Splunk Distribution of OpenTelemetry .NET

Splunk Observability Cloud (OpenTelemetry) 用 .NET アプリケーションのインストルメンテーション

Node.js

Splunk Distribution of OpenTelemetry JS

Splunk Observability Cloud に Node.js アプリケーションをインストルメンテーションする

Go

Splunk Distribution of OpenTelemetry Go

Splunk Observability Cloud けに Go アプリケーションをインストルメンテーションする

Python

Splunk Distribution of OpenTelemetry Python

Splunk Observability Cloud 用 Python アプリケーションのインストルメンテーション

Ruby

Ruby用OpenTelemetryインストルメンテーション

Splunk Observability Cloud (OpenTelemetry) 用に Ruby アプリケーションをインストルメンテーションする

PHP

PHP用OpenTelemetryインストルメンテーション

Splunk Observability Cloud に PHP アプリケーションをインストルメンテーションする

アプリケーションのインストルメンテーションが完了したら、データが入ってきていることを確認する準備が整います。

データがSplunk APMに取り込まれていることを確認する 🔗

アプリケーションをインストルメントしたら、Splunk Observability Cloudが受信スパンを処理するのを待ちます。その後、ナビゲーションメニューで APM を選択し、アプリケーションデータがAPMのランディングページに入り始めていることを確認します。

データがAPMに期待通りに表示されない場合は、インストルメンテーションのトラブルシューティング を参照してください。

次のステップ 🔗

Once data is flowing into APM, it’s time to do some exploring. See Splunk APMを使ってできること.

This page was last updated on 2024年06月03日.