Using Jaeger with OpenShift Serverless allows you to enable distributed tracing for your serverless applications on OpenShift Container Platform.

Distributed tracing records the path of a request through the various services that make up an application.

It is used to tie information about different units of work together, to understand a whole chain of events in a distributed transaction. The units of work might be executed in different processes or hosts.

Developers can visualize call flows in large architectures with distributed tracing. which is useful for understanding serialization, parallelism, and sources of latency.

For more information about distributed tracing, see distributed tracing architecture and Installing distributed tracing.

Configuring Jaeger for use with OpenShift Serverless

You can use the following procedure to set up Jaeger for use with OpenShift Serverless.

  • You have access to an OpenShift Container Platform account with cluster administrator access.

  • You have installed the OpenShift Serverless Operator and Knative Serving.

  • You have installed the Jaeger Operator.

  • Install the OpenShift CLI (oc).

  • You have created a project or have access to a project with the appropriate roles and permissions to create applications and other workloads in OpenShift Container Platform.

  1. Create and apply a Jaeger custom resource (CR) that contains the following:

    Jaeger CR
    apiVersion: jaegertracing.io/v1
    kind: Jaeger
      name: jaeger
      namespace: default
  2. Enable tracing for Knative Serving, by editing the KnativeServing CR and adding a YAML configuration for tracing:

    Tracing YAML example
    apiVersion: operator.knative.dev/v1alpha1
    kind: KnativeServing
      name: knative-serving
      namespace: knative-serving
          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 CR 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.

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

  1. Get the jaeger route’s hostname by entering the following command:

    $ oc get route jaeger
    Example output
    NAME     HOST/PORT                         PATH   SERVICES       PORT    TERMINATION   WILDCARD
    jaeger   jaeger-default.apps.example.com          jaeger-query   <all>   reencrypt     None
  2. Open the endpoint address in your browser to view the console.