Skip to content

Tracing

トレーシング設定


📚 情報ソース

このドキュメントは以下の情報源を基に作成されています:

主要ソース

  • IBM公式ドキュメント:
  • Instana Observability
  • OpenTelemetry公式ドキュメント: トレーシング仕様とSDK

補足ソース

  • 分散トレーシングのベストプラクティス: サンプリング戦略とパフォーマンス最適化
  • 実運用環境の設定例: マイクロサービス環境でのトレーシング構成

一般トレーシング設定

📚 公式ドキュメント: 一般トレーシング設定

基本設定

1
2
3
4
5
6
com.instana.tracing:
  enabled: true
  extra-http-headers:
    - 'x-request-id'
    - 'x-correlation-id'
    - 'x-session-id'

設定項目の詳細

設定項目 説明 デフォルト値 推奨値
enabled トレーシングの有効化 true true
extra-http-headers キャプチャする追加HTTPヘッダー [] 必要なヘッダーのみ
sampling-rate サンプリングレート 1.0 0.1-1.0
max-spans-per-trace トレースあたりの最大スパン数 1000 1000-5000

高度な設定

com.instana.tracing:
  enabled: true

  # HTTPヘッダーキャプチャ
  extra-http-headers:
    - 'x-request-id'
    - 'x-correlation-id'
    - 'x-session-id'
    - 'x-user-id'
    - 'x-tenant-id'

  # サンプリング設定
  sampling:
    rate: 0.1  # 10%サンプリング
    adaptive: true  # アダプティブサンプリング

    # エラートレースは常に収集
    always-sample-errors: true

    # 遅いトレースは常に収集
    always-sample-slow-traces: true
    slow-threshold-ms: 1000

  # スパン設定
  spans:
    max-per-trace: 5000
    max-queue-size: 10000

    # スパンタグ
    tags:
      environment: "production"
      service-tier: "backend"

  # フィルタリング
  filters:
    # 除外するエンドポイント
    exclude-paths:
      - "/health"
      - "/metrics"
      - "/actuator/*"

    # 除外するユーザーエージェント
    exclude-user-agents:
      - "kube-probe"
      - "HealthCheck"

追加HTTPヘッダーのキャプチャ: - トレースに含める追加のHTTPヘッダーを指定 - 大文字小文字を区別しない一致 - リクエストとレスポンスの両方で収集

使用例: - マイクロサービス間の相関追跡 - ロードテストの識別 - ユーザーセッションの追跡 - マルチテナント環境でのテナント識別

Javaトレーシング

📚 公式ドキュメント: Javaトレーシング

基本設定

1
2
3
4
5
6
7
8
com.instana.plugin.javatrace:
  instrumentation:
    enabled: true  # 軽量バイトコードインストルメンテーション
    opentracing: false  # OpenTracingインストルメンテーション
    sdk:
      packages:
        - 'com.example.backend'
        - 'com.example.services'

設定項目の詳細

設定項目 説明 デフォルト値 推奨値
instrumentation.enabled 自動インストルメンテーション true true
instrumentation.opentracing OpenTracingサポート false 必要に応じて
sdk.packages SDKパッケージ [] アプリケーションパッケージ
profiling.enabled プロファイリング false 本番環境では慎重に

高度な設定

com.instana.plugin.javatrace:
  # インストルメンテーション設定
  instrumentation:
    enabled: true
    opentracing: true

    # 自動検出フレームワーク
    frameworks:
      - "spring"
      - "spring-boot"
      - "servlet"
      - "jdbc"
      - "jms"
      - "kafka"
      - "redis"
      - "mongodb"

    # カスタムインストルメンテーション
    custom:
      enabled: true
      classes:
        - "com.example.service.OrderService"
        - "com.example.service.PaymentService"
      methods:
        - "processOrder"
        - "processPayment"

  # SDK設定
  sdk:
    packages:
      - 'com.example.backend'
      - 'com.example.services'
      - 'com.example.api'

    # アノテーション
    annotations:
      - "@Span"
      - "@Traced"
      - "@Monitored"

  # スタックトレース設定
  stacktrace:
    enabled: true
    max-depth: 50
    exclude-packages:
      - "java.*"
      - "javax.*"
      - "sun.*"

  # パフォーマンス設定
  performance:
    max-instrumented-classes: 10000
    cache-size: 5000

# Javaエージェント設定
com.instana.plugin.java:
  # JVMメトリクス
  jvm:
    enabled: true
    gc-metrics: true
    thread-metrics: true
    memory-metrics: true

  # ガベージコレクション
  gc:
    log-gc-details: true
    log-gc-time: true

設定値の取得方法: - sdk.packages: SDK注釈を使用しているJavaパッケージ名 - アプリケーションのパッケージ構造を確認(src/main/java配下) - 開発者に@SpanなどのInstana SDK注釈の使用箇所を確認

注意事項: - enabledの変更にはエージェント再起動が必要 - opentracingの有効化にはエージェント再起動が必要 - 大量のクラスをスキャンするとCPU使用率が上昇

Node.jsトレーシング

📚 公式ドキュメント: Node.jsトレーシング

基本設定

#### 設定項目の詳細

| 設定項目 | 説明 | デフォルト値 | 推奨値 |
|---------|------|------------|--------|
| `tracing.enabled` | トレーシングの有効化 | `true` | `true` |
| `stackTraceLength` | スタックトレースの深さ | `10` | 10-30 |
| `tracing.http` | HTTP自動トレーシング | `true` | `true` |
| `tracing.mongodb` | MongoDB自動トレーシング | `true` | `true` |

#### 高度な設定

```yaml

### Pythonトレーシング

📚 **公式ドキュメント:** [Pythonトレーシング](https://www.ibm.com/docs/en/instana-observability/python)

#### 基本設定

```yaml

#### 高度な設定

```yaml

### PHPトレーシング

📚 **公式ドキュメント:** [PHPトレーシング](https://www.ibm.com/docs/en/instana-observability/php)

#### 基本設定

```yaml
com.instana.plugin.php:
  tracing:
    enabled: true  # PHPトレーシング拡張機能を有効化
    installExtension: true  # 拡張機能の自動インストール
    sanitizeSql: true  # SQLクエリのサニタイズ
    port: 16816  # トレーシング拡張機能のポート

設定項目の詳細

設定項目 説明 デフォルト値 推奨値
tracing.enabled トレーシングの有効化 true true
installExtension 拡張機能の自動インストール true true
sanitizeSql SQLサニタイズ true true
port トレーシングポート 16816 16816

高度な設定

com.instana.plugin.php:
  tracing:
    enabled: true
    installExtension: true
    sanitizeSql: true
    port: 16816

    # フレームワーク
    laravel:
      enabled: true
      capture-queries: true

    symfony:
      enabled: true
      capture-events: true

    # データベース
    pdo:
      enabled: true
      capture-sql: true

    mysqli:
      enabled: true
      capture-sql: true

    # HTTP
    curl:
      enabled: true
      capture-headers: true

設定値の取得方法: - port: デフォルト16816を使用(競合がある場合のみ変更) - netstat -tuln | grep 16816で使用状況を確認

注意事項: - 拡張機能の有効化/無効化時にPHPランタイムが再起動される - 長時間実行プロセスは手動再起動が必要な場合がある - カスタム再起動スクリプトの設定が可能

.NETトレーシング

📚 公式ドキュメント: .NETトレーシング

基本設定

#### 高度な設定

```yaml

### Goトレーシング

📚 **公式ドキュメント:** [Goトレーシング](https://www.ibm.com/docs/en/instana-observability/go)

#### 基本設定

```yaml

#### 高度な設定

```yaml

### Java Profiling

📚 **公式ドキュメント:** [Java Profiling](https://www.ibm.com/docs/en/instana-observability/java)

#### 基本設定

```yaml
com.instana.plugin.profiling.java:
  enabled: false  # デフォルトで無効

設定項目の詳細

設定項目 説明 デフォルト値 推奨値
enabled プロファイリングの有効化 false 必要時のみ
sampling-interval サンプリング間隔(ms) 10 10-100
max-stack-depth 最大スタック深度 128 128-256

高度な設定

com.instana.plugin.profiling.java:
  enabled: true

  # サンプリング設定
  sampling-interval: 10  # ミリ秒
  max-stack-depth: 128

  # プロファイリングタイプ
  cpu:
    enabled: true
    sampling-rate: 100  # Hz

  memory:
    enabled: true
    allocation-sampling: true

  # フィルタリング
  include-packages:
    - "com.example.*"

  exclude-packages:
    - "java.*"
    - "javax.*"
    - "sun.*"

Javaプロファイリング: - CPUプロファイリング - メモリアロケーション分析 - ホットスポット検出

有効化の影響: - パフォーマンスオーバーヘッド(通常1-3%) - 詳細なメソッドレベル分析 - フレームグラフ生成


実践的な使用例

1. マイクロサービスアーキテクチャの分散トレーシング

シナリオ: 10個のマイクロサービスで構成されるEコマースシステムの完全なトレーシング

# 全サービス共通設定
com.instana.tracing:
  enabled: true

  # 相関ヘッダー
  extra-http-headers:
    - 'x-request-id'
    - 'x-correlation-id'
    - 'x-user-id'
    - 'x-session-id'
    - 'x-tenant-id'

  # サンプリング設定
  sampling:
    rate: 0.1  # 10%サンプリング
    adaptive: true
    always-sample-errors: true
    always-sample-slow-traces: true
    slow-threshold-ms: 1000

  # スパン設定
  spans:
    max-per-trace: 5000  # 多段階サービス呼び出しに対応

    tags:
      environment: "production"
      architecture: "microservices"

  # ヘルスチェック除外
  filters:
    exclude-paths:
      - "/health"
      - "/ready"
      - "/metrics"

# サービス別設定

# 1. APIゲートウェイ(Node.js)

# 2. ユーザーサービス(Java/Spring Boot)
com.instana.plugin.javatrace:
  instrumentation:
    enabled: true
    frameworks:
      - "spring-boot"
      - "jdbc"
      - "redis"

  sdk:
    packages:
      - 'com.example.user'

# 3. 注文サービス(Java/Spring Boot)
com.instana.plugin.javatrace:
  instrumentation:
    enabled: true
    frameworks:
      - "spring-boot"
      - "jdbc"
      - "kafka"

  sdk:
    packages:
      - 'com.example.order'

# 4. 決済サービス(Python/Django)

# 5. 在庫サービス(Go)

# 6. 通知サービス(Node.js)

# タグ設定
com.instana.plugin.host:
  tags:
    environment: "production"
    architecture: "microservices"
    domain: "ecommerce"

トレーシングフロー:

1
2
3
APIゲートウェイ → ユーザーサービス → 注文サービス → 決済サービス
                                在庫サービス → 通知サービス

2. レガシーモノリスからマイクロサービスへの移行監視

シナリオ: モノリスアプリケーションから段階的にマイクロサービスを分離

# モノリスアプリケーション(Java)
com.instana.plugin.javatrace:
  instrumentation:
    enabled: true
    frameworks:
      - "spring"
      - "servlet"
      - "jdbc"

  sdk:
    packages:
      - 'com.example.monolith'

    # 移行対象のクラスを明示的にトレース
    custom:
      enabled: true
      classes:
        - "com.example.monolith.OrderController"
        - "com.example.monolith.PaymentService"
        - "com.example.monolith.InventoryService"

# 新しいマイクロサービス(注文サービス)
com.instana.plugin.javatrace:
  instrumentation:
    enabled: true
    frameworks:
      - "spring-boot"
      - "kafka"

  sdk:
    packages:
      - 'com.example.order.microservice'

# トレース相関
com.instana.tracing:
  extra-http-headers:
    - 'x-legacy-request-id'  # レガシーシステムのID
    - 'x-migration-phase'    # 移行フェーズ識別

# タグ設定
com.instana.plugin.host:
  tags:
    environment: "production"
    migration-phase: "phase-2"
    legacy-integration: "true"

3. サーバーレスアーキテクチャのトレーシング

シナリオ: AWS Lambda、API Gateway、DynamoDBを使用したサーバーレスアプリケーション

# Lambda関数トレーシング
com.instana.plugin.aws.lambda:
  tracing:
    enabled: true

    # コールドスタート追跡
    track-cold-starts: true

    # 環境変数キャプチャ
    capture-environment:
      - "STAGE"
      - "REGION"
      - "TABLE_NAME"

    # Lambda層
    layer:
      auto-install: true
      version: "latest"

# API Gatewayトレーシング
com.instana.plugin.aws.apigateway:
  tracing:
    enabled: true
    capture-request-body: false  # セキュリティ考慮
    capture-response-body: false

# DynamoDBトレーシング
com.instana.plugin.aws.dynamodb:
  tracing:
    enabled: true
    capture-item-keys: true
    sanitize-attributes: true

# X-Ray統合
com.instana.tracing:
  xray:
    enabled: true
    propagate-context: true

# タグ設定
com.instana.plugin.host:
  tags:
    environment: "production"
    architecture: "serverless"
    cloud: "aws"

4. ハイブリッドクラウドのエンドツーエンドトレーシング

シナリオ: オンプレミス、AWS、Azureにまたがるハイブリッドアプリケーション

# オンプレミス(Java)
com.instana.plugin.javatrace:
  instrumentation:
    enabled: true

  sdk:
    packages:
      - 'com.example.onprem'

com.instana.tracing:
  extra-http-headers:
    - 'x-cloud-provider'
    - 'x-datacenter'
    - 'x-region'

# AWS(Lambda)
com.instana.plugin.aws.lambda:
  tracing:
    enabled: true

# Azure(Functions)

# クラウド間トレース相関
com.instana.tracing:
  cloud-correlation:
    enabled: true
    providers:
      - "aws"
      - "azure"
      - "onprem"

# タグ設定(各環境)
com.instana.plugin.host:
  tags:
    environment: "production"
    architecture: "hybrid-cloud"
    location: "onprem"  # または "aws", "azure"

5. 高トラフィックシステムのアダプティブサンプリング

シナリオ: 1日10億リクエストを処理するシステムで効率的なトレーシング

com.instana.tracing:
  enabled: true

  # アダプティブサンプリング
  sampling:
    # 通常時は1%サンプリング
    rate: 0.01
    adaptive: true

    # エラーは常に収集
    always-sample-errors: true

    # 遅いトレースは常に収集
    always-sample-slow-traces: true
    slow-threshold-ms: 500

    # 重要なエンドポイントは高サンプリング
    endpoint-rules:
      - path: "/api/payment/*"
        rate: 0.5  # 50%
      - path: "/api/checkout/*"
        rate: 0.3  # 30%
      - path: "/api/search/*"
        rate: 0.05  # 5%
      - path: "/api/browse/*"
        rate: 0.01  # 1%

    # ユーザーセグメント別サンプリング
    user-rules:
      - header: "x-user-tier"
        value: "premium"
        rate: 0.1  # プレミアムユーザーは10%
      - header: "x-user-tier"
        value: "free"
        rate: 0.01  # 無料ユーザーは1%

  # パフォーマンス最適化
  spans:
    max-per-trace: 1000  # 制限を設定
    max-queue-size: 50000
    batch-size: 100
    flush-interval-ms: 1000

# タグ設定
com.instana.plugin.host:
  tags:
    environment: "production"
    scale: "high-traffic"
    requests-per-day: "1billion"

ベストプラクティス

1. サンプリング戦略

トラフィック量別の推奨サンプリングレート

トラフィック量 推奨サンプリングレート 理由
<1M req/day 100% (1.0) 全トレース収集可能
1M-10M req/day 10-50% (0.1-0.5) バランス型
10M-100M req/day 1-10% (0.01-0.1) コスト効率重視
>100M req/day 0.1-1% (0.001-0.01) 高効率サンプリング

アダプティブサンプリング設定

com.instana.tracing:
  sampling:
    # ベースレート
    rate: 0.01  # 1%
    adaptive: true

    # 常に収集
    always-sample-errors: true
    always-sample-slow-traces: true
    slow-threshold-ms: 1000

    # エンドポイント別
    endpoint-rules:
      # 重要なエンドポイント
      - path: "/api/payment/*"
        rate: 1.0  # 100%
      - path: "/api/checkout/*"
        rate: 0.5  # 50%

      # 通常のエンドポイント
      - path: "/api/*"
        rate: 0.01  # 1%

      # ヘルスチェック
      - path: "/health"
        rate: 0  # 収集しない

2. パフォーマンス最適化

トレーシングオーバーヘッドの最小化

com.instana.tracing:
  # スパン制限
  spans:
    max-per-trace: 1000
    max-queue-size: 10000

    # バッチ処理
    batch-size: 100
    flush-interval-ms: 1000

  # スタックトレース制限
  stacktrace:
    max-depth: 30
    exclude-packages:
      - "java.*"
      - "javax.*"
      - "sun.*"
      - "org.springframework.*"

言語別のオーバーヘッド

言語 典型的なオーバーヘッド 最適化のヒント
Java 1-3% JITコンパイル後は低い
Node.js 2-5% 非同期処理の影響
Python 3-7% インタープリタの影響
Go 1-2% コンパイル言語で低い
PHP 2-4% 拡張機能の影響
.NET 1-3% JITコンパイル後は低い

3. セキュリティ

機密情報のサニタイズ

com.instana.tracing:
  # HTTPヘッダーフィルタリング
  extra-http-headers:
    - 'x-request-id'
    - 'x-correlation-id'
    # 機密情報は含めない
    # - 'authorization'  # ❌
    # - 'x-api-key'      # ❌

  # SQLサニタイズ
  sql:
    sanitize: true
    sanitize-patterns:
      - "password"
      - "secret"
      - "token"
      - "api_key"

  # URLパラメータサニタイズ
  url:
    sanitize-query-params:
      - "password"
      - "token"
      - "api_key"
      - "credit_card"

データマスキング

com.instana.plugin.javatrace:
  # カスタムマスキング
  masking:
    enabled: true
    patterns:
      - field: "creditCard"
        pattern: "\\d{4}-\\d{4}-\\d{4}-\\d{4}"
        replacement: "****-****-****-****"

      - field: "email"
        pattern: "([^@]+)@(.+)"
        replacement: "***@$2"

      - field: "phone"
        pattern: "\\d{3}-\\d{4}-\\d{4}"
        replacement: "***-****-****"

4. トラブルシューティング

デバッグモード

com.instana.tracing:
  # デバッグログ
  debug:
    enabled: true
    log-level: "DEBUG"
    log-spans: true
    log-sampling-decisions: true

  # メトリクス
  metrics:
    enabled: true
    export-interval: 60  # 秒

トレース検証

1
2
3
4
5
6
7
8
# トレースIDの確認
curl -H "x-instana-t: <trace-id>" http://localhost:8080/api/test

# スパン情報の確認
curl http://localhost:42699/com.instana.plugin.javatrace/spans

# サンプリング統計
curl http://localhost:42699/com.instana.tracing/sampling-stats

5. 高可用性

フェイルセーフ設定

com.instana.tracing:
  # エージェント接続
  agent:
    host: "localhost"
    port: 42699

    # リトライ設定
    retry:
      max-attempts: 3
      backoff-ms: 1000

    # タイムアウト
    timeout-ms: 5000

  # フォールバック
  fallback:
    # エージェント接続失敗時
    on-agent-failure: "drop"  # または "queue"

    # キュー設定
    queue:
      max-size: 10000
      overflow-strategy: "drop-oldest"

トラブルシューティング

問題1: トレースが表示されない

症状: - アプリケーションは動作しているがトレースが表示されない - スパンが生成されていない

原因: - トレーシングが無効化されている - サンプリングレートが低すぎる - エージェントに接続できていない

解決方法:

# 1. トレーシング設定を確認
cat /opt/instana/agent/etc/instana/configuration.yaml | grep -A 10 tracing

# 2. エージェントログを確認
tail -f /opt/instana/agent/data/log/agent.log | grep -i trace

# 3. サンプリングレートを一時的に100%に
cat > /opt/instana/agent/etc/instana/configuration.yaml <<EOF
com.instana.tracing:
  enabled: true
  sampling:
    rate: 1.0  # 100%
EOF

# 4. エージェントを再起動
systemctl restart instana-agent

# 5. テストリクエストを送信
curl http://localhost:8080/api/test

# 6. スパンを確認
curl http://localhost:42699/com.instana.plugin.javatrace/spans

問題2: トレースが不完全

症状: - トレースの一部のスパンが欠落している - サービス間の接続が表示されない

原因: - トレースコンテキストが伝播していない - 一部のサービスでトレーシングが無効 - スパン数の制限に達している

解決方法:

# 1. トレースコンテキスト伝播を確認
com.instana.tracing:
  extra-http-headers:
    - 'x-instana-t'  # トレースID
    - 'x-instana-s'  # スパンID
    - 'x-instana-l'  # レベル

# 2. スパン制限を増やす
com.instana.tracing:
  spans:
    max-per-trace: 5000  # デフォルト1000から増やす

# 3. 全サービスでトレーシングを有効化
com.instana.plugin.javatrace:
  instrumentation:
    enabled: true

# 4. デバッグログを有効化
com.instana.tracing:
  debug:
    enabled: true
    log-spans: true

問題3: パフォーマンスへの影響が大きい

症状: - アプリケーションのレスポンスタイムが増加 - CPU使用率が上昇

原因: - サンプリングレートが高すぎる - スタックトレースが深すぎる - 大量のスパンを生成している

解決方法:

# 1. サンプリングレートを下げる
com.instana.tracing:
  sampling:
    rate: 0.1  # 10%に削減

# 2. スタックトレース深度を制限
com.instana.plugin.javatrace:
  stacktrace:
    max-depth: 20  # デフォルト50から削減

# 3. スパン数を制限
com.instana.tracing:
  spans:
    max-per-trace: 500  # 削減

# 4. 不要なフレームワークを無効化
com.instana.plugin.javatrace:
  instrumentation:
    frameworks:
      - "spring-boot"
      - "jdbc"
      # 不要なものはコメントアウト
      # - "jms"
      # - "kafka"

問題4: Java Profilingが動作しない

症状:

ERROR: Java profiling failed to start
Profiler initialization error

原因: - JVMバージョンが非対応 - 権限が不足 - 他のプロファイラーと競合

解決方法:

# 1. JVMバージョンを確認
java -version

# 2. JVMオプションを確認
ps aux | grep java | grep -o '\-XX:[^ ]*'

# 3. 競合するプロファイラーを無効化
# -agentpath や -agentlib オプションを削除

# 4. Instana設定
cat > /opt/instana/agent/etc/instana/configuration.yaml <<EOF
com.instana.plugin.profiling.java:
  enabled: true
  sampling-interval: 10
  max-stack-depth: 128
EOF

# 5. エージェントを再起動
systemctl restart instana-agent

# 6. ログを確認
tail -f /opt/instana/agent/data/log/agent.log | grep -i profil

問題5: Node.js非同期トレーシングの問題

症状: - 非同期処理のトレースが途切れる - Promise/async-awaitのトレースが不完全

原因: - 非同期コンテキストが失われている - トレース深度の制限

解決方法:

# Node.js設定

```javascript
// Instana SDKを使用
const instana = require('@instana/collector');

async function processOrder(orderId) {
  // 明示的にスパンを作成
  return instana.sdk.async.startSpan('process-order', async () => {
    const order = await fetchOrder(orderId);
    const payment = await processPayment(order);
    const shipment = await createShipment(order);
    return { order, payment, shipment };
  });
}

FAQ

Q1: 全リクエストをトレースすべきですか?

A: いいえ、トラフィック量に応じてサンプリングすべきです。

トラフィック 推奨サンプリング
低(<1M/day) 100%
中(1M-10M/day) 10-50%
高(>10M/day) 1-10%

ただし、エラーと遅いトレースは常に収集することを推奨します。

Q2: トレーシングのオーバーヘッドはどれくらいですか?

A: 一般的に1-5%のパフォーマンスオーバーヘッドです。

# 最小オーバーヘッド設定
com.instana.tracing:
  sampling:
    rate: 0.01  # 1%

  spans:
    max-per-trace: 500

  stacktrace:
    max-depth: 20

Q3: マイクロサービス間のトレース相関はどう設定しますか?

A: HTTPヘッダーでトレースコンテキストを伝播します。

1
2
3
4
5
6
com.instana.tracing:
  extra-http-headers:
    - 'x-instana-t'  # トレースID
    - 'x-instana-s'  # スパンID
    - 'x-instana-l'  # レベル
    - 'x-request-id'  # カスタム相関ID

Q4: SQLクエリの機密情報をマスクできますか?

A: はい、SQLサニタイズ機能を使用します。

1
2
3
4
5
6
7
com.instana.tracing:
  sql:
    sanitize: true
    sanitize-patterns:
      - "password"
      - "secret"
      - "token"

Q5: Lambda関数のコールドスタートを追跡できますか?

A: はい、Lambda専用の設定があります。

1
2
3
4
5
com.instana.plugin.aws.lambda:
  tracing:
    enabled: true
    track-cold-starts: true
    track-initialization-time: true

Q6: 複数の言語が混在する環境でトレーシングできますか?

A: はい、各言語のトレーシングを有効化します。

# Java
com.instana.plugin.javatrace:
  instrumentation:
    enabled: true

# Node.js

# Python

# トレースコンテキスト伝播
com.instana.tracing:
  extra-http-headers:
    - 'x-instana-t'
    - 'x-instana-s'

Q7: プロファイリングは本番環境で使用できますか?

A: はい、ただし慎重に使用してください。

# 本番環境での推奨設定
com.instana.plugin.profiling.java:
  enabled: true

  # 低オーバーヘッド設定
  sampling-interval: 100  # 100ms(デフォルト10msより長い)
  max-stack-depth: 64  # 制限

  # 特定のパッケージのみ
  include-packages:
    - "com.example.critical.*"

参考リンク

公式ドキュメント