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: README.md
+2
Original file line number
Diff line number
Diff line change
@@ -298,6 +298,8 @@ class YourClass {
298
298
299
299
## Exemplars
300
300
301
+
TODO: Document that Exemplars are supported with OpenTelemetry 0.16.0 or higher. When `client_java` 0.11.0 was released the current OpenTelemetry version was 1.1.0.
302
+
301
303
Exemplars are a feature of the [OpenMetrics](http://openmetrics.io) format that allows applications to link metrics
302
304
to example traces. Starting with version 0.11.0, `client_java` automatically adds Exemplars for applications that
303
305
are instrumented with [OpenTelemetry](https://opentelemetry.io/) distributed tracing. No code change is required.
Copy file name to clipboardExpand all lines: tracer_parent/tracer_otel/src/main/java/io/prometheus/client/exemplars/tracer/otel/OpenTelemetrySpanContextSupplier.java
+5-1
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,11 @@ public static boolean isAvailable() {
13
13
test.getSpanId();
14
14
test.getSpanId();
15
15
returntrue;
16
-
} catch (NoClassDefFoundErrore) {
16
+
} catch (LinkageErrorignored) {
17
+
// NoClassDefFoundError:
18
+
// Either OpenTelemetry is not present, or it is version 0.9.1 or older when io.opentelemetry.api.trace.Span did not exist.
19
+
// IncompatibleClassChangeError:
20
+
// The application uses an OpenTelemetry version between 0.10.0 and 0.15.0 when SpanContext was a class, and not an interface.
Copy file name to clipboardExpand all lines: tracer_parent/tracer_otel_agent/src/main/java/io/prometheus/client/exemplars/tracer/otel_agent/OpenTelemetryAgentSpanContextSupplier.java
+5-1
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,11 @@ public static boolean isAvailable() {
18
18
test.getSpanId();
19
19
test.getSpanId();
20
20
returntrue;
21
-
} catch (NoClassDefFoundErrore) {
21
+
} catch (LinkageErrorignored) {
22
+
// NoClassDefFoundError:
23
+
// Either OpenTelemetry is not present, or it is version 0.9.1 or older when io.opentelemetry.api.trace.Span did not exist.
24
+
// IncompatibleClassChangeError:
25
+
// The application uses an OpenTelemetry version between 0.10.0 and 0.15.0 when SpanContext was a class, and not an interface.
0 commit comments