Skip to content

Commit 58c6f60

Browse files
authored
[4.x.] - Deprecate MicroProfile Tracing (helidon-io#5909)
* MicroProfile Tracing removed and marked for deprecation. * Fix TCK * Fix Integration with Zipkin * Fix Integration with Zipkin. Fix Copyright. * Fix OpenTracing warning message. Fix module deprecation. * Fix Deprecated Since descriptor handler.
1 parent 5a53ab9 commit 58c6f60

7 files changed

Lines changed: 23 additions & 15 deletions

File tree

common/features/processor/src/main/java/io/helidon/common/features/processor/FeatureHandler.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022 Oracle and/or its affiliates.
2+
* Copyright (c) 2022, 2023 Oracle and/or its affiliates.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -110,12 +110,12 @@ private void processModule(Element moduleElement) {
110110
annotation.getElementValues()
111111
.forEach((method, value) -> {
112112
if (method.getSimpleName().contentEquals("since")) {
113-
descriptor.since((String) value.getValue());
113+
descriptor.deprecatedSince((String) value.getValue());
114114
}
115115
});
116116
if (descriptor.noDeprecatedSince()) {
117117
messager.printMessage(Diagnostic.Kind.ERROR, "Failed to process feature metadata annotation processor. "
118-
+ " Module " + moduleName + " has @Deprecated without since. Since must be defined");
118+
+ " Module " + moduleName + " has @Deprecated without since. Since must be defined.");
119119
throw new IllegalStateException("Deprecated without since in module " + moduleName);
120120
}
121121
break;

docs/mp/tracing.adoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
///////////////////////////////////////////////////////////////////////////////
22

3-
Copyright (c) 2018, 2022 Oracle and/or its affiliates.
3+
Copyright (c) 2018, 2023 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.
@@ -39,6 +39,9 @@ include::{rootdir}/includes/mp.adoc[]
3939
4040
== Overview
4141
42+
WARNING: The OpenTracing Specification that MP OpenTracing is based on is no longer maintained.
43+
The MP OpenTracing specification is no longer required by MicroProfile. This feature is marked as `@Deprecated` in Helidon. The specification is Superseded by link:https://github.com/eclipse/microprofile-telemetry[MicroProfile Telemetry specification].
44+
4245
Distributed tracing is a critical feature of micro-service based applications, since it traces workflow both
4346
within a service and across multiple services. This provides insight to sequence and timing data for specific blocks of work,
4447
which helps you identify performance and operational issues. Helidon MP includes support for distributed tracing

microprofile/bundles/helidon-microprofile/pom.xml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
4-
Copyright (c) 2019, 2022 Oracle and/or its affiliates.
4+
Copyright (c) 2019, 2023 Oracle and/or its affiliates.
55
66
Licensed under the Apache License, Version 2.0 (the "License");
77
you may not use this file except in compliance with the License.
@@ -70,10 +70,6 @@
7070
<groupId>io.helidon.microprofile.rest-client</groupId>
7171
<artifactId>helidon-microprofile-rest-client</artifactId>
7272
</dependency>
73-
<dependency>
74-
<groupId>io.helidon.microprofile.tracing</groupId>
75-
<artifactId>helidon-microprofile-tracing</artifactId>
76-
</dependency>
7773
<dependency>
7874
<groupId>org.glassfish.jersey.media</groupId>
7975
<artifactId>jersey-media-json-binding</artifactId>

microprofile/bundles/helidon-microprofile/src/main/java/module-info.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019, 2021 Oracle and/or its affiliates.
2+
* Copyright (c) 2019, 2023 Oracle and/or its affiliates.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -24,7 +24,6 @@
2424
requires transitive io.helidon.microprofile.metrics;
2525
requires transitive io.helidon.microprofile.faulttolerance;
2626
requires transitive io.helidon.microprofile.jwt.auth;
27-
requires transitive io.helidon.microprofile.tracing;
2827
requires transitive io.helidon.microprofile.restclient;
2928
requires transitive io.helidon.microprofile.openapi;
3029
requires transitive jakarta.json.bind;

microprofile/tests/tck/tck-opentracing/pom.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
3-
Copyright (c) 2019, 2022 Oracle and/or its affiliates.
3+
Copyright (c) 2019, 2023 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.
@@ -56,6 +56,11 @@
5656
<artifactId>opentracing-mock</artifactId>
5757
<scope>test</scope>
5858
</dependency>
59+
<dependency>
60+
<groupId>io.helidon.microprofile.tracing</groupId>
61+
<artifactId>helidon-microprofile-tracing</artifactId>
62+
<scope>test</scope>
63+
</dependency>
5964
</dependencies>
6065

6166
<build>

microprofile/tracing/src/main/java/module-info.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@
2525
@Feature(value = "Tracing",
2626
description = "MicroProfile tracing spec implementation",
2727
in = HelidonFlavor.MP,
28-
path = "Tracing"
29-
)
28+
path = "Tracing",
29+
since = "1.0.0")
30+
@Deprecated(since="4.0.0", forRemoval = true)
3031
module io.helidon.microprofile.tracing {
3132
requires static io.helidon.common.features.api;
3233

tests/integration/zipkin-mp-2.2/pom.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
3-
Copyright (c) 2019, 2022 Oracle and/or its affiliates.
3+
Copyright (c) 2019, 2023 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.
@@ -38,6 +38,10 @@
3838
<groupId>io.helidon.tracing</groupId>
3939
<artifactId>helidon-tracing-zipkin</artifactId>
4040
</dependency>
41+
<dependency>
42+
<groupId>io.helidon.microprofile.tracing</groupId>
43+
<artifactId>helidon-microprofile-tracing</artifactId>
44+
</dependency>
4145
<dependency>
4246
<groupId>org.jboss</groupId>
4347
<artifactId>jandex</artifactId>

0 commit comments

Comments
 (0)