Skip to content

Commit 5be6ef7

Browse files
authored
Merge pull request #22090 from abrennan89/tracing
Adding docs on Tracing and Jaeger for Serverless
2 parents c714cde + 3c0d38e commit 5be6ef7

10 files changed

+111
-18
lines changed

_topic_map.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1476,6 +1476,12 @@ Topics:
14761476
File: rhbjaeger-updating
14771477
- Name: Removing Jaeger
14781478
File: rhbjaeger-removing
1479+
# Integrations / cross-product stories
1480+
- Name: Integrating Jaeger
1481+
Dir: jaeger_config
1482+
Topics:
1483+
- Name: Integrating Jaeger with serverless applications using OpenShift Serverless
1484+
File: serverless-jaeger-integration
14791485

14801486
---
14811487
Name: OpenShift virtualization
@@ -1696,6 +1702,8 @@ Topics:
16961702
# HA
16971703
- Name: Configuring high-availability components
16981704
File: serverless-config-HA
1705+
- Name: Tracing requests
1706+
File: serverless-tracing
16991707
# Knative CLI
17001708
- Name: Knative CLI
17011709
Dir: knative_cli
@@ -1709,8 +1717,6 @@ Topics:
17091717
- Name: How Knative Serving works
17101718
File: serverless-knative-serving
17111719
### Knative services
1712-
- Name: Interacting with serverless applications
1713-
File: interacting-serverless-apps
17141720
- Name: Configuring Knative Serving autoscaling
17151721
File: configuring-knative-serving-autoscaling
17161722
- Name: Cluster logging with OpenShift Serverless
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
include::modules/serverless-document-attributes.adoc[]
2+
[id="serverless-jaeger-integration"]
3+
= Integrating Jaeger with serverless applications using OpenShift Serverless
4+
:context: serverless-jaeger-integration
5+
include::modules/common-attributes.adoc[]
6+
7+
toc::[]
8+
9+
Using Jaeger with xref:../../serverless/serverless-getting-started.adoc#serverless-getting-started[{ServerlessProductName}] allows you to enable distributed tracing for your serverless applications on {product-title}.
10+
11+
include::modules/serverless-jaeger-config.adoc[leveloffset=+1]

modules/interacting-serverless-apps-http2-gRPC.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Module included in the following assemblies:
22
//
3-
// * serverless/interacting-serverless-apps.adoc
3+
// * serverless/serving-creating-managing-apps.adoc
44

55
[id="interacting-serverless-apps-http2-gRPC_{context}"]
66
= Interacting with a serverless application using HTTP2 / gRPC

modules/jaeger-install-elasticsearch.adoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// Module included in the following assemblies:
22
//
33
// - service_mesh/service_mesh_install/installing-ossm.adoc
4-
// - serverless/installing-openshift-serverless.adoc
54
// - rhbjaeger-installation.adoc
65

76

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * /serverless/serverless-tracing.adoc
4+
// */jaeger/jaeger_config/serverless-jaeger-integration.adoc
5+
6+
[id="serverless-jaeger-config_{context}"]
7+
= Configuring Jaeger for use with {ServerlessProductName}
8+
9+
.Prerequisites
10+
11+
To configure Jaeger for use with {ServerlessProductName}, you will need:
12+
13+
* Cluster administrator permissions on an {product-title} cluster.
14+
* A current installation of {ServerlessOperatorName} and Knative Serving.
15+
* A current installation of the Jaeger Operator.
16+
17+
.Procedure
18+
19+
. Create and apply the Jaeger custom resource:
20+
+
21+
----
22+
$ cat <<EOF | oc apply -f -
23+
apiVersion: jaegertracing.io/v1
24+
kind: Jaeger
25+
metadata:
26+
name: jaeger
27+
namespace: default
28+
EOF
29+
----
30+
31+
. Enable tracing for Knative Serving, by editing the `KnativeServing` resource and adding a YAML configuration for tracing.
32+
+
33+
.Tracing YAML example
34+
----
35+
apiVersion: operator.knative.dev/v1alpha1
36+
kind: KnativeServing
37+
metadata:
38+
name: knative-serving
39+
namespace: knative-serving
40+
spec:
41+
config:
42+
tracing:
43+
sample-rate: "0.1" <1>
44+
backend: zipkin <2>
45+
zipkin-endpoint: http://jaeger-collector.default.svc.cluster.local:9411/api/v2/spans <3>
46+
debug: "false" <4>
47+
----
48+
+
49+
<1> The `sample-rate` defines sampling probability. Using `sample-rate: "0.1"`` means that 1 in 10 traces will be sampled.
50+
<2> `backend` must be set to `zipkin`.
51+
<3> The `zipkin-endpoint` must point to your `jaeger-collector` service endpoint. To get this endpoint, substitute the namespace where the Jaeger custom resource is applied.
52+
<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.
53+
54+
.Verification steps
55+
56+
Access the Jaeger web console to see tracing data. You can access the Jaeger web console by using the `jaeger` route.
57+
58+
. Get the `jaeger` route's hostname:
59+
+
60+
----
61+
$ oc get route jaeger
62+
NAME HOST/PORT PATH SERVICES PORT TERMINATION WILDCARD
63+
jaeger jaeger-default.apps.example.com jaeger-query <all> reencrypt None
64+
----
65+
. Open the endpoint address in your browser to view the console.

modules/verifying-serverless-app-deployment.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Module included in the following assemblies:
22
//
3-
// * serverless/interacting-serverless-apps.adoc
3+
// * serverless/serving-creating-managing-apps.adoc
44

55
[id="verifying-serverless-app-deployment_{context}"]
66
= Verifying your serverless application deployment

serverless/installing_serverless/upgrading-serverless.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ Before upgrading to the latest Serverless release, you must remove the community
1818

1919
When upgrading from older versions of {ServerlessProductName} to 1.7.0, support for HTTPS requires a change to the format of routes. Knative services created on {ServerlessProductName} 1.6.0 or older versions are no longer reachable at the old format URLs. You must retrieve the new URL for each service after upgrading {ServerlessProductName}.
2020

21-
For more information on retrieving Knative services URLs, see the documentation on xref:../../serverless/knative_serving/interacting-serverless-apps.adoc#interacting-serverless-apps[Interacting with your serverless application].
21+
For more information on retrieving Knative services URLs, see xref:../../serverless/serving-creating-managing-apps.adoc#serving-creating-managing-apps[Verifying your serverless application deployment].
2222

2323
include::modules/serverless-upgrade-sub-channel.adoc[leveloffset=+1]

serverless/knative_serving/interacting-serverless-apps.adoc

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

serverless/serverless-tracing.adoc

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
include::modules/serverless-document-attributes.adoc[]
2+
[id="serverless-tracing"]
3+
= Tracing requests using Jaeger
4+
:context: serverless-tracing
5+
include::modules/common-attributes.adoc[]
6+
7+
toc::[]
8+
9+
Using Jaeger with {ServerlessProductName} allows you to enable _distributed tracing_ for your serverless applications on {product-title}.
10+
11+
Distributed tracing records the path of a request through the various services that make up an application.
12+
13+
It is used to tie information about different units of work together, to understand a whole chain of events in a distributed transaction.
14+
The units of work might be executed in different processes or hosts.
15+
16+
Developers can visualize call flows in large architectures with distributed tracing. which is useful for understanding serialization, parallelism, and sources of latency.
17+
18+
For more information about Jaeger, see xref:../jaeger/jaeger_arch/rhbjaeger-architecture.adoc#rhbjaeger-architecture[Jaeger architecture] and xref:../jaeger/jaeger_install/rhbjaeger-installation.adoc#rhbjaeger-installation[Installing Jaeger].
19+
20+
// Serverless specific modules
21+
include::modules/serverless-jaeger-config.adoc[leveloffset=+2]

serverless/serving-creating-managing-apps.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,6 @@ For more information about creating applications using the *Developer* perspecti
2020

2121
include::modules/creating-serverless-apps-kn.adoc[leveloffset=+1]
2222
include::modules/creating-serverless-apps-yaml.adoc[leveloffset=+1]
23+
24+
include::modules/verifying-serverless-app-deployment.adoc[leveloffset=+1]
25+
include::modules/interacting-serverless-apps-http2-gRPC.adoc[leveloffset=+1]

0 commit comments

Comments
 (0)