Skip to content

Commit 244ddce

Browse files
committed
Add the Eventing distributed tracing configuration
1 parent 63de0fd commit 244ddce

File tree

2 files changed

+49
-5
lines changed

2 files changed

+49
-5
lines changed

modules/serverless-jaeger-config.adoc

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ ifdef::openshift-dedicated,openshift-rosa[]
1818
* You have access to an {product-title} account with cluster or dedicated administrator access.
1919
endif::[]
2020

21-
* You have installed the {ServerlessOperatorName} and Knative Serving.
21+
* You have installed the {ServerlessOperatorName}, Knative Serving, and Knative Eventing.
2222
* You have installed the {JaegerName} Operator.
2323
* You have installed the OpenShift CLI (`oc`).
2424
* You have created a project or have access to a project with the appropriate roles and permissions to create applications and other workloads in {product-title}.
@@ -39,7 +39,7 @@ metadata:
3939

4040
. Enable tracing for Knative Serving, by editing the `KnativeServing` CR and adding a YAML configuration for tracing:
4141
+
42-
.Tracing YAML example
42+
.Tracing YAML example for Serving
4343
[source,yaml]
4444
----
4545
apiVersion: operator.knative.dev/v1alpha1
@@ -61,6 +61,30 @@ spec:
6161
<3> The `zipkin-endpoint` must point to your `jaeger-collector` service endpoint. To get this endpoint, substitute the namespace where the Jaeger CR is applied.
6262
<4> Debugging should be set to `false`. Enabling debug mode by setting `debug: "true"` allows all spans to be sent to the server, bypassing sampling.
6363

64+
. Enable tracing for Knative Eventing by editing the `KnativeEventing` CR:
65+
+
66+
.Tracing YAML example for Eventing
67+
[source,yaml]
68+
----
69+
apiVersion: operator.knative.dev/v1alpha1
70+
kind: KnativeEventing
71+
metadata:
72+
name: knative-eventing
73+
namespace: knative-eventing
74+
spec:
75+
config:
76+
tracing:
77+
sample-rate: "0.1" <1>
78+
backend: zipkin <2>
79+
zipkin-endpoint: "http://jaeger-collector.default.svc.cluster.local:9411/api/v2/spans" <3>
80+
debug: "false" <4>
81+
----
82+
+
83+
<1> The `sample-rate` defines sampling probability. Using `sample-rate: "0.1"` means that 1 in 10 traces are sampled.
84+
<2> Set `backend` to `zipkin`.
85+
<3> Point the `zipkin-endpoint` to your `jaeger-collector` service endpoint. To get this endpoint, substitute the namespace where the Jaeger CR is applied.
86+
<4> Debugging should be set to `false`. Enabling debug mode by setting `debug: "true"` allows all spans to be sent to the server, bypassing sampling.
87+
6488
.Verification
6589

6690
You can access the Jaeger web console to see tracing data, by using the `jaeger` route.

modules/serverless-open-telemetry.adoc

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
.Prerequisites
1212

1313
* You have access to an {product-title} account with cluster administrator access.
14-
* You have not yet installed the {ServerlessOperatorName} and Knative Serving. These must be installed after the {DTProductName} installation.
14+
* You have not yet installed the {ServerlessOperatorName}, Knative Serving, and Knative Eventing. These must be installed after the {DTProductName} installation.
1515
* You have installed {DTProductName} by following the {product-title} "Installing distributed tracing" documentation.
1616
* You have installed the OpenShift CLI (`oc`).
1717
* You have created a project or have access to a project with the appropriate roles and permissions to create applications and other workloads in {product-title}.
@@ -77,7 +77,7 @@ cluster-collector-collector-headless ClusterIP None <no
7777
jaeger-all-in-one-inmemory-collector-headless ClusterIP None <none> 9411/TCP,14250/TCP,14267/TCP,14268/TCP 16m
7878
----
7979
+
80-
These services are used to configure Jaeger and Knative Serving. The name of the Jaeger service may vary.
80+
These services are used to configure Jaeger, Knative Serving, and Knative Eventing. The name of the Jaeger service may vary.
8181

8282
. Install the {ServerlessOperatorName} by following the "Installing the {ServerlessOperatorName}" documentation.
8383

@@ -96,7 +96,27 @@ spec:
9696
tracing:
9797
backend: "zipkin"
9898
zipkin-endpoint: "http://cluster-collector-collector-headless.tracing-system.svc:9411/api/v2/spans"
99-
debug: "true"
99+
debug: "false"
100+
sample-rate: "0.1" <1>
101+
----
102+
<1> The `sample-rate` defines sampling probability. Using `sample-rate: "0.1"` means that 1 in 10 traces are sampled.
103+
104+
. Install Knative Eventing by creating the following `KnativeEventing` CR:
105+
+
106+
.Example KnativeEventing CR
107+
[source,yaml]
108+
----
109+
apiVersion: operator.knative.dev/v1alpha1
110+
kind: KnativeEventing
111+
metadata:
112+
name: knative-eventing
113+
namespace: knative-eventing
114+
spec:
115+
config:
116+
tracing:
117+
backend: "zipkin"
118+
zipkin-endpoint: "http://cluster-collector-collector-headless.tracing-system.svc:9411/api/v2/spans"
119+
debug: "false"
100120
sample-rate: "0.1" <1>
101121
----
102122
<1> The `sample-rate` defines sampling probability. Using `sample-rate: "0.1"` means that 1 in 10 traces are sampled.

0 commit comments

Comments
 (0)