Skip to content

Commit

Permalink
Moving from Jaeger exporter to OTLP exporter usage by default (#7597)
Browse files Browse the repository at this point in the history
Signed-off-by: Paolo Patierno <ppatierno@live.com>
  • Loading branch information
ppatierno authored Dec 4, 2022
1 parent 9965adb commit f190b0d
Show file tree
Hide file tree
Showing 15 changed files with 50 additions and 55 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* Use Java 17 as the runtime for all containers and language level for all modules except `api`, `crd-generator`, `crd-annotations`, and `test`
* Improved FIPS (Federal Information Processing Standards) support
* Upgrade Vert.x to 4.3.5
* Moved from using the Jaeger exporter to OTLP exporter by default

### Changes, deprecations and removals

Expand All @@ -24,6 +25,10 @@
If you want to keep using `SHA1PRNG` as your SecureRandom, you can configure it in `.spec.kafka.config` in your `Kafka` custom resource.
* Support for JmxTrans in Strimzi is deprecated.
It is currently planned to be removed in Strimzi 0.35.0.
* When OpenTelemetry is enabled for tracing, starting from this release, the operator configures the OTLP exporter instead of the Jaeger one by default.
The Jaeger exporter is even not included in the Kafka images anymore, so if you want to use it you have to add the binary by yourself.
The `OTEL_EXPORTER_OTLP_ENDPOINT` environment variable has to be used instead of the `OTEL_EXPORTER_JAEGER_ENDPOINT` in order to specify the OTLP endpoint to send traces to.
If you are using Jaeger as the backend system for tracing, you need to have 1.35 release at least which is the first one exposing an OLTP endpoint.

## 0.32.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
</dependency>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-exporter-jaeger</artifactId>
<artifactId>opentelemetry-exporter-otlp</artifactId>
<version>${opentelemetry.version}</version>
</dependency>
<dependency>
Expand Down
8 changes: 1 addition & 7 deletions docker-images/artifacts/kafka-thirdparty-libs/3.2.x/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,8 @@
</dependency>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-exporter-jaeger</artifactId>
<artifactId>opentelemetry-exporter-otlp</artifactId>
<version>${opentelemetry.version}</version>
<exclusions>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Aligning with Jackson version 2.12.6 brought by Kafka 3.2.0 and 3.2.1 -->
<dependency>
Expand Down
8 changes: 1 addition & 7 deletions docker-images/artifacts/kafka-thirdparty-libs/3.3.x/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,8 @@
</dependency>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-exporter-jaeger</artifactId>
<artifactId>opentelemetry-exporter-otlp</artifactId>
<version>${opentelemetry.version}</version>
<exclusions>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- OAuth -->
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions docker-images/kafka-based/kafka/scripts/kafka_connect_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ if [ "$STRIMZI_TRACING" = "jaeger" ] || [ "$STRIMZI_TRACING" = "opentelemetry" ]
KAFKA_OPTS="$KAFKA_OPTS -javaagent:$(ls "$KAFKA_HOME"/libs/tracing-agent*.jar)=$STRIMZI_TRACING"
export KAFKA_OPTS
if [ "$STRIMZI_TRACING" = "opentelemetry" ] && [ -z "$OTEL_TRACES_EXPORTER" ]; then
# auto-set Jaeger exporter
export OTEL_TRACES_EXPORTER="jaeger"
# auto-set OTLP exporter
export OTEL_TRACES_EXPORTER="otlp"
fi
fi

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ if [ "$STRIMZI_TRACING" = "jaeger" ] || [ "$STRIMZI_TRACING" = "opentelemetry" ]
KAFKA_OPTS="$KAFKA_OPTS -javaagent:$(ls "$KAFKA_HOME"/libs/tracing-agent*.jar)=$STRIMZI_TRACING"
export KAFKA_OPTS
if [ "$STRIMZI_TRACING" = "opentelemetry" ] && [ -z "$OTEL_TRACES_EXPORTER" ]; then
# auto-set Jaeger exporter
export OTEL_TRACES_EXPORTER="jaeger"
# auto-set OTLP exporter
export OTEL_TRACES_EXPORTER="otlp"
fi
fi

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Tracing is not supported for Kafka brokers.
You enable and configure tracing for these components through their custom resources.
You enable tracing by specifying a tracing type using the `spec.tracing.type` property:

* `opentelemetry` for OpenTelemetry with the Jaeger Exporter
* `opentelemetry` for OpenTelemetry with the OTLP Exporter
* `jaeger` for OpenTracing with Jaeger

You add tracing configuration using `spec.template` properties.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ In each client application add the dependencies for the tracer:
</dependency>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-exporter-jaeger</artifactId>
<artifactId>opentelemetry-exporter-otlp</artifactId>
<version>{OpenTelemetryVersion}</version>
</dependency>
----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ spec:
env:
- name: OTEL_SERVICE_NAME
value: my-otel-service
- name: OTEL_EXPORTER_JAEGER_ENDPOINT
value: "http://jaeger-host:14250"
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: "http://otlp-host:4317"
tracing:
type: opentelemetry
#...
Expand All @@ -80,8 +80,8 @@ spec:
env:
- name: OTEL_SERVICE_NAME
value: my-otel-service
- name: OTEL_EXPORTER_JAEGER_ENDPOINT
value: "http://jaeger-host:14250"
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: "http://otlp-host:4317"
tracing:
type: opentelemetry
#...
Expand All @@ -101,8 +101,8 @@ spec:
env:
- name: OTEL_SERVICE_NAME
value: my-otel-service
- name: OTEL_EXPORTER_JAEGER_ENDPOINT
value: "http://jaeger-host:14250"
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: "http://otlp-host:4317"
tracing:
type: opentelemetry
#...
Expand All @@ -122,8 +122,8 @@ spec:
env:
- name: OTEL_SERVICE_NAME
value: my-otel-service
- name: OTEL_EXPORTER_JAEGER_ENDPOINT
value: "http://jaeger-host:14250"
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: "http://otlp-host:4317"
tracing:
type: opentelemetry
#...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
= Introducing a different OpenTelemetry tracing system

[role="_abstract"]
Instead of the default Jaeger system, you can specify other tracing systems that are supported by OpenTelemetry.
Instead of the default OTLP system, you can specify other tracing systems that are supported by OpenTelemetry.
You do this by adding the required artifacts to the Kafka image provided with Strimzi.
Any required implementation specific environment variables must also be set.
You then enable the new tracing implementation using the `OTEL_TRACES_EXPORTER` environment variable.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ public Job producerStrimziBridgeWithTracing() {
.withValue(TracingConstants.JAEGER_AGENT_HOST)
.endEnv()
.addNewEnv()
.withName("OTEL_EXPORTER_JAEGER_ENDPOINT")
.withValue(TracingConstants.JAEGER_COLLECTOR_URL)
.withName("OTEL_EXPORTER_OTLP_ENDPOINT")
.withValue(TracingConstants.JAEGER_COLLECTOR_OTLP_URL)
.endEnv()
.addNewEnv()
.withName("JAEGER_SAMPLER_TYPE")
Expand Down Expand Up @@ -116,8 +116,8 @@ public Job consumerStrimziBridgeWithTracing() {
.withValue(TracingConstants.JAEGER_AGENT_HOST)
.endEnv()
.addNewEnv()
.withName("OTEL_EXPORTER_JAEGER_ENDPOINT")
.withValue(TracingConstants.JAEGER_COLLECTOR_URL)
.withName("OTEL_EXPORTER_OTLP_ENDPOINT")
.withValue(TracingConstants.JAEGER_COLLECTOR_OTLP_URL)
.endEnv()
.addNewEnv()
.withName("JAEGER_SAMPLER_TYPE")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ public Job consumerWithTracing() {
.withValue(this.tracingType)
.endEnv()
.addNewEnv()
.withName("OTEL_EXPORTER_JAEGER_ENDPOINT")
.withValue(TracingConstants.JAEGER_COLLECTOR_URL)
.withName("OTEL_EXPORTER_OTLP_ENDPOINT")
.withValue(TracingConstants.JAEGER_COLLECTOR_OTLP_URL)
.endEnv()
.endContainer()
.endSpec()
Expand Down Expand Up @@ -174,8 +174,8 @@ public Job producerWithTracing() {
.withValue(this.tracingType)
.endEnv()
.addNewEnv()
.withName("OTEL_EXPORTER_JAEGER_ENDPOINT")
.withValue(TracingConstants.JAEGER_COLLECTOR_URL)
.withName("OTEL_EXPORTER_OTLP_ENDPOINT")
.withValue(TracingConstants.JAEGER_COLLECTOR_OTLP_URL)
.endEnv()
.endContainer()
.endSpec()
Expand Down Expand Up @@ -252,8 +252,8 @@ public Job kafkaStreamsWithTracing() {
.withValue(TracingConstants.JAEGER_SAMPLER_PARAM)
.endEnv()
.addNewEnv()
.withName("OTEL_EXPORTER_JAEGER_ENDPOINT")
.withValue(TracingConstants.JAEGER_COLLECTOR_URL)
.withName("OTEL_EXPORTER_OTLP_ENDPOINT")
.withValue(TracingConstants.JAEGER_COLLECTOR_OTLP_URL)
.endEnv()
.addNewEnv()
.withName("TRACING_TYPE")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public interface TracingConstants {
String JAEGER_AGENT_HOST = JAEGER_INSTANCE_NAME + "-agent";
String JAEGER_QUERY_SERVICE = JAEGER_INSTANCE_NAME + "-query";
String JAEGER_COLLECTOR_NAME = JAEGER_INSTANCE_NAME + "-collector";
String JAEGER_COLLECTOR_URL = "http://" + JAEGER_COLLECTOR_NAME + ":14250";
String JAEGER_COLLECTOR_OTLP_URL = "http://" + JAEGER_COLLECTOR_NAME + ":4317";

String CERT_MANAGER_WEBHOOK_DEPLOYMENT = "cert-manager-webhook";
String CERT_MANAGER_NAMESPACE = "cert-manager";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import io.strimzi.api.kafka.model.tracing.Tracing;
import io.strimzi.systemtest.annotations.ParallelNamespaceTest;
import io.strimzi.systemtest.annotations.ParallelSuite;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.extension.ExtensionContext;

Expand All @@ -26,7 +25,6 @@
@Tag(TRACING)
@Tag(INTERNAL_CLIENTS_USED)
@ParallelSuite
@Disabled
public class OpenTelemetryST extends TracingAbstractST {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
import static io.strimzi.systemtest.tracing.TracingConstants.CERT_MANAGER_NAMESPACE;
import static io.strimzi.systemtest.tracing.TracingConstants.CERT_MANAGER_WEBHOOK_DEPLOYMENT;
import static io.strimzi.systemtest.tracing.TracingConstants.JAEGER_AGENT_HOST;
import static io.strimzi.systemtest.tracing.TracingConstants.JAEGER_COLLECTOR_URL;
import static io.strimzi.systemtest.tracing.TracingConstants.JAEGER_COLLECTOR_OTLP_URL;
import static io.strimzi.systemtest.tracing.TracingConstants.JAEGER_CONSUMER_SERVICE;
import static io.strimzi.systemtest.tracing.TracingConstants.JAEGER_INSTANCE_NAME;
import static io.strimzi.systemtest.tracing.TracingConstants.JAEGER_KAFKA_BRIDGE_SERVICE;
Expand Down Expand Up @@ -200,8 +200,8 @@ void doTestProducerConsumerMirrorMaker2Service(final ExtensionContext extensionC
.withValue(JAEGER_AGENT_HOST)
.endEnv()
.addNewEnv()
.withName("OTEL_EXPORTER_JAEGER_ENDPOINT")
.withValue(JAEGER_COLLECTOR_URL)
.withName("OTEL_EXPORTER_OTLP_ENDPOINT")
.withValue(JAEGER_COLLECTOR_OTLP_URL)
.endEnv()
.addNewEnv()
.withName("JAEGER_SAMPLER_TYPE")
Expand Down Expand Up @@ -291,8 +291,8 @@ void doTestProducerConsumerMirrorMakerService(final ExtensionContext extensionCo
.withValue(JAEGER_AGENT_HOST)
.endEnv()
.addNewEnv()
.withName("OTEL_EXPORTER_JAEGER_ENDPOINT")
.withValue(JAEGER_COLLECTOR_URL)
.withName("OTEL_EXPORTER_OTLP_ENDPOINT")
.withValue(JAEGER_COLLECTOR_OTLP_URL)
.endEnv()
.addNewEnv()
.withName("JAEGER_SAMPLER_TYPE")
Expand Down Expand Up @@ -369,8 +369,8 @@ void doTestProducerConsumerStreamsConnectService(final ExtensionContext extensio
.withValue(JAEGER_AGENT_HOST)
.endEnv()
.addNewEnv()
.withName("OTEL_EXPORTER_JAEGER_ENDPOINT")
.withValue(JAEGER_COLLECTOR_URL)
.withName("OTEL_EXPORTER_OTLP_ENDPOINT")
.withValue(JAEGER_COLLECTOR_OTLP_URL)
.endEnv()
.addNewEnv()
.withName("JAEGER_SAMPLER_TYPE")
Expand Down Expand Up @@ -446,8 +446,8 @@ void doTestKafkaBridgeService(final ExtensionContext extensionContext) {
.withValue(JAEGER_AGENT_HOST)
.endEnv()
.addNewEnv()
.withName("OTEL_EXPORTER_JAEGER_ENDPOINT")
.withValue(JAEGER_COLLECTOR_URL)
.withName("OTEL_EXPORTER_OTLP_ENDPOINT")
.withValue(JAEGER_COLLECTOR_OTLP_URL)
.endEnv()
.addNewEnv()
.withName("JAEGER_SAMPLER_TYPE")
Expand All @@ -459,7 +459,7 @@ void doTestKafkaBridgeService(final ExtensionContext extensionContext) {
.endEnv()
.addNewEnv()
.withName("OTEL_TRACES_EXPORTER")
.withValue("jaeger")
.withValue("otlp")
.endEnv()
.endBridgeContainer()
.endTemplate()
Expand Down Expand Up @@ -507,8 +507,8 @@ void doTestKafkaBridgeServiceWithHttpTracing(final ExtensionContext extensionCon
.withValue(JAEGER_AGENT_HOST)
.endEnv()
.addNewEnv()
.withName("OTEL_EXPORTER_JAEGER_ENDPOINT")
.withValue(JAEGER_COLLECTOR_URL)
.withName("OTEL_EXPORTER_OTLP_ENDPOINT")
.withValue(JAEGER_COLLECTOR_OTLP_URL)
.endEnv()
.addNewEnv()
.withName("JAEGER_SAMPLER_TYPE")
Expand All @@ -518,6 +518,10 @@ void doTestKafkaBridgeServiceWithHttpTracing(final ExtensionContext extensionCon
.withName("JAEGER_SAMPLER_PARAM")
.withValue(JAEGER_SAMPLER_PARAM)
.endEnv()
.addNewEnv()
.withName("OTEL_TRACES_EXPORTER")
.withValue("otlp")
.endEnv()
.endBridgeContainer()
.endTemplate()
.endSpec()
Expand Down

0 comments on commit f190b0d

Please sign in to comment.