Configuring NGINX Ingress Controller for Tracing

To configure NGINX ingress controller to send traces to observability tools in your Kubernetes cluster, perform the following steps.

    Procedure
  1. Add the following configuration values in the values.yaml of nginx-ingress chart:

    controller:    
      opentelemetry:      
        enabled: true    
      config:   
        use-forwarded-headers: "true"   
        enable-opentelemetry: "true"      
        log-level: debug      
        opentelemetry-config: /etc/nginx/opentelemetry.toml      
        opentelemetry-operation-name: HTTP $request_method $service_name $uri      
        opentelemetry-trust-incoming-span: "true"      
        otel-max-export-batch-size: "512"      
        otel-max-queuesize: "2048"      
        otel-sampler: AlwaysOn      
        otel-sampler-parent-based: "false"      
        otel-sampler-ratio: "1.0"      
        otel-schedule-delay-millis: "5000"      
        otel-service-name: nginx-proxy      
        otlp-collector-host: otel-userapp.dp-logs-05-10.svc      
        otlp-collector-port: "4317"
  2. Upgrade the existing NGINX ingress Helm chart.

After upgrading the existing Helm chart, in the observability dashboard, you can view traces for requests received by an application endpoint which are going through ingress controller.