Skip to content
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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

v-zhuravlev
Copy link
Contributor

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

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
@v-zhuravlev v-zhuravlev requested a review from a team as a code owner October 31, 2024 10:30
Copy link
Member

@Dasomeone Dasomeone left a 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
Copy link
Member

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,
Copy link
Member

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',
Copy link
Member

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants