Tracing

This guide walks you through setting up Jaeger Tracing for Seldon Core v2 on Kubernetes. By the end of this guide, you will be able to visualize inference traces through your Core 2 components.

Prerequisites

  • Set up and connect to a Kubernetes cluster running version 1.27 or later. For instructions on connecting to your Kubernetes cluster, refer to the documentation provided by your cloud provider.

  • Install kubectl, the Kubernetes command-line tool.

  • Install Helm, the package manager for Kubernetes.

  • Install cert-manager in the namespace cert-manager.

To set up Jaeger Tracing for Seldon Core 2 on Kubernetes and visualize inference traces of the Seldon Core 2 components. You need to do the following:

Create a namespace

Create a dedicated namespace to install the Jaeger Operator and tracing resources:

kubectl create namespace tracing

Install Jaeger Operator

The Jaeger Operator manages Jaeger instances in the Kubernetes cluster. Use the Helm chart for Jaeger v2.

  1. Add the Jaeger to the Helm repository:

  1. Create a minimal tracing-values.yaml:

  1. Install or upgrade the Jaeger Operator in the tracing namespace:

  1. Validate that the Jaeger Operator Pod is running:

Output is similar to:

Deploy a minimal Jaeger instance

Install a simple Jaeger custom resource in the namespace seldon-mesh, where Seldon Core 2 is running.

This CR is suitable for local development, demos, and quick-start scenarios. It is not recommended for production because all components and trace data are ephemeral.

  1. Create a manifest file named jaeger-simplest.yaml with these contents:

  1. Apply the manifest:

  1. Verify that the Jaeger all-in-one pod is running:

Output is similar to:

This simplest Jaeger CR does the following:

  • All-in-one pod: Deploys a single pod running the collector, agent, query service, and UI, using in-memory storage.

  • Core 2 integration: receives spans from Seldon Core 2 components and exposes a UI for viewing traces.

Configure Seldon Core 2

To enable tracing, configure the OpenTelemetry exporter endpoint in the SeldonRuntime resource so that traces are sent to the Jaeger collector service created by the simplest Jaeger Custom Resource. The Seldon Runtime helm chart is located here.

  1. Find the seldonruntime Custom Resource that needs to be updated using: kubectl get seldonruntimes -n seldon-mesh

  2. Patch your Custom Resource to include tracingConfig under spec.config using:

Output is similar to:

  1. Check the updated .yaml file, using: kubectl get seldonruntime seldon -n seldon-mesh -o yaml

Output is similar to:

  1. Restart the following Core 2 component Pods so they pick up the new tracing configuration from the seldon-tracing ConfigMap in the seldon-mesh namespace.

  • seldon-dataflow-engine

  • seldon-pipeline-gateway

  • seldon-model-gateway

  • seldon-scheduler

  • Servers

After restart, these components reads the updated tracing config and start emitting traces to Jaeger.

Generate traffic

To visualize traces, send requests to your models or pipelines deployed in Seldon Core 2. Each inference request should produce a trace that shows the path through the Core 2 components such as gateways, dataflow engine, server agents in the Jaeger UI.

Access the Jaeger UI

  1. Port-forward the Jaeger query service to your local machine:

  1. Open the Jaeger UI in your browser:

You can now explore traces emitted by Seldon Core 2 components.

An example Jaeger trace is shown below:

trace

Last updated

Was this helpful?