Skip to content

Commit bb0b4c4

Browse files
authored
Provide equivalent of OTel's Jaeger exporter for Helidon compatibility (helidon-io#11112)
1 parent ef99421 commit bb0b4c4

45 files changed

Lines changed: 2996 additions & 94 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

all/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,6 +620,10 @@
620620
<groupId>io.helidon.tracing.providers</groupId>
621621
<artifactId>helidon-tracing-providers-jaeger</artifactId>
622622
</dependency>
623+
<dependency>
624+
<groupId>io.helidon.tracing</groupId>
625+
<artifactId>helidon-tracing-exporter-jaeger</artifactId>
626+
</dependency>
623627
<dependency>
624628
<groupId>io.helidon.tracing</groupId>
625629
<artifactId>helidon-tracing-tracer-resolver</artifactId>

bom/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -845,6 +845,11 @@
845845
<artifactId>helidon-tracing-providers-jaeger</artifactId>
846846
<version>${helidon.version}</version>
847847
</dependency>
848+
<dependency>
849+
<groupId>io.helidon.tracing</groupId>
850+
<artifactId>helidon-tracing-exporter-jaeger</artifactId>
851+
<version>${helidon.version}</version>
852+
</dependency>
848853
<dependency>
849854
<!-- to add TracerResolver support -->
850855
<groupId>io.helidon.tracing</groupId>

dependencies/pom.xml

Lines changed: 47 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
<version.lib.graphql-java.extended.scalars>22.0</version.lib.graphql-java.extended.scalars>
6363
<version.lib.gson>2.13.2</version.lib.gson>
6464
<version.lib.grpc>1.73.0</version.lib.grpc>
65+
<version.lib.google-findbugs-jsr305>3.0.2</version.lib.google-findbugs-jsr305>
6566
<version.lib.guava>33.3.1-jre</version.lib.guava>
6667
<version.lib.h2>2.4.240</version.lib.h2>
6768
<version.lib.hamcrest>1.3</version.lib.hamcrest>
@@ -254,6 +255,22 @@
254255
<artifactId>opentelemetry-semconv</artifactId>
255256
<version>${version.lib.opentelemetry.semconv}</version>
256257
</dependency>
258+
<!--
259+
By default, OpenTelemetry's OTLP exporter uses okhttp. To reduce 3rd-party dependencies and more easily
260+
manage dependency convergence use the OpenTelemetry JDK client support instead.
261+
-->
262+
<dependency>
263+
<groupId>io.opentelemetry</groupId>
264+
<artifactId>opentelemetry-exporter-otlp</artifactId>
265+
<version>${version.lib.opentelemetry}</version>
266+
<exclusions>
267+
<exclusion>
268+
<groupId>io.opentelemetry</groupId>
269+
<artifactId>opentelemetry-exporter-sender-okhttp</artifactId>
270+
</exclusion>
271+
</exclusions>
272+
</dependency>
273+
<!-- -->
257274
<dependency>
258275
<groupId>io.opentracing</groupId>
259276
<artifactId>opentracing-util</artifactId>
@@ -369,11 +386,11 @@
369386
<artifactId>jakarta.interceptor-api</artifactId>
370387
<version>${version.lib.jakarta.interceptor-api}</version>
371388
<exclusions>
372-
<!-- Exclude EJB. See https://github.com/eclipse-ee4j/interceptor-api/issues/31 -->
373-
<exclusion>
374-
<groupId>jakarta.ejb</groupId>
375-
<artifactId>jakarta.ejb-api</artifactId>
376-
</exclusion>
389+
<!-- Exclude EJB. See https://github.com/eclipse-ee4j/interceptor-api/issues/31 -->
390+
<exclusion>
391+
<groupId>jakarta.ejb</groupId>
392+
<artifactId>jakarta.ejb-api</artifactId>
393+
</exclusion>
377394
</exclusions>
378395
</dependency>
379396
<dependency>
@@ -1231,10 +1248,9 @@
12311248
<version>${version.lib.okio}</version>
12321249
</dependency>
12331250
<dependency>
1234-
<!-- For dependency convergence -->
1235-
<groupId>com.squareup.okio</groupId>
1236-
<artifactId>okio-jvm</artifactId>
1237-
<version>${version.lib.okio}</version>
1251+
<groupId>com.google.code.findbugs</groupId>
1252+
<artifactId>jsr305</artifactId>
1253+
<version>${version.lib.google-findbugs-jsr305}</version>
12381254
</dependency>
12391255
<!-- END OF Section 3: transitive dependencies we manage the version of for convergence/upgrade -->
12401256

@@ -1400,6 +1416,28 @@
14001416
<type>pom</type>
14011417
<scope>import</scope>
14021418
</dependency>
1419+
<dependency>
1420+
<groupId>io.grpc</groupId>
1421+
<artifactId>grpc-api</artifactId>
1422+
<version>${version.lib.grpc}</version>
1423+
<exclusions>
1424+
<exclusion>
1425+
<groupId>com.google.code.findbugs</groupId>
1426+
<artifactId>jsr305</artifactId>
1427+
</exclusion>
1428+
</exclusions>
1429+
</dependency>
1430+
<dependency>
1431+
<groupId>io.grpc</groupId>
1432+
<artifactId>grpc-protobuf</artifactId>
1433+
<version>${version.lib.grpc}</version>
1434+
<exclusions>
1435+
<exclusion>
1436+
<groupId>com.google.code.findbugs</groupId>
1437+
<artifactId>jsr305</artifactId>
1438+
</exclusion>
1439+
</exclusions>
1440+
</dependency>
14031441
<dependency>
14041442
<groupId>com.oracle.database.jdbc</groupId>
14051443
<artifactId>ojdbc-bom</artifactId>

docs/src/main/asciidoc/mp/telemetry.adoc

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
///////////////////////////////////////////////////////////////////////////////
22

3-
Copyright (c) 2023, 2025 Oracle and/or its affiliates.
3+
Copyright (c) 2023, 2026 Oracle and/or its affiliates.
44

55
Licensed under the Apache License, Version 2.0 (the "License");
66
you may not use this file except in compliance with the License.
@@ -49,7 +49,7 @@ include::{rootdir}/includes/dependencies.adoc[]
4949
----
5050
5151
[[otel-exporter-dependencies]]
52-
Also, add a dependency on an OpenTelemetry exporter.
52+
Microprofile Telemetry mandates that implementations such as Helidon use OpenTelemetry, so also add a dependency on an OpenTelemetry exporter.
5353
[source,xml]
5454
.Example dependency for the OpenTelemetry OTLP exporter
5555
----
@@ -58,23 +58,14 @@ Also, add a dependency on an OpenTelemetry exporter.
5858
<artifactId>opentelemetry-exporter-otlp</artifactId>
5959
</dependency>
6060
----
61-
[source,xml]
62-
.Example dependency for the OpenTelemetry Jaeger exporter
63-
----
64-
<dependency>
65-
<groupId>io.opentelemetry</groupId>
66-
<artifactId>opentelemetry-exporter-jaeger</artifactId>
67-
</dependency>
68-
----
69-
70-
Typical applications use a single exporter but you can add dependencies on multiple exporters and then use configuration to choose which to use in any given execution.
71-
See the <<Configuration,configuration>> section for more details.
7261
7362
== Usage
7463
7564
link:https://opentelemetry.io/[OpenTelemetry] comprises a collection of APIs, SDKs, integration tools, and other software components intended to facilitate the generation and control of telemetry data, including traces, metrics, and logs. In an environment where distributed tracing is enabled via OpenTelemetry (which combines OpenTracing and OpenCensus), this specification establishes the necessary behaviors for MicroProfile applications to participate seamlessly.
7665
77-
MicroProfile Telemetry {mp-telemetry-version} allows for the exportation of the data it collects to Jaeger or Zipkin and to other systems using a variety of exporters.
66+
MicroProfile Telemetry {mp-telemetry-version} allows for the export of the data it collects to other systems using a variety of exporters such as OTLP mentioned earlier. Typical applications use a single exporter but you can add dependencies on multiple exporters and then use configuration to choose which to use in any given execution.
67+
See the <<Configuration,configuration>> section for more details.
68+
7869
7970
// @Deprecated(forRemoval = true) In 5.x remove the following note.
8071
[NOTE]
@@ -264,7 +255,7 @@ Please consult with the links above for all configurations' properties usage.
264255
265256
For your application to report trace information be sure you add a dependency on an OpenTelemetry exporter as <<otel-exporter-dependencies,described earlier>> and, as needed, configure its use.
266257
By default OpenTelemetry attempts to use the OTLP exporter so you do not need to add configuration to specify that choice.
267-
To use a different exporter set `otel.traces.exporter` in your configuration to the appropriate value: `jaeger`, `zipkin`, `prometheus`, etc.
258+
To use a different exporter set `otel.traces.exporter` in your configuration to the appropriate value: `zipkin`, `prometheus`, etc.
268259
See the <<examples,examples>> section below.
269260
270261
=== OpenTelemetry Java Agent
@@ -278,13 +269,13 @@ This way, Helidon will explicitly get all the configuration and objects from the
278269
[[examples]]
279270
== Examples
280271
281-
This guide demonstrates how to incorporate MicroProfile Telemetry into Helidon and provides illustrations of how to view traces. Jaeger is employed in all the examples, and the Jaeger UI is used to view the traces.
272+
This guide demonstrates how to incorporate MicroProfile Telemetry into Helidon and provides illustrations of how to view traces. The Jaeger backend is employed in all the examples, and the Jaeger UI is used to view the traces.
282273
283-
=== Set Up Jaeger
274+
=== Set Up Jaeger Backend
284275
285-
For example, Jaeger will be used for gathering of the tracing information.
276+
For example, the Jaeger backend gathers the tracing information.
286277
287-
.Run Jaeger in a docker container.
278+
.Run the Jaeger backend in a docker container
288279
[source, bash]
289280
----
290281
docker run -d --name jaeger \

docs/src/main/asciidoc/se/guides/tracing.adoc

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
///////////////////////////////////////////////////////////////////////////////
22

3-
Copyright (c) 2019, 2024 Oracle and/or its affiliates.
3+
Copyright (c) 2019, 2026 Oracle and/or its affiliates.
44

55
Licensed under the Apache License, Version 2.0 (the "License");
66
you may not use this file except in compliance with the License.
@@ -58,7 +58,7 @@ Spans are automatically created by Helidon as needed during execution of the RES
5858
== Getting Started with Tracing
5959
6060
The examples in this guide demonstrate how to integrate tracing with Helidon, how to view traces, how to trace
61-
across multiple services, and how to integrate tracing with Kubernetes. All examples use Jaeger and traces
61+
across multiple services, and how to integrate tracing with Kubernetes. All examples use the Jaeger backend and traces
6262
will be viewed using the Jaeger UI.
6363
6464
=== Create a Sample Helidon SE Project
@@ -85,10 +85,10 @@ cd helidon-quickstart-se
8585
8686
=== Set up Jaeger
8787
88-
First, you need to run the Jaeger tracer. Helidon will communicate with this tracer at runtime.
88+
First, run the Jaeger backend. Helidon communicates with this backend at runtime.
8989
9090
[source,bash]
91-
.Run Jaeger within a docker container, then check the Jaeger server working:
91+
.Run Jaeger within a docker container
9292
----
9393
docker run -d --name jaeger \ # <1>
9494
-e COLLECTOR_OTLP_ENABLED=true \
@@ -109,9 +109,9 @@ docker run -d --name jaeger \ # <1>
109109
110110
=== Enable Tracing in the Helidon Application
111111
112-
Update the `pom.xml` file and add the following Jaeger dependency to the `<dependencies>`
113-
section (*not* `<dependencyManagement>`). This will enable Helidon to use Jaeger at the
114-
default host and port, `localhost:14250`.
112+
Update the `pom.xml` file and add the following OpenTelemetry dependency to the `<dependencies>`
113+
section (*not* `<dependencyManagement>`). This will enable Helidon to use OpenTelemetry at the
114+
default host and port, `localhost:4317`.
115115
116116
[source,xml]
117117
.Add the following dependencies to `pom.xml`:
@@ -128,25 +128,23 @@ default host and port, `localhost:14250`.
128128
</dependency>
129129
<dependency>
130130
<groupId>io.helidon.tracing.providers</groupId>
131-
<artifactId>helidon-tracing-providers-jaeger</artifactId> <!--3-->
131+
<artifactId>helidon-tracing-providers-opentelemetry</artifactId> <!--3-->
132132
<scope>runtime</scope>
133133
</dependency>
134134
</dependencies>
135135
----
136136
<1> Helidon Tracing dependencies.
137137
<2> Observability features for tracing.
138-
<3> Jaeger tracing provider.
138+
<3> OpenTelemetry tracing provider.
139139
140-
All spans sent by Helidon to Jaeger need to be associated with a service, assigned by the `tracing.service` setting in the example below.
140+
Helidon offers several tracing providers: OpenTelemetry, Zipkin, and Jaeger (deprecated).
141+
All spans sent by Helidon to the backend need to be associated with a service, assigned by the `tracing.service` setting in the example below.
141142
142143
[source,bash]
143144
.Add the following lines to `src/main/resources/application.yaml`:
144145
----
145146
tracing:
146147
service: helidon-se-1
147-
protocol: http
148-
port: 14250
149-
path: /api/traces
150148
tags:
151149
env: development
152150
enabled: true
@@ -177,7 +175,7 @@ curl http://localhost:8080/greet
177175
178176
=== Viewing Traces Using the Jaeger UI
179177
180-
Jaeger provides a web-based UI at http://localhost:16686 where you can see a visual
178+
The Jaeger backend provides a web-based UI at http://localhost:16686 where you can see a visual
181179
representation of the traces and spans within them.
182180
183181
. From the `Service` drop list select `helidon-se-1`. This name corresponds to the `tracing.service` setting you assigned in the `application.yaml` config file.
@@ -252,8 +250,8 @@ Note the row for `mychildSpan`--the custom span created by the added code.
252250
253251
=== Using Tracing Across Services
254252
255-
Helidon automatically traces across services if the services use the same tracer, for example, the same instance of Jaeger.
256-
This means a single trace can include spans from multiple services and hosts. Helidon uses a `SpanContext` to
253+
Helidon automatically traces across services if the services propagate span information.
254+
This means a single trace can include spans from multiple services and hosts. Helidon uses a `SpanContext` to
257255
propagate tracing information across process boundaries. When you make client API calls, Helidon will
258256
internally call OpenTelemetry APIs or OpenTracing APIs to propagate the `SpanContext`. There is nothing you need to do in your application to make this work.
259257
@@ -296,14 +294,14 @@ cd helidon-quickstart-se-2
296294
</dependency>
297295
<dependency>
298296
<groupId>io.helidon.tracing.providers</groupId>
299-
<artifactId>helidon-tracing-providers-jaeger</artifactId> <!--3-->
297+
<artifactId>helidon-tracing-providers-opentelemetry</artifactId> <!--3-->
300298
<scope>runtime</scope>
301299
</dependency>
302300
</dependencies>
303301
----
304302
<1> Helidon Tracing API.
305303
<2> Observability features for tracing.
306-
<3> Jaeger tracing provider.
304+
<3> OpenTelemetry tracing provider.
307305
308306
[source,bash]
309307
.Replace `src/main/resources/application.yaml` with the following:
@@ -313,9 +311,6 @@ app:
313311
314312
tracing:
315313
service: helidon-se-2
316-
protocol: http
317-
port: 14250
318-
path: /api/traces
319314
tags:
320315
env: development
321316
enabled: true

microprofile/grpc/client/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@
6161
<groupId>jakarta.enterprise</groupId>
6262
<artifactId>jakarta.enterprise.cdi-api</artifactId>
6363
</dependency>
64+
<dependency>
65+
<groupId>com.google.code.findbugs</groupId>
66+
<artifactId>jsr305</artifactId>
67+
</dependency>
6468
<dependency>
6569
<groupId>io.helidon.webserver</groupId>
6670
<artifactId>helidon-webserver-grpc</artifactId>

tracing/exporter-jaeger/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Helidon's Jaeger Tracing Exporter
2+
3+
Both Jaeger and OpenTelemetry have eliminated their support for _sending_ tracing span data from monitored servers using the Jaeger tracing protocol. That said, many backend products (including Jaeger's) continue to accept input in this way.
4+
5+
The Helidon Jaeger tracing exporter offers a _temporary_ bridge so applications can continue to send data to backends using the Jaeger protocol while their developers work on migrating to another exporter.
6+
7+
Helidon SE applications adopting Helidon 4.4.0 can continue--in the _short term_--to depend on `io.helidon.tracing:helidon-tracing-providers-jaeger` (also deprecated). That provider now depends on this component to send data using the Jaeger protocol.
8+
9+
Helidon MP applications adopting Helidon 4.4.0 must remove any dependency on OpenTelemetry's `opentelemetry-exporter-jaeger` component; it no longer exists. Replace those dependencies with a dependency on this component, `io.helidon.tracing:helidon-tracing-exporter-jaeger`.
10+
11+
# Deprecation
12+
Note that both this Jaeger exporter and Helidon's Jaeger tracing provider are deprecated and are likely to be removed in a future major Helidon release.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
Copyright (c) 2026 Oracle and/or its affiliates.
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
18+
<FindBugsFilter
19+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
20+
xmlns="https://github.com/spotbugs/filter/3.0.0"
21+
xsi:schemaLocation="https://github.com/spotbugs/filter/3.0.0 https://raw.githubusercontent.com/spotbugs/spotbugs/3.1.0/spotbugs/etc/findbugsfilter.xsd">
22+
23+
<!-- These violations are in generated code. -->
24+
<Match>
25+
<Class name="io.helidon.tracing.exporter.jaeger.proto.api_v2.Model$Span" />
26+
<Bug pattern="SE_BAD_FIELD" />
27+
</Match>
28+
<Match>
29+
<Class name="io.helidon.tracing.exporter.jaeger.proto.api_v2.Model$Trace" />
30+
<Bug pattern="SE_BAD_FIELD" />
31+
</Match>
32+
</FindBugsFilter>

0 commit comments

Comments
 (0)