Skip to content

feat: add tracing configuration to local-setup #907

@crstrn13

Description

@crstrn13

Problem

Currently, make local-setup does not configure distributed tracing for the local Kuadrant environment:

  • Jaeger is deployed (via tools namespace) but not configured in Kuadrant CR
  • Kuadrant operator does not have OTEL environment variables for control plane tracing
  • Control plane tracing tests skip locally due to missing OTEL configuration
  • Data plane tracing is not enabled in Kuadrant CR
  • Developers cannot debug reconciliation or request flows using traces

Current State

✅ Jaeger is already deployed (tools namespace)
❌ Kuadrant CR does not have data plane tracing configured
❌ Kuadrant operator does not have control plane OTEL env vars

Proposed Solution

1. Configure Kuadrant Operator OTEL (Control Plane Tracing)

Add OTEL environment variables to kuadrant-operator-controller-manager deployment:

env:
  - name: OTEL_EXPORTER_OTLP_ENDPOINT
    value: "http://jaeger-collector.<namespace>:4318"
  - name: OTEL_SERVICE_NAME
    value: "kuadrant-operator"
  - name: OTEL_TRACES_EXPORTER
    value: "otlp"
  - name: OTEL_EXPORTER_OTLP_PROTOCOL
    value: "http/protobuf"

2. Configure Kuadrant CR Data Plane Tracing

Update Kuadrant CR with tracing configuration:

apiVersion: kuadrant.io/v1beta1
kind: Kuadrant
metadata:
  name: kuadrant
spec:
  observability:
    tracing:
      defaultEndpoint: "jaeger-collector.<namespace>.svc.cluster.local:4318"
    dataPlane:
      defaultLevels:
        - debug: true

Benefits

  • ✅ Enables running full control plane tracing test suite locally
  • ✅ Enables data plane tracing tests locally
  • ✅ Developers can debug reconciliation issues with distributed traces
  • ✅ Developers can trace request flows through the entire stack
  • ✅ Local environment matches production tracing setup

Acceptance Criteria

  • Kuadrant operator has OTEL environment variables configured
  • Kuadrant CR includes observability.tracing configuration with Jaeger endpoint
  • Control plane tracing tests pass locally (not skipped)
  • Data plane tracing tests pass locally
  • Tracing tests pass on local-setup: make testsuite/tests/singlecluster/tracing/
  • Documentation updated with tracing setup instructions

Related

  • Control plane tracing tests: testsuite/tests/singlecluster/tracing/control_plane/
  • Data plane tracing tests: testsuite/tests/singlecluster/tracing/data_plane_tracing/
  • Issue Control Plane Tracing #866 - Control Plane Tracing implementation

Technical Notes

The require_tracing_enabled fixture in testsuite/tests/singlecluster/tracing/control_plane/conftest.py checks for OTEL environment variables on the operator deployment. Currently skips tests if not configured.

Metadata

Metadata

Assignees

Labels

enhancementImprovement to existing test

Type

No type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions