Skip to content

Commit d227ee2

Browse files
authored
Merge pull request #45588 from abrennan89/SRVCOM-1734
[SRVCOM-1734]: Update existing Jaeger docs and add OpenTelemetry integration / new tracing section
2 parents 80b4026 + b89731b commit d227ee2

11 files changed

+208
-38
lines changed

_topic_maps/_topic_map.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3487,12 +3487,12 @@ Topics:
34873487
# logging
34883488
- Name: Cluster logging with OpenShift Serverless
34893489
File: cluster-logging-serverless
3490-
# Tracing
3491-
- Name: Tracing requests using Jaeger
3492-
File: serverless-tracing
34933490
# Metrics
34943491
- Name: Serverless developer metrics
34953492
File: serverless-developer-metrics
3493+
# Tracing
3494+
- Name: Tracing
3495+
File: serverless-tracing
34963496
# Support
34973497
- Name: Support
34983498
File: serverless-support

_topic_maps/_topic_map_osd.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,10 +297,11 @@ Topics:
297297
Topics:
298298
- Name: Cluster logging with OpenShift Serverless
299299
File: cluster-logging-serverless
300-
- Name: Tracing requests using Jaeger
301-
File: serverless-tracing
302300
- Name: Serverless developer metrics
303301
File: serverless-developer-metrics
302+
# Tracing
303+
- Name: Tracing
304+
File: serverless-tracing
304305
- Name: Support
305306
File: serverless-support
306307
- Name: Security

_topic_maps/_topic_map_rosa.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,10 +408,11 @@ Topics:
408408
Topics:
409409
- Name: Cluster logging with OpenShift Serverless
410410
File: cluster-logging-serverless
411-
- Name: Tracing requests using Jaeger
412-
File: serverless-tracing
413411
- Name: Serverless developer metrics
414412
File: serverless-developer-metrics
413+
# Tracing
414+
- Name: Tracing
415+
File: serverless-tracing
415416
- Name: Support
416417
File: serverless-support
417418
- Name: Security

modules/distr-tracing-product-overview.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
This module included in the following assemblies:
33
-service_mesh/v2x/ossm-architecture.adoc
44
-distr_tracing_arch/distr-tracing-architecture.adoc
5+
-serverless/serverless-tracing.adoc
56
////
67

78
:_content-type: CONCEPT

modules/serverless-jaeger-config.adoc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// Module is included in the following assemblies:
22
//
3-
// * serverless/monitor/serverless-tracing.adoc
3+
// * serverless/serverless-tracing.adoc
44

55
:_content-type: PROCEDURE
66
[id="serverless-jaeger-config_{context}"]
7-
= Configuring Jaeger for use with {ServerlessProductName}
7+
= Using Jaeger to enable distributed tracing
88

9-
You can use the following procedure to set up Jaeger for use with {ServerlessProductName}.
9+
If you do not want to install all of the components of {DTProductName}, you can still use distributed tracing on {product-title} with {ServerlessProductName}. To do this, you must install and configure Jaeger as a standalone integration.
1010

1111
.Prerequisites
1212

@@ -19,8 +19,8 @@ ifdef::openshift-dedicated,openshift-rosa[]
1919
endif::[]
2020

2121
* You have installed the {ServerlessOperatorName} and Knative Serving.
22-
* You have installed the Jaeger Operator.
23-
* Install the OpenShift CLI (`oc`).
22+
* You have installed the {JaegerName} Operator.
23+
* You have installed the OpenShift (`oc`) CLI.
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}.
2525
2626
.Procedure
@@ -52,11 +52,11 @@ spec:
5252
tracing:
5353
sample-rate: "0.1" <1>
5454
backend: zipkin <2>
55-
zipkin-endpoint: http://jaeger-collector.default.svc.cluster.local:9411/api/v2/spans <3>
55+
zipkin-endpoint: "http://jaeger-collector.default.svc.cluster.local:9411/api/v2/spans" <3>
5656
debug: "false" <4>
5757
----
5858
+
59-
<1> The `sample-rate` defines sampling probability. Using `sample-rate: "0.1"` means that 1 in 10 traces will be sampled.
59+
<1> The `sample-rate` defines sampling probability. Using `sample-rate: "0.1"` means that 1 in 10 traces are sampled.
6060
<2> `backend` must be set to `zipkin`.
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.
@@ -69,7 +69,7 @@ You can access the Jaeger web console to see tracing data, by using the `jaeger`
6969
+
7070
[source,terminal]
7171
----
72-
$ oc get route jaeger
72+
$ oc get route jaeger -n default
7373
----
7474
+
7575
.Example output
Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
// Module is included in the following assemblies:
2+
//
3+
// * serverless/serverless-tracing.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="serverless-open-telemetry_{context}"]
7+
= Using {DTProductName} to enable distributed tracing
8+
9+
{DTProductName} is made up of several components that work together to collect, store, and display tracing data. You can use {DTProductName} with {ServerlessProductName} to monitor and troubleshoot serverless applications.
10+
11+
.Prerequisites
12+
13+
* 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.
15+
* You have installed {DTProductName} by following the {product-title} "Installing distributed tracing" documentation.
16+
* You have installed the OpenShift (`oc`) CLI.
17+
* 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}.
18+
19+
.Procedure
20+
21+
. Create an `OpenTelemetryCollector` custom resource (CR):
22+
+
23+
.Example OpenTelemetryCollector CR
24+
[source,yaml]
25+
----
26+
apiVersion: opentelemetry.io/v1alpha1
27+
kind: OpenTelemetryCollector
28+
metadata:
29+
name: cluster-collector
30+
namespace: <namespace>
31+
spec:
32+
mode: deployment
33+
config: |
34+
receivers:
35+
zipkin:
36+
processors:
37+
exporters:
38+
jaeger:
39+
endpoint: jaeger-all-in-one-inmemory-collector-headless.tracing-system.svc:14250
40+
tls:
41+
ca_file: "/var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt"
42+
logging:
43+
service:
44+
pipelines:
45+
traces:
46+
receivers: [zipkin]
47+
processors: []
48+
exporters: [jaeger, logging]
49+
----
50+
51+
. Verify that you have two pods running in the namespace where {DTProductName} is installed:
52+
+
53+
[source,terminal]
54+
----
55+
$ oc get pods -n <namespace>
56+
----
57+
+
58+
.Example output
59+
[source,terminal]
60+
----
61+
NAME READY STATUS RESTARTS AGE
62+
cluster-collector-collector-85c766b5c-b5g99 1/1 Running 0 5m56s
63+
jaeger-all-in-one-inmemory-ccbc9df4b-ndkl5 2/2 Running 0 15m
64+
----
65+
66+
. Verify that the following headless services have been created:
67+
+
68+
[source,terminal]
69+
----
70+
$ oc get svc -n <namespace> | grep headless
71+
----
72+
+
73+
.Example output
74+
[source,terminal]
75+
----
76+
cluster-collector-collector-headless ClusterIP None <none> 9411/TCP 7m28s
77+
jaeger-all-in-one-inmemory-collector-headless ClusterIP None <none> 9411/TCP,14250/TCP,14267/TCP,14268/TCP 16m
78+
----
79+
+
80+
These services are used to configure Jaeger and Knative Serving. The name of the Jaeger service may vary.
81+
82+
. Install the {ServerlessOperatorName} by following the "Installing the {ServerlessOperatorName}" documentation.
83+
84+
. Install Knative Serving by creating the following `KnativeServing` CR:
85+
+
86+
.Example KnativeServing CR
87+
[source,yaml]
88+
----
89+
apiVersion: operator.knative.dev/v1alpha1
90+
kind: KnativeServing
91+
metadata:
92+
name: knative-serving
93+
namespace: knative-serving
94+
spec:
95+
config:
96+
tracing:
97+
backend: "zipkin"
98+
zipkin-endpoint: "http://cluster-collector-collector-headless.tracing-system.svc:9411/api/v2/spans"
99+
debug: "true"
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+
. Create a Knative service:
105+
+
106+
.Example service
107+
[source,yaml]
108+
----
109+
apiVersion: serving.knative.dev/v1
110+
kind: Service
111+
metadata:
112+
name: helloworld-go
113+
spec:
114+
template:
115+
metadata:
116+
labels:
117+
app: helloworld-go
118+
annotations:
119+
autoscaling.knative.dev/minScale: "1"
120+
autoscaling.knative.dev/target: "1"
121+
spec:
122+
containers:
123+
- image: quay.io/openshift-knative/helloworld:v1.2
124+
imagePullPolicy: Always
125+
resources:
126+
requests:
127+
cpu: "200m"
128+
env:
129+
- name: TARGET
130+
value: "Go Sample v1"
131+
----
132+
133+
. Make some requests to the service:
134+
+
135+
.Example HTTPS request
136+
[source,terminal]
137+
----
138+
$ curl https://helloworld-go.example.com
139+
----
140+
141+
. Get the URL for the Jaeger web console:
142+
+
143+
.Example command
144+
[source,terminal]
145+
----
146+
$ oc get route jaeger-all-in-one-inmemory -o jsonpath='{.spec.host}' -n <namespace>
147+
----
148+
+
149+
You can now examine traces by using the Jaeger console.

serverless/install/install-serverless-operator.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ endif::[]
3838
// universal install doc
3939
include::modules/serverless-install-web-console.adoc[leveloffset=+1]
4040

41+
[IMPORTANT]
42+
====
43+
If you want to xref:../../serverless/serverless-tracing.adoc#serverless-tracing[use {DTProductName} with {ServerlessProductName}], you must install and configure {DTProductName} before you install Knative Serving or Knative Eventing.
44+
====
45+
4146
[id="additional-resources_install-serverless-operator"]
4247
[role="_additional-resources"]
4348
== Additional resources

serverless/install/installing-knative-eventing.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ To use event-driven architecture on your cluster, install Knative Eventing. You
1010

1111
After you install the {ServerlessOperatorName}, you can install Knative Eventing by using the default settings, or configure more advanced settings in the `KnativeEventing` custom resource (CR). For more information about configuration options for the `KnativeEventing` CR, see xref:../../serverless/admin_guide/serverless-configuration.adoc#serverless-configuration[Global configuration].
1212

13+
[IMPORTANT]
14+
====
15+
If you want to xref:../../serverless/serverless-tracing.adoc#serverless-tracing[use {DTProductName} with {ServerlessProductName}], you must install and configure {DTProductName} before you install Knative Eventing.
16+
====
17+
1318
include::modules/serverless-install-eventing-web-console.adoc[leveloffset=+1]
1419
include::modules/serverless-install-eventing-yaml.adoc[leveloffset=+1]
1520

serverless/install/installing-knative-serving.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ Installing Knative Serving allows you to create Knative services and functions o
1010

1111
After you install the {ServerlessOperatorName}, you can install Knative Serving by using the default settings, or configure more advanced settings in the `KnativeServing` custom resource (CR). For more information about configuration options for the `KnativeServing` CR, see xref:../../serverless/admin_guide/serverless-configuration.adoc#serverless-configuration[Global configuration].
1212

13+
[IMPORTANT]
14+
====
15+
If you want to xref:../../serverless/serverless-tracing.adoc#serverless-tracing[use {DTProductName} with {ServerlessProductName}], you must install and configure {DTProductName} before you install Knative Serving.
16+
====
17+
1318
include::modules/serverless-install-serving-web-console.adoc[leveloffset=+1]
1419
include::modules/serverless-install-serving-yaml.adoc[leveloffset=+1]
1520

serverless/monitor/serverless-tracing.adoc

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)