1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-06 06:46:26 +01:00
Files
openshift-docs/modules/serverless-jaeger-config.adoc
abrennan b919193344 Updating code blocks to guideline format for OPC 4.3
Conflicts:
	modules/serverless-creating-broker.adoc
	modules/serverless-rn-1-6-0.adoc
2020-09-02 12:38:26 -05:00

84 lines
2.3 KiB
Plaintext

// Module included in the following assemblies:
//
// * /serverless/serverless-tracing.adoc
// */jaeger/jaeger_config/serverless-jaeger-integration.adoc
[id="serverless-jaeger-config_{context}"]
= Configuring Jaeger for use with {ServerlessProductName}
.Prerequisites
To configure Jaeger for use with {ServerlessProductName}, you will need:
* Cluster administrator permissions on an {product-title} cluster.
* A current installation of {ServerlessOperatorName} and Knative Serving.
* A current installation of the Jaeger Operator.
.Procedure
. Create and apply a Jaeger custom resource YAML file that contains the following sample YAML:
+
.Jaeger custom resource YAML
+
[source,terminal]
----
apiVersion: jaegertracing.io/v1
kind: Jaeger
metadata:
name: jaeger
namespace: default
----
. Enable tracing for Knative Serving, by editing the `KnativeServing` resource and adding a YAML configuration for tracing.
+
.Tracing YAML example
+
[source,yaml]
----
apiVersion: operator.knative.dev/v1alpha1
kind: KnativeServing
metadata:
name: knative-serving
namespace: knative-serving
spec:
config:
tracing:
sample-rate: "0.1" <1>
backend: zipkin <2>
zipkin-endpoint: http://jaeger-collector.default.svc.cluster.local:9411/api/v2/spans <3>
debug: "false" <4>
----
+
<1> The `sample-rate` defines sampling probability. Using `sample-rate: "0.1"` means that 1 in 10 traces will be sampled.
<2> `backend` must be set to `zipkin`.
<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.
<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.
.Verification steps
Access the Jaeger web console to see tracing data. You can access the Jaeger web console by using the `jaeger` route.
. Get the `jaeger` route's hostname by entering the following command:
+
[source,terminal]
----
$ oc get route jaeger
----
+
.Example output
+
[source,terminal]
----
NAME HOST/PORT PATH SERVICES PORT TERMINATION WILDCARD
jaeger jaeger-default.apps.example.com jaeger-query <all> reencrypt None
----
. Open the endpoint address in your browser to view the console.