Introduction
Introduction in Data Aggregator Guide.
Introduction#
The Data Aggregator module is a core system component that processes OpenTelemetry Protocol (OTLP) span data to derive transaction-level and agent-level insights. It operates as a Spring Boot-based consumer of RabbitMQ Streams, enabling near real-time analysis of distributed tracing data. The module aggregates metrics, detects performance violations, and persists processed data for downstream analysis and visualization.
Module versions:
- Otel Collector: v1.3.0.
- RabbitMQ streams: v4.1.4.
- Data aggregator: v1.0.5.
Objectives of Data Aggregator#
The following are the objectives of the data aggregator:
Real-Time Data Processing: Consume OTLP span data from RabbitMQ Streams with minimal latency to enable near-real-time analytics. Metric Aggregation and Accuracy: Generate comprehensive transaction metrics, including total request count, success, slow, and failure counts, along with average, minimum, and maximum response times, and percentile metrics (P90, P95, and P99).
Out-of-Order Span Handling: Process out-of-order spans reliably using a delay-based mechanism to ensure accurate metric computation.
Data Persistence: Persist aggregated transaction and agent metrics in OpenSearch to enable historical analysis and visualization. Performance Violation Detection: Detect performance deviations based on configured thresholds and publish violation events for downstream alerting and remediation.
Scalability and Fault Tolerance: Support horizontal scalability and ensure graceful recovery from failures to maintain system reliability and availability.
Supported Capabilities#
The Data Aggregator module includes the following capabilities:
- Consumes OTLP span data from the otlp-spans RabbitMQ stream.
- Performs basic validation of incoming span data to ensure data integrity.
- Aggregates span data into agent-level and transaction-level metrics.
- Calculates key performance indicators (KPIs), including request counts, response time statistics, and percentile metrics.
- Handles out-of-order span data using a delay-queue-based mechanism.
- Persists aggregated data into the heal_collated_txn and heal_collated_agent_txn OpenSearch indices.
- Evaluates KPIs against configured thresholds to detect performance violations.
- Publishes violation events to a RabbitMQ queue for downstream consumers.
- Caches configuration data, including transactions, services, agents, KPIs, and rules, to improve processing efficiency.
Data Aggregation Core#
The Data Aggregation Core is responsible for ingesting, validating, aggregating, and managing OTLP trace data before metric collation.
- Receives raw TraceProto.TracesData from the RabbitMQ stream listener.
- Performs initial validation of spans, including the service name, agent identifier, presence of the root span, and HTTP method.
- Maps incoming spans to existing transactions using TxnMapper and cached rule definitions via cacheWrapper.getRuleBeans().
- Detects and registers new transactions by invoking addTransactionViaCC through a WebClient call to the Control Center.
- Calculates expirationTimeMillis for each DataKey to support out-of-order span handling.
- Adds validated spans to the AggregatorCache traceDelayQueue for delayed processing by the TraceDataGenerator.
- Uses the collate method as the primary entry point for processing incoming raw trace data.
Violation Detection#
The Violation Detection component evaluates aggregated metrics and generates violation events when configured thresholds are breached.
- Receives CollatedTransactionBase objects at the agent or service levels.
- Retrieves KPI violation configurations (TxnKPIViolationConfig) from the cache.
- Evaluates aggregated KPIs against configured threshold rules, including:
- Minimum and maximum limits.
- Greater-than or less-than conditions.
- In-range and out-of-range checks.
- Constructs ViolatedEventProtos. ViolatedEvent messages for all detected violations.
- Publishes violation events to the violated-events RabbitMQ queue for downstream processing.
Port Details#
The following are the port details:
- RabbitMQ DAG:
HTTPS Port (Desktop opening port): 15673 (if it's running on 2 different servers).
Note: If it's the same server, provide a new port number (next available port).
- HAProxy:
Stats Port: 9798.
Model Port: 4319.
- Data Aggregator & Data Aggregator (Collated)
JMX Port: 11119 (if it's running on 2 different servers).
Note: If it's the same server, provide a new port number (next available port).
- Otel Collector:
Port: 8888 (health details).
Port: 4320 (OTLP port).
- Otel Collector LB:
Port: 8889 (health details).
Port: 4321 (OTLP port).
- RabbitMQ Stream:
Port: 5553 (if it's running in 2 different servers)
Note: If it's same server then provide a new port number respectively (next available port).
CPU and Memory Allocation#
The following are the CPU & memory allocation details:
- CPU
| Modules | Assigned CPU in MHz |
|---|---|
| OS JIM | 8000 |
| DAG | 6000 |
| OTel | 2000 |
| OTel LB | 3000 |
| DAG RMQ | 2000 |
- Memory
| Modules | Assigned Memory in GB |
|---|---|
| OS JIM | 16 |
| DAG | 10 |
| OTel | 8 |
| OTel LB | 10 |
| DAG RMQ | 2 |
For example: For 1 million data spans, the utilized data is as follows:
- CPU
| Modules | Utilized CPU in Core |
|---|---|
| OS JIM | 9 |
| DAG | 5 |
| OTel | 3 |
| OTel LB | 4 |
| DAG RMQ | 1.5 |
- Memory
| Modules | Utilized Memory in GB |
|---|---|
| OS JIM | 12 |
| DAG | 7.5 |
| OTel | 3 |
| OTel LB | 4 |
| DAG RMQ | 0.7 |