自動コンフィギュレーション

JVM メトリクス収集は、初期設定で Java トレーサー v0.29.0+ に有効になっています。トレースクライアントの設定パラメーターで、システムプロパティ -Ddd.jmxfetch.enabled=false または環境変数 DD_JMXFETCH_ENABLED=false を使用して無効にすることも可能です。v0.64.0+ では、DD_RUNTIME_METRICS_ENABLED=false 環境変数を使用して無効にすることもできます。

JVM メトリクスは、Java サービスと相関して表示できます。Datadog のサービスカタログを参照してください。

JVM ランタイム

初期設定では、アプリケーションからのランタイムメトリクスは、ポート 8125 を介して DogStatsD と共に Datadog Agent に送信されます。DogStatsD が Agent に対して有効になっていることを確認してください。

Agent をコンテナとして実行している場合は、DD_DOGSTATSD_NON_LOCAL_TRAFFIC true に設定されていることと、Agent コンテナでポート 8125 が開いていることを確認してください。また、

Alternatively, the Agent can ingest metrics with a Unix Domain Socket (UDS) as an alternative to UDP transport. For more information, read DogStatsD over Unix Domain Socket.

:

  • ランタイム UI では、dd-trace-java >= 0.24.0 がサポートされています。
  • フレームグラフ内で JVM メトリクスを関連付けるには、環境全体で env: tag(大文字と小文字を区別)が設定され、一致していることを確認してください。
  • Fargate 使用時に、JVM メトリクスがサービス詳細画面に表示されるようにするには、Agent タスクに DD_DOGSTATSD_TAGS が設定されていて、そのサービスの env: tag が一致することを確認します。

収集データ

以下のメトリクスは JVM メトリクスを有効にした後、デフォルトで JVM プロセスごとに収集されます。

jvm.heap_memory
(gauge)
The total Java heap memory used.
Shown as byte
jvm.heap_memory_committed
(gauge)
The total Java heap memory committed to be used.
Shown as byte
jvm.heap_memory_init
(gauge)
The initial Java heap memory allocated.
Shown as byte
jvm.heap_memory_max
(gauge)
The maximum Java heap memory available.
Shown as byte
jvm.non_heap_memory
(gauge)
The total Java non-heap memory used. Non-heap memory is calculated as follows: Metaspace + CompressedClassSpace + CodeCache
Shown as byte
jvm.non_heap_memory_committed
(gauge)
The total Java non-heap memory committed to be used.
Shown as byte
jvm.non_heap_memory_init
(gauge)
The initial Java non-heap memory allocated.
Shown as byte
jvm.non_heap_memory_max
(gauge)
The maximum Java non-heap memory available.
Shown as byte
jvm.thread_count
(count)
The number of live threads.
Shown as thread
jvm.gc.cms.count
(count)
The total number of garbage collections that have occurred.
jvm.gc.major_collection_count
(gauge)
The rate of major garbage collections. Set new_gc_metrics: true to receive this metric.
jvm.gc.minor_collection_count
(gauge)
The rate of minor garbage collections. Set new_gc_metrics: true to receive this metric.
jvm.gc.parnew.time
(gauge)
The approximate accumulated garbage collection time elapsed.
Shown as millisecond
jvm.gc.major_collection_time
(gauge)
The fraction of time spent in major garbage collection. Set new_gc_metrics: true to receive this metric.
Shown as permille
jvm.gc.minor_collection_time
(gauge)
The fraction of time spent in minor garbage collection. Set new_gc_metrics: true to receive this metric.
Shown as permille

APM サービス詳細画面にこれらのメトリクスを表示するだけでなく、Datadog はデフォルトの JVM ランタイムダッシュボードを提供します。

Additional JMX metrics can be added using configuration files that are passed on using dd.jmxfetch.config.dir and dd.jmxfetch.config. You can also enable existing Datadog JMX integrations individually with the dd.jmxfetch.<INTEGRATION_NAME>.enabled=true parameter. This auto-embeds configuration from Datadog’s existing JMX configuration files. See the JMX Integration for further details on configuration.

その他の参考資料

PREVIEWING: evan.li/clarify-agentless