diff --git a/cmd/jaeger/internal/integration/README.md b/cmd/jaeger/internal/integration/README.md index 3c97bfddbd0..ea6370bc014 100644 --- a/cmd/jaeger/internal/integration/README.md +++ b/cmd/jaeger/internal/integration/README.md @@ -63,6 +63,56 @@ flowchart LR end ``` +## Kafka Integration + +The primary difference between the Kafka integration tests and other integration tests lies in the flow of data. In the standard tests, spans are written by the SpanWriter, sent through an RPC_client directly to a receiver, then to an exporter, and stored in an in-memory backend. Spans are read by the SpanReader, which queries the jaeger_query process accessing the storage backend. In contrast, the Kafka tests introduce Kafka as an intermediary. Spans go from the SpanWriter through an RPC_client to an OTLP receiver in the Jaeger Collector, exported to Kafka, received by the Jaeger Ingester, and then stored. For details, see the [Architecture](#KafkaArchitecture) section below. + + +## Kafka Architecture + +``` mermaid +flowchart LR + Test -->|writeSpan| SpanWriter + SpanWriter --> RPCW[RPC_client] + RPCW --> OTLP_Receiver[Receiver] + OTLP_Receiver --> CollectorExporter[Kafka Exporter] + CollectorExporter --> Kafka[Kafka] + Kafka --> IngesterReceiver[Kafka Receiver] + IngesterReceiver --> IngesterExporter[Exporter] + IngesterExporter --> StorageBackend[(In-Memory Store)] + Test -->|readSpan| SpanReader + SpanReader --> RPCR[RPC_client] + RPCR --> QueryProcess[jaeger_query] + QueryProcess --> StorageBackend + IngesterExporter -.-> StorageCleaner + StorageCleaner --> StorageBackend + + subgraph Integration_Test_Executable + Test + SpanWriter + SpanReader + RPCW + RPCR + end + + subgraph Jaeger Collector + OTLP_Receiver + CollectorExporter + end + + subgraph Jaeger Ingester + IngesterReceiver + IngesterExporter + QueryProcess + StorageBackend + StorageCleaner[Storage Cleaner Extension] + end + + subgraph Kafka Buffer + Kafka + end +``` + ## Running tests locally All integration tests can be run locally. diff --git a/plugin/storage/integration/integration.go b/plugin/storage/integration/integration.go index f9ca020c41d..19dbf826c85 100644 --- a/plugin/storage/integration/integration.go +++ b/plugin/storage/integration/integration.go @@ -49,7 +49,7 @@ var fixtures embed.FS // - in those functions it instantiates and populates this struct // - it then calls RunAll. // -// Some implementations may declate multuple tests, with different settings, +// Some implementations may declare multiple tests, with different settings, // and RunAll() under different conditions. type StorageIntegration struct { SpanWriter spanstore.Writer @@ -541,4 +541,4 @@ func (s *StorageIntegration) RunSpanStoreTests(t *testing.T) { t.Run("GetTrace", s.testGetTrace) t.Run("GetLargeSpans", s.testGetLargeSpan) t.Run("FindTraces", s.testFindTraces) -} +} \ No newline at end of file