This documentation has an index for AI agents at /llms.txt. A Markdown version of this page is available at https://explorer.opentelemetry.io/java-agent/instrumentation/jmx-metrics.md.

JMX Metrics

OpenTelemetry Java agent instrumentation

Collects and reports metrics exposed through Java Management Extensions (JMX). It can be configured to extract JVM and application-level telemetry data from JMX MBeans such as memory usage, thread counts, and garbage collection statistics, and translate these measurements into OpenTelemetry metrics. Collected metrics can be filtered by name using include and exclude patterns.

  • Name: jmx-metrics
  • Scope: io.opentelemetry.jmx-metrics

Configuration

OptionTypeDefaultDescription
otel.jmx.configlistList of paths to JMX metric definition YAML files.
otel.jmx.discovery.delayint60000Time in milliseconds between JMX MBean detection attempts.
otel.jmx.enabledbooleantrueEnables collection of JMX metrics.
otel.jmx.metrics.excludedlistComma-separated list of case-sensitive glob patterns for metric names not to collect. "*" matches any number of characters and "?" matches one character. Excluded patterns take precedence over included patterns. When no included patterns are configured, all metrics that are not excluded are collected. With neither selector property configured, all metrics are collected.
otel.jmx.metrics.experimental.includedlistComma-separated list of case-sensitive glob patterns for unstable (experimental) bundled metric names to opt in to. "*" matches any number of characters and "?" matches one character. Normal metric include and exclude filters also apply. Custom metric definitions do not require experimental opt-in.
otel.jmx.metrics.includedlistComma-separated list of case-sensitive glob patterns for metric names to collect. "*" matches any number of characters and "?" matches one character. Excluded patterns take precedence over included patterns. When no included patterns are configured, all metrics that are not excluded are collected. With neither selector property configured, all metrics are collected.
otel.jmx.target.systemlistDeprecated list of predefined JMX target systems to collect metrics for, including their unstable metrics. Used when otel.jmx.metrics.experimental.included is empty. A nonempty experimental inclusion takes precedence. Remove this setting to use automatic stable metric collection and select unstable metrics by name. This setting will be removed in 3.0.

Data

  • JSON (latest): /data/javaagent/instrumentations/jmx-metrics/latest.json
  • JSON (pinned): /data/javaagent/instrumentations/jmx-metrics/jmx-metrics-fe01996f127a.json
  • Explore: /java-agent/instrumentation/jmx-metrics