-
Task
-
Resolution: Unresolved
-
Undefined
-
None
-
None
-
False
-
-
False
-
-
Summary
Add a new automated integration-test example in kogito-examples that validates SonataFlow OpenTelemetry observability using a real Jaeger backend via Testcontainers.
These tests provide end-to-end verification that workflow executions produce correct traces, spans, and correlation data when exported via OTLP.
Goals
---- * A new Jaeger-backed SonataFlow example
- Testcontainers-based automated tests
- Jaeger query-based assertions
Motivation
OSL now emits enriched OpenTelemetry telemetry including:
- Transaction ID propagation (X-TRANSACTION-ID)
- Tracker headers (X-TRACKER-*)
- Workflow and node-level spans
- Lifecycle and error events
- Subflow and suite correlation
While runtimes include OTLP-mock based integration tests, a Jaeger-based example is required to validate that the full OTLP pipeline works against a real tracing backend as users would deploy.
Description
Validation must confirm in automated assertions in the example that:
- Workflow executions appear as traces in Jaeger
- Workflow nodes appear as spans
- Mandatory attributes are present
- Transaction IDs and tracker headers propagate correctly
Testing
1. New Example Module
Create a new example under:
serverless-workflow-examples/serverless-workflow-opentelemetry-jaeger-quarkus
Containing:
- Simple workflow
- Subflow workflow
- Error workflow
- OpenTelemetry + OTLP configuration
2. Testcontainers Infrastructure
Add a Testcontainers setup that:
- Starts Jaeger all-in-one with OTLP enabled
- Exposes:
-
- 4317 (OTLP gRPC)
-
- 16686 (Jaeger query/UI)
- Waits for Jaeger query API to be ready
3. Automated Integration Tests
Add Quarkus integration tests that:
Trace creation
- Execute a workflow
- Verify a trace appears in Jaeger
Span and attribute validation
- Verify spans contain:
-
- sonataflow.process.id
-
- sonataflow.process.instance.id
-
- sonataflow.process.instance.node
-
- service.name
-
- service.version
Transaction propagation
- Execute with X-TRANSACTION-ID
- Verify it appears in Jaeger tags
Fallback behavior
- Execute without X-TRANSACTION-ID
- Verify transactionId equals processInstanceId
Tracker propagation
- Execute with X-TRACKER-*
- Verify tags exist in spans
Subflow correlation
- Verify parent and subflow spans share transaction and root identifiers
Error visibility
- Execute failing workflow
- Verify Jaeger shows error state and error tags
Dependencies
---- * Jaeger (all-in-one) running on Docker
- OpenTelemetry enabled
- depends on
-
SRVLOGIC-760 Add OpenTelemetry support
-
- Release Pending
-