-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jvm-observ-lib: Add java_micrometer_with_suffixes option #1351
base: master
Are you sure you want to change the base?
Conversation
There is yet another metric pattern combinatino. When micrometer metrics are received through OTEL bridge then prometheus suffixes might not be added. Adding this option to jvm/process lib
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple comments, but overall looks very good! If the suggested changes aren't possible, I'm happy enough to approve it, just let me know
@@ -7,7 +7,8 @@ Supports the following sources: | |||
- `prometheus` (https://prometheus.github.io/client_java/instrumentation/jvm/#jvm-memory-metrics). This also works for jmx_exporter (javaagent mode) starting from 1.0.1 release. | |||
- `otel` (https://github.com/open-telemetry/opentelemetry-java-contrib/blob/main/jmx-metrics/docs/target-systems/jvm.md) | |||
- `otel_with_suffixes` same as otel with add_metric_suffixes=true in otelcollector | |||
- `java_micrometer` (springboot) (https://github.com/micrometer-metrics/micrometer/blob/main/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/jvm/JvmMemoryMetrics.java) | |||
- `java_micrometer` (springboot) (https://github.com/micrometer-metrics/micrometer/blob/main/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/jvm/JvmMemoryMetrics.java). Can be seen when Micrometer to OTEL bridge is used. | |||
- `java_micrometer_with_suffixes` (springboot) same, but with prometheus suffixes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From a readability perspective, could you rename this to java_micrometer_bridge_prom
and java_micrometer_bridge_otel
or similar? I think it'd be a fair bit cleaner
@@ -45,7 +46,7 @@ local jvm = | |||
uid: 'jvm-sample', | |||
dashboardNamePrefix: 'JVM', | |||
dashboardTags: ['java', 'jvm'], | |||
metricsSource: 'java_micrometer', // or java_otel, prometheus, | |||
metricsSource: 'java_micrometer_with_suffixes', // or java_otel, prometheus, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above comment, where at first read it can be confusing what exactly the source is here. Additionally would be good to mention the otel bridge option
@@ -15,7 +15,7 @@ local processlib = import 'process-observ-lib/main.libsonnet'; | |||
filteringSelector: this.config.filteringSelector, | |||
groupLabels: this.config.groupLabels, | |||
instanceLabels: this.config.instanceLabels, | |||
uid: this.config.uid, | |||
uid: this.config.uid - '-jvm', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't this be a breaking change for any customer bookmarks etc?
There is yet another metric pattern combination. When micrometer metrics are received through OTEL bridge then prometheus suffixes might not be added. Adding this option to jvm/process lib