You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/main/asciidoc/telemetry-micrometer-to-opentelemetry.adoc
+109-1Lines changed: 109 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,12 +20,14 @@ This extension provides support for both `Micrometer` and `OpenTelemetry` in Qua
20
20
- The xref:opentelemetry.adoc[OpenTelemetry Guide] provides information about the OpenTelemetry extension.
21
21
====
22
22
23
-
The bridge is much more than the simple OTLP registry found in Quarkiverse. In this extension, the OpenTelemetry SDK provides a Micrometer registry implementation.
23
+
The bridge is more than the simple OTLP registry found in Quarkiverse. In this extension, the OpenTelemetry SDK provides a Micrometer registry implementation.
24
24
25
25
This allows the normal use of the Micrometer API, but have the metrics handled by the OpenTelemetry extension. All the configurations of the OpenTelemetry extension are available for this bridge.
26
26
27
27
The bridge enables to forward to OpenTelemetry all the automatic instrumentation metrics generated by Micrometer in Quarkus, as well as custom user metrics.
28
28
29
+
The bridge is based on the https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/instrumentation/micrometer/micrometer-1.5/library[`micrometer/micrometer-1.5`] OpenTelemetry instrumentation library.
30
+
29
31
== Usage
30
32
31
33
If you already have your Quarkus project configured, you can add the `quarkus-micrometer-opentelemetry` extension to your project by running the following command in your project base directory:
@@ -50,4 +52,110 @@ This will add the following to your build file:
== Metric differences between Micrometer and OpenTelemetry
56
+
57
+
=== API differences
58
+
The metrics produced with each framework follow different APIs and the mapping is not 1:1.
59
+
60
+
One fundamental API difference is that Micrometer uses a https://docs.micrometer.io/micrometer/reference/concepts/timers.html[Timer] and OpenTelemetry uses a https://opentelemetry.io/docs/specs/otel/metrics/data-model/#histogram[Histogram] to record latency (execution time) metrics and the frequency of the events.
61
+
62
+
When using the `Timed` with Micrometer, 2 different metrics are https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/324fdbdd452ddffaf2da2c5bf004d8bb3fdfa1dd/instrumentation/micrometer/micrometer-1.5/library/src/main/java/io/opentelemetry/instrumentation/micrometer/v1_5/OpenTelemetryTimer.java#L31[created on the OpenTelemetry side], one `Gauge` for the `max` value and one `Histogram`.
63
+
64
+
The `DistributionSummary` from Micrometer is transformed into a `histogram` represented by a `DoubleGauge' with data points matching the buckets, another `DoubleGauge` for the `max` value and finally an actually OpenTelemetry `Histogram`. There is data duplication that might be optimized in the future.
The following table shows some differences between the two frameworks. This list is not exhaustive and only shows some examples, for reference.
87
+
88
+
When `quarkus.micrometer.binder.jvm=true` is set, the JVM metrics are collected by Micrometer. Here we show a subset related with `Threads`.
89
+
90
+
91
+
|===
92
+
|Micrometer Meter |Quarkus Micrometer Prometheus output | This bridge OpenTelemetry output name | Related OpenTelemetry Semantic Convention (not applied)
Copy file name to clipboardExpand all lines: extensions/micrometer-opentelemetry/deployment/src/test/java/io/quarkus/micrometer/opentelemetry/deployment/DistributionSummaryTest.java
0 commit comments