OpenTelemetry mode
OpenTelemetry mode periodically collects metrics and pushes them to an OpenTelemetry endpoint.
-jar jmx_prometheus_standalone-<VERSION>.jar exporter.yaml
java -javaagent:jmx_prometheus_javaagent-1.1.0.jar exporter.yaml
Notes
- No
<HOSTNAME>
or<PORT>
is used
exporter.yaml
openTelemetry:
endpoint: http://prometheus:9090/api/v1/otlp
protocol: http/protobuf
interval: 60
rules:
- pattern: ".*"
OpenTelemetry mode also supports the use of OTEL
environment variables.
exporter.yaml
openTelemetry:
# endpoint defined via environment variable "OTEL_EXPORTER_OTLP_ENDPOINT"
# protocol defined via environment variable "OTEL_EXPORTER_OTLP_PROTOCOL"
# interval defined via environment variable "OTEL_METRIC_EXPORT_INTERVAL"
rules:
- pattern: ".*"
Run your application. Run the Standalone JMX Exporter application.
Access OpenTelemetry metrics using your OpenTelemetry platform.
Integration tests provide complex/concrete examples of application and YAML configuration files.