1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【Instana】Instanaの基本的な動きを理解する、試してみた

1
Last updated at Posted at 2026-07-02

はじめに

上記の記事を実際に試してみた、の続きです。本記事では Java および OpenLiberty の起動 を扱います。
Instnaの自動構成について、エージェントインストール後、Discoveryが監視対象を見つけてセンサーがダウンロードされる様子を一つ一つ追っていきます。

全体の流れ(ログ実機)

# Open Liberty起動後Liberty JVM発見して、、
# Sensor bundle取得
2026-07-01T08:53:24.917GMT-04:00 | INFO  | features-3-thread-1              | turesServiceImpl | org.apache.karaf.features.core - 4.2.16 | Installing bundles:
2026-07-01T08:53:24.917GMT-04:00 | INFO  | features-3-thread-1              | turesServiceImpl | org.apache.karaf.features.core - 4.2.16 |   mvn:com.instana/sensor-websphere-liberty/1.1.10

# Bundle起動
2026-07-01T08:53:24.931GMT-04:00 | INFO  | features-3-thread-1              | turesServiceImpl | org.apache.karaf.features.core - 4.2.16 | Starting bundles:
2026-07-01T08:53:24.931GMT-04:00 | INFO  | features-3-thread-1              | turesServiceImpl | org.apache.karaf.features.core - 4.2.16 |   com.instana.sensor-websphere-liberty/1.1.10
2026-07-01T08:53:24.934GMT-04:00 | INFO  | features-3-thread-1              | turesServiceImpl | org.apache.karaf.features.core - 4.2.16 | Done.

# Sensorインストール・有効化
2026-07-01T08:53:24.935GMT-04:00 | INFO  | stana-agent-scheduler-thread-9-3 | turesManagerImpl | com.instana.agent-bootstrap - 1.2.57 | Installed instana-websphere-liberty-sensor
2026-07-01T08:53:24.941GMT-04:00 | INFO  | 6fa-4e47-4cc0-b16e-9b0e089de150) | WebSphereLiberty | com.instana.sensor-websphere-liberty - 1.1.10 | Activated Sensor for JVM 24948

# PID 24948へAttach
2026-07-01T08:53:24.941GMT-04:00 | INFO  | instana-executor-thread-4-8      | WebSphereLiberty | com.instana.sensor-websphere-liberty - 1.1.10 | Attaching to JVM with PID 24948

# Command Socket作成
2026-07-01T08:53:26.016GMT-04:00 | INFO  | instana-socket-worker-8-1        | tClientIdDecoder | com.instana.agent-socket-server - 1.0.15 | 24948:com.instana.plugin.websphereliberty:commands connection established

# Data Socket作成
2026-07-01T08:53:26.024GMT-04:00 | INFO  | instana-socket-worker-8-2        | tClientIdDecoder | com.instana.agent-socket-server - 1.0.15 | 24948:com.instana.plugin.websphereliberty:data connection established

image.png
全体のイメージ。Karafが、新しいbundleを柔軟にインストールして、そのbundleが必要なセンサーをダウンロードさせる。

  • Apache Karaf: バンドルをデプロイして管理する OSGi ベースのランタイムコンテナー

ログの読み解き

① Libertyセンサーのインストール

Installing bundles:
  mvn:com.instana/sensor-websphere-liberty/1.1.10
Installed instana-websphere-liberty-sensor

discovery-websphere-liberty がPID 24948のプロセスを OpenLibertyと識別 し、専用センサーをダウンロード・インストールしました。

ポイント: センサーは事前に入っているのではなく、Discoveryが監視対象を見つけて初めてダウンロードされます。これがInstanaの「自動構成」の仕組みです。


② センサーのアクティベートとJVMへのアタッチ

WebSphereLiberty | Activated Sensor for JVM 24948
WebSphereLiberty | Attaching to JVM with PID 24948

センサーが起動し、動いているJVMプロセス(PID 24948)に直接アタッチしています。
アプリケーションの再起動は不要です。これがInstanaの「ノータッチ」監視の核心部分です。


③ 通信チャネルの確立

24948:com.instana.plugin.websphereliberty:commands connection established
24948:com.instana.plugin.websphereliberty:data connection established

AgentとJVMの間に2本のソケット接続が確立されました。

まとめ

OpenLibertyを起動すると、Instanaは以下の流れで自動的に監視が開始されました。
Discoveryの動きの解像度が上がりました。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?