Connectivity Link tracing
Connectivity Link supports tracing at both the control plane and data-plane levels.
Connectivity Link exports control-plane traces to your OpenTelemetry Collector so that you can observe reconciliation loops and internal operations. This is useful for debugging controller behavior, understanding operator performance, and tracking policy lifecycle events.
Data-plane tracing traces actual user requests through the gateway and policy enforcement components. You can see request flows through Istio, Authorino, Limitador, and the wasm-shim module. Data-plane tracing is useful for debugging request-level issues and policy enforcement.
To use tracing, you must configure both types of tracing. You must configure the kuadrant custom resource (CR) for the data plane. For control plane tracing, you must configure each operating component separately, such as the kuadrant-operator, authorino-operator, and limitador-operator deployments. This configuration sends traces to the same collector, providing a complete view of your Connectivity Link system from policy reconciliation to request processing.
Correlating control plane and data plane traces
Even though control plane and data plane traces are separate, you can correlate them. For example, create a RateLimitPolicy to understand how traces work together to show all events.
-
Create a RateLimitPolicy at
15:30:00, then view the control plane trace to see the following events:-
Policy reconciliation completed at
15:30:05. -
Limitador configuration updated.
-
wasm-shimconfiguration updated.
-
-
Next, send a test request at
15:30:10, then view data plane trace to see the following events:-
Request processed through the
wasm-shimmodule. -
Rate limit check sent to Limitador.
-
Response returned.
-
You can use a similar pattern of action for any events that you want to correlate manually. This type of correlation is useful in development environments.
Control-plane tracing environment variables
You can enable control tracing in Connectivity Link by setting OpenTelemetry environment variables in the deployment. The method for setting the variables depends on your deployment approach, for example, whether you used the Operator Lifecycle Manager (OLM) or YAML manifests.
Control plane traces appear under the service name kuadrant-operator in the Grafana dashboard.
| Variable | Description | Default |
|---|---|---|
|
OTLP collector endpoint URL, for example,
|
Tracing disabled |
|
Override endpoint specifically for traces |
Uses |
|
Use insecure connection to collector; set to |
|
|
Service name for traces |
|
|
Service version for telemetry data |
Empty |
Configure data plane tracing in Connectivity Link
Enable data plane tracing in OpenShift Service Mesh with the kuadrant CR. You must perform these steps on each OpenShift Container Platform cluster that you want to use Connectivity Link on.
-
You installed Connectivity Link.
-
You are logged into a running OpenShift Container Platform cluster as an administrator.
-
You have Red Hat OpenShift Distributed Tracing Platform installed and configured to support OpenTelemetry.
-
You installed a compatible version of OpenShift Service Mesh.
-
Enable tracing in OpenShift Service Mesh by configuring your
Telemetrycustom resource (CR) as follows:Example OpenShift Service Mesh Telemetry CR with tracingapiVersion: telemetry.istio.io/v1alpha1 kind: Telemetry metadata: name: mesh-default namespace: gateway-system spec: tracing: - providers: - name: tempo-otlp randomSamplingPercentage: 100 # ... -
Apply the configuration by running the following command:
$ oc apply -f mesh-default.yaml -
Configure a tracing extension provider for OpenShift Service Mesh in your
IstioCR by adding a list value to thespec.values.meshConfig.extensionProvidersparameter. Ensure that you also add theotelport and service information:Example Istio CR with tracing extension providerapiVersion: operator.istio.io/v1alpha1 kind: Istio metadata: name: default spec: namespace: gateway-system values: meshConfig: defaultConfig: tracing: {} enableTracing: true extensionProviders: - name: tempo-otlp opentelemetry: port: 4317 service: tempo.tempo.svc.cluster.local # ...ImportantIf you are setting the controller manually, you must set the OpenTelemetry protocol (OTLP) in the
ServiceCR portnameandappProtocolfields. For example, when using gRPC, the port name should begin withgrpc-or theappProtocolshould begrpc:kind: Service apiVersion: v1 metadata: name: otel-collector spec: ports: - name: otlp-grpc port: 4317 targetPort: 4317 appProtocol: grpc selector: app: otel-collector # ... -
Apply the configuration by running the following command:
$ oc apply -f istio.yaml -
Optional. If you want to collect
AuthorinoandLimitadortraces in a different location than yourKaudranttraces, complete the following steps:-
Enable request tracing in your
Authorinocustom resource (CR) and send authentication and authorization traces to the central collector as follows:Example Authorino CR with request tracingapiVersion: operator.authorino.kuadrant.io/v1beta1 kind: Authorino metadata: name: authorino spec: tracing: endpoint: rpc://authorino-collector:4317 insecure: true # ...Set
insecuretotrueto skip TLS certificate verification in development environments. Set tofalsefor production environments. -
Apply the configuration by running the following command:
$ oc apply -f authorino.yaml -
Enable request tracing in your
LimitadorCR and send rate limit traces to the central collector as follows:Example Limitador CR with request tracingapiVersion: limitador.kuadrant.io/v1alpha1 kind: Limitador metadata: name: limitador spec: tracing: endpoint: rpc://limitador-collector:4317 insecure: true # ...Set
insecuretotrueto skip TLS certificate verification in development environments. Set tofalsefor production environments. -
Apply the configuration by running the following command:
$ oc apply -f limitador.yamlImportantTrace IDs do not propagate to WebAssembly modules in OpenShift Service Mesh. This means that requests passed to Limitador do not have the relevant parent trace ID. However, if the trace initiation point is outside OpenShift Service Mesh, the parent trace ID is available to Limitador and included in traces. This impacts correlating traces from Limitador with traces from Authorino, the gateway, and any other components in the request path.
-
-
Configure data-plane tracing in the
KuadrantCR by providing the collector endpoint as shown in the following example:ExamplekuadrantCRapiVersion: kuadrant.io/v1beta1 kind: Kuadrant metadata: name: kuadrant namespace: kuadrant-system spec: observability: dataPlane: defaultLevels: - debug: "true" httpHeaderIdentifier: x-request-id tracing: defaultEndpoint: rpc://tempo.tempo.svc.cluster.local:4317 insecure: true-
spec.observability.dataPlane.defaultLevels: Set this value to enable trace filtering at the required level, for exampledebug: "true"for debug-level trace filtering. -
spec.observability.tracing.defaultEndpoint: The URL of the tracing collector backend, such as the OTLP endpoint. Userpc://,gRPC OTLP,port 4317, for full compatibility across all components. -
spec.observability.tracing.insecure: Set totrueto skip TLS certificate verification in development environments. Set tofalsefor production environments.ImportantPoint to the collector service, such as the Distributed Tracing Platform, not the query service. The collector receives traces from your applications. The query service is only for viewing traces in the GUI.
-
-
Apply the configuration by running the following command:
$ oc apply -f kuadrant.yaml
-
Verify that the CR applied successfully by listing the objects of that
Kindby running the following command:$ oc get kuadrant
Data-plane tracing configuration fields
You can enable data-plane tracing in OpenShift Service Mesh by configuring tracing with the Kuadrant custom resource (CR).
The Kuadrant CR directs traces to a central collector for improved observability and troubleshooting. To view traces, first configure defaultLevels in the Kuadrant CR, then view traces in your tracing GUI, such as Grafana.
- Data-Plane Configuration Fields
-
-
defaultLevels: Controls the OpenTelemetry trace filtering level for thewasm-shimmodule. This determines which trace spans are exported to your tracing collector.-
Supported levels from the highest to lowest verbosity:
DEBUG,INFO,WARN,ERROR. Default value isWARN. -
Priority means that the highest level set wins:
DEBUG>INFO>WARN>ERROR.
-
-
httpHeaderIdentifier: Specifies the HTTP header name used to correlate requests in traces, such asx-request-id.
-
|
Important
|
The To see debug logs in gateway pods, you must configure the Envoy log level separately. |