Grafana OpenTelemetry distribution for Java configuration
The open source Grafana OpenTelemetry distribution for Java is fully compatible with upstream OpenTelemetry instrumentation for Java.
Configuration
Grafana OpenTelemetry distribution for Java is configurable with all the system properties or environment variables from the upstream OpenTelemetry SDK auto-configuration.
The distribution sets all exporters to otlp
by default, including the logs exporter.
Metrics used
Application Observability needs and uses the following metrics send by the distribution:
Metric | Usage |
---|---|
process.runtime.jvm.system.cpu.utilization | CPU utilization on the JVM Runtime page |
process.runtime.jvm.memory.usage | Memory usage on the JVM Runtime page |
process.runtime.jvm.memory.limit | Memory limit on the JVM Runtime page |
process.runtime.jvm.gc.duration | Garbage collection duration on the JVM Runtime page |
process.runtime.jvm.classes.current_loaded | Current load on the JVM Runtime page |
process.runtime.jvm.threads.count | Thread count on the JVM Runtime page |
db.client.connections.usage | JDBC dashboard |
db.client.connections.max | JDBC dashboard |
db.client.connections.pending_requests | JDBC dashboard |
r2dbc.pool.acquired | Reactive Database example |
r2dbc.pool.max.allocated | Reactive Database example |
r2dbc.pool.pending | Reactive Database example |
kafka.producer.record_error_total | Kafka example |
mongodb.driver.pool.waitqueuesize | MongoDB example |
mongodb.driver.pool.checkedout | MongoDB example |
Data saver
Application Observability uses a specific selection of metrics and ingesting all OpenTelemetry metrics can increase cost.
If you want the distribution to only send metrics that Application Observability uses and reduce Metrics costs in Grafana Cloud, set the following environment variable:
export GRAFANA_OTEL_APPLICATION_OBSERVABILITY_METRICS=true
Note
If you have enabled data saver and want to send manually created metrics, set the metric name toapplication
.