Skip to content

Commit d08cfdc

Browse files
pkalsi97squakez
authored andcommitted
chore(e2e): update telemetry tests to use properties instead of deprecated trait
1 parent 691a515 commit d08cfdc

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

docs/modules/traits/pages/telemetry.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,14 @@ $ kamel run -t telemetry.enabled=true \
153153
[source,console]
154154
----
155155
$ kamel run \
156+
--dependency camel:opentelemetry \
156157
-p quarkus.otel.exporter.otlp.traces.endpoint=http://jaeger:4317 \
157158
-p quarkus.otel.resource.attributes=service.name=my-integration \
158159
MyRoute.java
159160
----
160161

162+
NOTE: The `--dependency camel:opentelemetry` is required. Previously, the telemetry trait automatically added this dependency via the `camel-k:telemetry` capability. With direct configuration, you must explicitly include the OpenTelemetry dependency.
163+
161164
=== Benefits of Direct Configuration
162165

163166
Using properties and dependencies configuration directly provides more flexibility, including:

e2e/common/cli/files/JavaDuplicateParams.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// camel-k: language=java trait=telemetry.enabled=false trait=affinity.enabled=true property=prop1=false property=foo=bar
1+
// camel-k: language=java trait=container.enabled=true trait=affinity.enabled=true property=prop1=false property=foo=bar
22

33
/*
44
* Licensed to the Apache Software Foundation (ASF) under one or more

e2e/telemetry/telemetry_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ func TestTelemetryTrait(t *testing.T) {
3939
// Check service is available
4040
g.Eventually(ServicesByType(t, ctx, "otlp", corev1.ServiceTypeClusterIP), TestTimeoutLong).ShouldNot(BeEmpty())
4141

42-
// Create integration and activate traces by telemetry trait
42+
// Create integration and activate traces using OpenTelemetry properties and dependency
4343
g.Expect(KamelRun(t, ctx, ns,
4444
"files/rest-consumer.yaml", "--name", "rest-consumer",
45-
"-t", "telemetry.enabled=true",
46-
"-t", "telemetry.endpoint=http://opentelemetrycollector.otlp:4317").Execute()).To(Succeed())
45+
"--dependency", "camel:opentelemetry",
46+
"-p", "quarkus.otel.exporter.otlp.traces.endpoint=http://opentelemetrycollector.otlp:4317").Execute()).To(Succeed())
4747
g.Eventually(IntegrationPodPhase(t, ctx, ns, "rest-consumer"), TestTimeoutLong).Should(Equal(corev1.PodRunning))
4848

4949
name := "Bob"

0 commit comments

Comments
 (0)