Optimize workflow performance
To maintain high performance in Red Hat Developer Hub, you must identify and resolve execution delays. Use distributed tracing to visualize the execution path and workflows and determine where time is spent across service boundaries.
Collect distributed traces Copy linkLink copied!
To monitor workflows in Red Hat Developer Hub, you must enable distributed tracing. Distributed tracing shows the executed path of workflow steps and identifies where failures occur.
Before you begin Copy linkLink copied!
- You have installed and configured the SonataFlow Operator.
- You have
cluster-adminor equivalent permissions to deploy observability infrastructure and modify ConfigMaps. - A Kubernetes or OpenShift cluster is available.
About this task Copy linkLink copied!
To enable observability features such as tracing and metrics in the SonataFlow runtime, you must add the OpenTelemetry addon and configure the workflow properties. The sonataflow-addons-quarkus-opentelemetry addon provides a standard configuration with minimal setup required.
The OpenTelemetry integration for SonataFlow includes the following capabilities:
- Distributed tracing: Track workflow execution across services and steps.
- Metrics collection: Monitor performance, duration, and success rates.
- Log aggregation: Centralize logs with trace correlation.
- Context propagation: Maintain trace context across workflow boundaries and asynchronous operations.
Procedure Copy linkLink copied!
Results Copy linkLink copied!
- Verify that the OpenTelemetry addon is loaded by checking the pod logs:
oc logs -n workflows deployment/onboarding-workflow | grep "sonataflow-addons-quarkus-opentelemetry" - Verify the trace report status:
oc logs -n workflows deployment/greeting | grep -i "export\|batch" - Confirm that the observability backend, such as
Jaeger, is receiving data:oc logs -n observability deployment/jaeger | grep -i "span\|trace"
Route workflow traces to existing observability tools Copy linkLink copied!
Route workflow traces to the observability tools your team already uses instead of learning a new system. Exporter configuration sends telemetry data to Jaeger, Grafana, or any OTLP-compatible platform.
Before you begin Copy linkLink copied!
- You have enabled OpenTelemetry in your workflow.
- An observability platform (Jaeger or OpenTelemetry Collector) is available in your cluster.
Procedure Copy linkLink copied!
Troubleshoot trace connectivity Copy linkLink copied!
Symptom-to-solution reference table for missing traces, authentication failures, and broken context propagation. Use this troubleshooting guide when traces fail to appear in Jaeger, authentication errors occur, or telemetry delivery stops working.
| Symptom | Potential cause | Resolution |
|---|---|---|
|
Traces do not appear in the dashboard. |
OpenTelemetry is disabled or the endpoint is unreachable. |
Verify the |
|
Authentication errors ( |
Missing or invalid authorization headers. |
Configure the |
|
High memory usage in the collector. |
Large telemetry batches or high traffic volume. |
Implement a |
|
Context is lost between workflow steps. |
Incorrect propagator configuration. |
Ensure |
Diagnose missing traces Copy linkLink copied!
- Verify that OpenTelemetry is enabled in the workflow ConfigMap:
oc get cm <workflow-name>-props -n workflows -o yaml- Check the pod logs for initialization errors:
oc logs deployment/<deployment-name> -n workflows | grep -i "otel" - Test the connection to the Jaeger collector from within the workflow pod:
oc exec deployment/<deployment-name> -- curl -v http://jaeger-collector:4317
- Check the pod logs for initialization errors:
- Configure authentication headers. If your observability platform requires authentication, add the following property to your
application.propertiesfile:quarkus.otel.exporter.otlp.headers=authorization=Bearer ${API_TOKEN} - Resolve context propagation issues. To ensure trace IDs are maintained across service boundaries, configure the following propagators and enable JSON logging to verify the IDs in the output:
# Include required propagators
quarkus.otel.propagators=tracecontext,baggage,jaeger
# Enable JSON logging to verify trace IDs
quarkus.log.console.json=true