Enable tracing
The Gloo OTel pipeline integrates with Jaeger as the tracing platform. Jaeger is an open source tool that helps you follow the path of a request as it is forwarded between microservices. The chain of events and interactions are then captured by the Gloo OTel pipeline and visualized in the Jaeger UI that is embedded in to the Gloo UI. You can use this data to troubleshoot issues in your microservices and identify bottlenecks.
This guide walks you through how to set up tracing with the built-in Jaeger platform, which can be used for testing or demo purposes. However, if you plan to set up tracing for your production environment, create your own custom tracing pipeline in the Gloo telemetry pipeline to forward traces to a tracing platform that is managed by your organization and hardened for production. Alternatively, you can send production traces to a SaaS backend. Use the steps in Bring your own Jaeger instance as a guide to integrate your own tracing platform.
Use the built-in Jaeger tracing platform
During your Gloo Platform installation, you can enable Jaeger as the tracing platform for your Gloo environment and embed the Jaeger UI in to the Gloo UI.
-
Follow the steps in the Gloo Mesh documentation to get your current Helm values.
-
Enable Jaeger in your environment by adding the following configuration to your Helm values file.
jaeger: enabled: true
-
Optional: Enable the default pipelines
traces/istio
andtraces/jaeger
. Thetraces/istio
pipeline is set up on the Gloo collector agent and collects traces from the ingress gateway or Istio-enabled workloads. Traces are sent to the Gloo telemetry gateway and then forwarded to the built-in Jaeger tracing platform by using the defaulttraces/jaeger
pipeline.telemetryCollectorCustomization: pipelines: traces/istio: enabled: true telemetryGatewayCustomization: pipelines: traces/jaeger: enabled: true
-
Follow the steps in the Gloo Mesh documentation to upgrade and verify your Helm installation.
-
Verify that you see a
gloo-jaeger
deployment in your cluster.kubectl get deployment gloo-jaeger -n gloo-mesh
-
Verify that your custom Jaeger settings were added to the Gloo telemetry gateway and collector configmaps.
kubectl get configmap gloo-telemetry-gateway-config -n gloo-mesh -o yaml kubectl get configmap gloo-telemetry-collector-config -n gloo-mesh -o yaml
-
Perform a rollout restart of the telemetry gateway deployment and the telemetry collector daemon set to force your configmap changes to be applied to the telemetry gateway and collector agent pods.
kubectl rollout restart -n gloo-mesh deployment/gloo-telemetry-gateway kubectl rollout restart -n gloo-mesh daemonset/gloo-telemetry-collector-agent
-
Open the Gloo UI.
meshctl dashboard
-
From the menu, select the Tracing tab and verify that the Jaeger UI opens.
-
Continue with instrumenting your apps to collect traces. For example, to collect traces for the ingress gateway (Gloo Gateway) or the workloads in your service mesh (Gloo Mesh Enterprise) see the following links. To instrument other apps in your cluster, see the Jaeger documentation.
Bring your own Jaeger instance
Instead of using the built-in Jaeger instance, you can configure the Gloo UI to point to your Jaeger instance instead.
-
Install or use an existing Jaeger instance. For example, you might follow the Jaeger documentation to set up Jaeger in your cluster. Do not use the
jaeger.enabled
setting in the Helm values file as this setting enables the built-in Jaeger instance. -
Follow the steps in the Gloo Mesh documentation to get your current Helm values.
-
Embed the UI of your Jaeger instance in the Gloo UI by adding the endpoint, port, and base path for your instance to your Helm values file. Note that the Jaeger UI must be served from a path that is different from
/
as this path is reserved for the built-in Jaeger instance.glooUi: tracing: endpoint: "<endpoint>" port: <port> basePath: "/<base-path>"
-
Optional: Enable the default
traces/istio
pipeline in your Helm values file to collect traces from the ingress gateway or Istio-enabled workloads. Thetraces/istio
pipeline is configured on the Gloo collector agents and sends traces to the Gloo telemetry gateway.telemetryCollectorCustomization: pipelines: traces/istio: enabled: true
-
To forward traces from the Gloo telemetry gateway to your Jaeger instance, set up an extra exporter on the Gloo telemetry gateway with the details of your Jaeger endpoint, and add that exporter to the default
traces/jaeger
pipeline in your Helm values file. For more information about how to set up the exporter, see the OTLP gRPC exporter.telemetryGatewayCustomization: extraExporters: otlp/jaeger-custom: endpoint: myjaeger:4317 tls: insecure: true pipelines: traces/jaeger: enabled: true pipeline: exporters: - otlp/jaeger-custom
-
Follow the steps in the Gloo Mesh documentation to upgrade and verify your Helm installation.
-
Verify that your custom Jaeger settings were added to the Gloo telemetry gateway configmap.
kubectl get configmap gloo-telemetry-gateway-config -n gloo-mesh -o yaml
-
Perform a rollout restart of the telemetry gateway deployment and the telemetry collector daemon set to force your configmap changes to be applied to the telemetry gateway and collector agent pods.
kubectl rollout restart -n gloo-mesh deployment/gloo-telemetry-gateway kubectl rollout restart -n gloo-mesh daemonset/gloo-telemetry-collector-agent
-
Open the Gloo UI.
meshctl dashboard
-
From the menu, select the Tracing tab and verify that the Jaeger UI opens.
-
Continue with instrumenting your apps to collect traces. For example, to collect traces for the ingress gateway (Gloo Gateway) or the workloads in your service mesh (Gloo Mesh Enterprise) see the following links. To instrument other apps in your cluster, see the Jaeger documentation.