Uploaded image for project: 'Serverless logic'
  1. Serverless logic
  2. SRVLOGIC-777

OpenTelemetry E2E automated IT in examples

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • 1.38.0
    • None
    • QE Test Suite
    • None
    • False
    • Hide

      None

      Show
      None
    • 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

              gmunozfe@redhat.com Gonzalo Muñoz Fernández
              gmunozfe@redhat.com Gonzalo Muñoz Fernández
              Dominik Hanak Dominik Hanak
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: