I tried using the contrib, still confused whether I need this or not the Missing JVM Github issue above seems to lead me to think not.. but without contrib I get nothing.
Note this is on Elastic Stack 8.5.0
Now App Startup
export OTEL_RESOURCE_ATTRIBUTES=service.name=cardatabase-local-otel,service.version=1.1,deployment.environment=production
export OTEL_EXPORTER_OTLP_ENDPOINT=https://test.apm.us-west2.gcp.elastic-cloud.com
export OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer fb6mQwEYrKe3KC4tiO"
export OTEL_METRICS_EXPORTER="otlp"
export OTEL_LOGS_EXPORTER="otlp"
java -javaagent:./opentelemetry-javaagent.jar \
-Dcom.sun.management.jmxremote \
-Dcom.sun.management.jmxremote.port=9010 \
-Dcom.sun.management.jmxremote.local.only=false \
-Dcom.sun.management.jmxremote.authenticate=false \
-Dcom.sun.management.jmxremote.ssl=false \
-Djava.rmi.server.hostname=localhost \
-jar target/cardatabase-0.0.1-SNAPSHOT.jar
With contrib...
session.properties
otel.jmx.service.url = service:jmx:rmi:///jndi/rmi://localhost:9010/jmxrmi
otel.jmx.target.system = jvm
otel.jmx.interval.milliseconds = 5000
otel.metrics.exporter = otlp
otel.exporter.otlp.endpoint = https://sdgfsddsfg.apm.us-west2.gcp.elastic-cloud.com
otel.exporter.otlp.headers = "Authorization=Bearer sfgsdfgsdfg"
Run it .. get a few errors... then looks like it is shipping
java -jar opentelemetry-jmx-metrics.jar -config ./session.properties
Nov 06, 2022 11:54:35 AM io.opentelemetry.contrib.jmxmetrics.JmxMetrics start
INFO: Started GroovyRunner.
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by io.opentelemetry.contrib.jmxmetrics.JmxClient (file:/Users/sbrown/workspace/repos/bvader/tmp/cardatabase/opentelemetry-jmx-metrics.jar) to constructor com.sun.security.sasl.Provider()
WARNING: Please consider reporting this to the maintainers of io.opentelemetry.contrib.jmxmetrics.JmxClient
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Nov 06, 2022 11:54:44 AM io.opentelemetry.sdk.internal.ThrottlingLogger doLog
WARNING: Instrument jvm.classes.loaded has recorded multiple values for the same attributes.
Nov 06, 2022 11:54:44 AM io.opentelemetry.sdk.internal.ThrottlingLogger doLog
WARNING: Instrument jvm.gc.collections.count has recorded multiple values for the same attributes.
Nov 06, 2022 11:54:44 AM io.opentelemetry.sdk.internal.ThrottlingLogger doLog
WARNING: Instrument jvm.gc.collections.count has recorded multiple values for the same attributes.
Nov 06, 2022 11:54:44 AM io.opentelemetry.sdk.internal.ThrottlingLogger doLog
WARNING: Instrument jvm.gc.collections.elapsed has recorded multiple values for the same attributes.
Nov 06, 2022 11:54:44 AM io.opentelemetry.sdk.internal.ThrottlingLogger doLog
WARNING: Instrument jvm.gc.collections.elapsed has recorded multiple values for the same attributes.
Nov 06, 2022 11:54:44 AM io.opentelemetry.sdk.internal.ThrottlingLogger doLog
WARNING: Instrument jvm.memory.heap.committed has recorded multiple values for the same attributes.
Nov 06, 2022 11:54:44 AM io.opentelemetry.sdk.internal.ThrottlingLogger doLog
WARNING: Instrument jvm.memory.heap.init has recorded multiple values for the same attributes.
Nov 06, 2022 11:54:44 AM io.opentelemetry.sdk.internal.ThrottlingLogger doLog
WARNING: Instrument jvm.memory.heap.max has recorded multiple values for the same attributes.
Nov 06, 2022 11:54:44 AM io.opentelemetry.sdk.internal.ThrottlingLogger doLog
WARNING: Instrument jvm.memory.heap.used has recorded multiple values for the same attributes.
Nov 06, 2022 11:54:44 AM io.opentelemetry.sdk.internal.ThrottlingLogger doLog
WARNING: Instrument jvm.memory.nonheap.committed has recorded multiple values for the same attributes.
Nov 06, 2022 11:54:44 AM io.opentelemetry.sdk.internal.ThrottlingLogger doLog
WARNING: Instrument jvm.memory.nonheap.init has recorded multiple values for the same attributes.
Nov 06, 2022 11:54:44 AM io.opentelemetry.sdk.internal.ThrottlingLogger doLog
WARNING: Instrument jvm.memory.nonheap.max has recorded multiple values for the same attributes.
Nov 06, 2022 11:54:44 AM io.opentelemetry.sdk.internal.ThrottlingLogger doLog
WARNING: Instrument jvm.memory.nonheap.used has recorded multiple values for the same attributes.
Nov 06, 2022 11:54:44 AM io.opentelemetry.sdk.internal.ThrottlingLogger doLog
WARNING: Instrument jvm.memory.pool.committed has recorded multiple values for the same attributes.
Nov 06, 2022 11:54:44 AM io.opentelemetry.sdk.internal.ThrottlingLogger doLog
WARNING: Instrument jvm.memory.pool.committed has recorded multiple values for the same attributes.
Nov 06, 2022 11:54:44 AM io.opentelemetry.sdk.internal.ThrottlingLogger doLog
WARNING: Instrument jvm.memory.pool.committed has recorded multiple values for the same attributes.
Nov 06, 2022 11:54:44 AM io.opentelemetry.sdk.internal.ThrottlingLogger doLog
WARNING: Instrument jvm.memory.pool.committed has recorded multiple values for the same attributes.
Nov 06, 2022 11:54:44 AM io.opentelemetry.sdk.internal.ThrottlingLogger doLog
WARNING: Instrument jvm.memory.pool.committed has recorded multiple values for the same attributes.
Nov 06, 2022 11:54:44 AM io.opentelemetry.sdk.internal.ThrottlingLogger log
WARNING: Too many log messages detected. Will only log once per minute from now on.
Nov 06, 2022 11:54:44 AM io.opentelemetry.sdk.internal.ThrottlingLogger doLog
WARNING: Instrument jvm.memory.pool.committed has recorded multiple values for the same attributes.
Nov 06, 2022 11:54:44 AM io.opentelemetry.sdk.internal.ThrottlingLogger doLog
WARNING: Instrument jvm.memory.pool.init has recorded multiple values for the same attributes.
Nov 06, 2022 11:54:44 AM io.opentelemetry.sdk.internal.ThrottlingLogger doLog
WARNING: Instrument jvm.memory.pool.init has recorded multiple values for the same attributes.
Nov 06, 2022 11:54:44 AM io.opentelemetry.sdk.internal.ThrottlingLogger doLog
WARNING: Instrument jvm.memory.pool.init has recorded multiple values for the same attributes.
Nov 06, 2022 11:54:44 AM io.opentelemetry.sdk.internal.ThrottlingLogger doLog
WARNING: Instrument jvm.memory.pool.init has recorded multiple values for the same attributes.
Nov 06, 2022 11:54:44 AM io.opentelemetry.sdk.internal.ThrottlingLogger doLog
WARNING: Instrument jvm.memory.pool.init has recorded multiple values for the same attributes.
Nov 06, 2022 11:54:44 AM io.opentelemetry.sdk.internal.ThrottlingLogger log
WARNING: Too many log messages detected. Will only log once per minute from now on.
Nov 06, 2022 11:54:44 AM io.opentelemetry.sdk.internal.ThrottlingLogger doLog
WARNING: Instrument jvm.memory.pool.init has recorded multiple values for the same attributes.
Nov 06, 2022 11:54:44 AM io.opentelemetry.sdk.internal.ThrottlingLogger doLog
WARNING: Instrument jvm.memory.pool.max has recorded multiple values for the same attributes.
Nov 06, 2022 11:54:44 AM io.opentelemetry.sdk.internal.ThrottlingLogger doLog
WARNING: Instrument jvm.memory.pool.max has recorded multiple values for the same attributes.
Nov 06, 2022 11:54:44 AM io.opentelemetry.sdk.internal.ThrottlingLogger doLog
WARNING: Instrument jvm.memory.pool.max has recorded multiple values for the same attributes.
Nov 06, 2022 11:54:44 AM io.opentelemetry.sdk.internal.ThrottlingLogger doLog
WARNING: Instrument jvm.memory.pool.max has recorded multiple values for the same attributes.
Nov 06, 2022 11:54:44 AM io.opentelemetry.sdk.internal.ThrottlingLogger doLog
WARNING: Instrument jvm.memory.pool.max has recorded multiple values for the same attributes.
Nov 06, 2022 11:54:44 AM io.opentelemetry.sdk.internal.ThrottlingLogger log
WARNING: Too many log messages detected. Will only log once per minute from now on.
Nov 06, 2022 11:54:44 AM io.opentelemetry.sdk.internal.ThrottlingLogger doLog
WARNING: Instrument jvm.memory.pool.max has recorded multiple values for the same attributes.
Nov 06, 2022 11:54:44 AM io.opentelemetry.sdk.internal.ThrottlingLogger doLog
WARNING: Instrument jvm.memory.pool.used has recorded multiple values for the same attributes.
Nov 06, 2022 11:54:44 AM io.opentelemetry.sdk.internal.ThrottlingLogger doLog
WARNING: Instrument jvm.memory.pool.used has recorded multiple values for the same attributes.
Nov 06, 2022 11:54:44 AM io.opentelemetry.sdk.internal.ThrottlingLogger doLog
WARNING: Instrument jvm.memory.pool.used has recorded multiple values for the same attributes.
Nov 06, 2022 11:54:44 AM io.opentelemetry.sdk.internal.ThrottlingLogger doLog
WARNING: Instrument jvm.memory.pool.used has recorded multiple values for the same attributes.
Nov 06, 2022 11:54:44 AM io.opentelemetry.sdk.internal.ThrottlingLogger doLog
WARNING: Instrument jvm.memory.pool.used has recorded multiple values for the same attributes.
Nov 06, 2022 11:54:44 AM io.opentelemetry.sdk.internal.ThrottlingLogger log
WARNING: Too many log messages detected. Will only log once per minute from now on.
Nov 06, 2022 11:54:44 AM io.opentelemetry.sdk.internal.ThrottlingLogger doLog
WARNING: Instrument jvm.memory.pool.used has recorded multiple values for the same attributes.
Nov 06, 2022 11:54:44 AM io.opentelemetry.sdk.internal.ThrottlingLogger doLog
WARNING: Instrument jvm.threads.count has recorded multiple values for the same attributes.
But then in the Kibana UI
But it is shipping something