OpenTelemetry Demo Architecture
Quick reference for the OpenTelemetry Demo microservices system. Focus on service dependencies, critical paths, and common failure patterns.
For detailed observability queries: See the Observability Query Guides section below for comprehensive metrics, traces, and logs references.
Service Dependency Matrix
| Service |
Language |
Depends On |
Protocol |
Memory Limit |
| frontend |
TypeScript |
ad, cart, checkout, currency, product-catalog, recommendation, shipping, image-provider |
gRPC |
250M |
| checkout |
Go |
cart, currency, email, payment, product-catalog, shipping, kafka |
gRPC, HTTP |
20M |
| cart |
.NET |
valkey-cart, flagd |
- |
160M |
| product-catalog |
Go |
flagd |
- |
20M |
| recommendation |
Python |
product-catalog, flagd |
gRPC |
50M |
| shipping |
Rust |
quote |
HTTP |
20M |
| payment |
JavaScript |
flagd |
- |
120M |
| ad |
Java |
flagd |
gRPC |
300M |
| email |
Ruby |
- |
- |
100M |
| currency |
C++ |
- |
- |
20M |
| quote |
PHP |
- |
- |
40M |
| fraud-detection |
Kotlin |
kafka, flagd |
TCP |
- |
| product-reviews |
Python |
product-catalog, llm, postgresql, flagd |
gRPC |
- |
| accounting |
.NET |
kafka, postgresql |
TCP |
- |
| frontend-proxy |
Envoy |
frontend, flagd, flagd-ui, image-provider |
HTTP |
65M |
| image-provider |
nginx |
- |
- |
120M |
| load-generator |
Python |
frontend-proxy, flagd |
HTTP |
120M |
Critical Service Paths
User Request Flow:
Internet → frontend-proxy:ENVOY_PORT → frontend → [cart, product-catalog, recommendation, checkout]
Checkout/Order Flow:
checkout → cart (gRPC)
→ currency (gRPC)
→ payment (gRPC)
→ product-catalog (gRPC)
→ shipping (HTTP) → quote (HTTP)
→ email (HTTP)
→ kafka → [accounting, fraud-detection]
Telemetry Flow:
All services → otel-collector:4317(gRPC)/4318(HTTP) → [jaeger, prometheus, tempo, opensearch]
→ grafana (visualization)
Observability Stack Details
Metrics Pipeline
Services → otel-collector (OTLP) → prometheus (scrape/remote-write) → grafana
Traces Pipeline
Services → otel-collector (OTLP) → [jaeger, tempo] → grafana
Logs Pipeline
Services → docker json-file → alloy → loki → grafana
Log Configuration
All services use json-file driver:
- Max size: 5M
- Max files: 2
- Auto-rotation
Observability Query Guides
Detailed reference guides for querying observability data:
Metrics Guide
See metrics-guide.md for:
- Complete Prometheus metrics catalog - All 260+ available metrics organized by category
- Service-specific metrics - Application metrics for each demo service
- HTTP/RPC metrics - Request rates, latencies, error rates
- Runtime metrics - Go, .NET, JVM, Node.js, Python runtime instrumentation
- Container metrics - CPU, memory, network, disk I/O
- Feature flag metrics - Flag evaluation and impression tracking
- OTEL Collector metrics - Pipeline health and throughput
- Common label patterns - Service identification, filtering, aggregation
- Query patterns - Request rates, error rates, percentiles, top-N
When to use: Building dashboards, investigating performance issues, analyzing resource utilization, monitoring service health.
Traces Guide
See traces-guide.md for:
- TraceQL syntax and patterns - Complete query language reference
- Resource attributes - Service, host, process, runtime identification (27 attributes)
- Span attributes - HTTP, gRPC, database, application-specific (150+ attributes)
- Event attributes - Exceptions, feature flags, business events
- Intrinsic attributes - Duration, status, kind, instrumentation
- Service-specific attributes - Cart, product, payment, shipping, ad service patterns
- Common query patterns - Error investigation, performance analysis, feature flag impact
When to use: Debugging distributed transactions, investigating latency issues, understanding service dependencies, tracing business transactions.
Logs Guide
See logs-guide.md for:
- LogQL syntax and patterns - Complete query language reference
- Available labels - service_name, container, project (5 labels)
- Service identification - All 16 application and infrastructure services
- Common query patterns - Errors, HTTP requests, performance, business events
- Log parsing - JSON parsing, pattern extraction, label filtering
- Aggregations - Count, rate, percentiles, error percentages
- Multi-service analysis - Cross-service errors, communication tracing
When to use: Investigating errors, debugging application logic, analyzing request patterns, root cause analysis.
1---2name: otel-demo-architecture3description: OpenTelemetry Demo system architecture reference for debugging service dependencies, port conflicts, memory issues, telemetry gaps, and performance problems. Use when analyzing failures, understanding service topology, troubleshooting communication issues, or investigating system bottlenecks in the OTel demo environment.4---5
6# OpenTelemetry Demo Architecture
7
8Quick reference for the OpenTelemetry Demo microservices system. Focus on service dependencies, critical paths, and common failure patterns.
9
10**For detailed observability queries**: See the [Observability Query Guides](#observability-query-guides) section below for comprehensive metrics, traces, and logs references.
11
12## Service Dependency Matrix
13
14| Service | Language | Depends On | Protocol | Memory Limit |
15|---------|----------|------------|----------|--------------|
16| **frontend** | TypeScript | ad, cart, checkout, currency, product-catalog, recommendation, shipping, image-provider | gRPC | 250M |
17| **checkout** | Go | cart, currency, email, payment, product-catalog, shipping, kafka | gRPC, HTTP | 20M |
18| **cart** | .NET | valkey-cart, flagd | - | 160M |
19| **product-catalog** | Go | flagd | - | 20M |
20| **recommendation** | Python | product-catalog, flagd | gRPC | 50M |
21| **shipping** | Rust | quote | HTTP | 20M |
22| **payment** | JavaScript | flagd | - | 120M |
23| **ad** | Java | flagd | gRPC | 300M |
24| **email** | Ruby | - | - | 100M |
25| **currency** | C++ | - | - | 20M |
26| **quote** | PHP | - | - | 40M |
27| **fraud-detection** | Kotlin | kafka, flagd | TCP | - |
28| **product-reviews** | Python | product-catalog, llm, postgresql, flagd | gRPC | - |
29| **accounting** | .NET | kafka, postgresql | TCP | - |
30| **frontend-proxy** | Envoy | frontend, flagd, flagd-ui, image-provider | HTTP | 65M |
31| **image-provider** | nginx | - | - | 120M |
32| **load-generator** | Python | frontend-proxy, flagd | HTTP | 120M |
33
34## Critical Service Paths
35
36**User Request Flow:**
37```
38Internet → frontend-proxy:ENVOY_PORT → frontend → [cart, product-catalog, recommendation, checkout]
39```
40
41**Checkout/Order Flow:**
42```
43checkout → cart (gRPC)
44 → currency (gRPC)
45 → payment (gRPC)
46 → product-catalog (gRPC)
47 → shipping (HTTP) → quote (HTTP)
48 → email (HTTP)
49 → kafka → [accounting, fraud-detection]
50```
51
52**Telemetry Flow:**
53```
54All services → otel-collector:4317(gRPC)/4318(HTTP) → [jaeger, prometheus, tempo, opensearch]
55 → grafana (visualization)
56```
57
58## Observability Stack Details
59
60### Metrics Pipeline
61```
62Services → otel-collector (OTLP) → prometheus (scrape/remote-write) → grafana
63```
64
65### Traces Pipeline
66```
67Services → otel-collector (OTLP) → [jaeger, tempo] → grafana
68```
69
70### Logs Pipeline
71```
72Services → docker json-file → alloy → loki → grafana
73```
74
75### Log Configuration
76All services use json-file driver:
77- Max size: 5M
78- Max files: 2
79- Auto-rotation
80
81## Observability Query Guides
82
83Detailed reference guides for querying observability data:
84
85### Metrics Guide
86See [metrics-guide.md](references/metrics-guide.md) for:
87- **Complete Prometheus metrics catalog** - All 260+ available metrics organized by category
88- **Service-specific metrics** - Application metrics for each demo service
89- **HTTP/RPC metrics** - Request rates, latencies, error rates
90- **Runtime metrics** - Go, .NET, JVM, Node.js, Python runtime instrumentation
91- **Container metrics** - CPU, memory, network, disk I/O
92- **Feature flag metrics** - Flag evaluation and impression tracking
93- **OTEL Collector metrics** - Pipeline health and throughput
94- **Common label patterns** - Service identification, filtering, aggregation
95- **Query patterns** - Request rates, error rates, percentiles, top-N
96
97**When to use**: Building dashboards, investigating performance issues, analyzing resource utilization, monitoring service health.
98
99### Traces Guide
100See [traces-guide.md](references/traces-guide.md) for:
101- **TraceQL syntax and patterns** - Complete query language reference
102- **Resource attributes** - Service, host, process, runtime identification (27 attributes)
103- **Span attributes** - HTTP, gRPC, database, application-specific (150+ attributes)
104- **Event attributes** - Exceptions, feature flags, business events
105- **Intrinsic attributes** - Duration, status, kind, instrumentation
106- **Service-specific attributes** - Cart, product, payment, shipping, ad service patterns
107- **Common query patterns** - Error investigation, performance analysis, feature flag impact
108
109**When to use**: Debugging distributed transactions, investigating latency issues, understanding service dependencies, tracing business transactions.
110
111### Logs Guide
112See [logs-guide.md](references/logs-guide.md) for:
113- **LogQL syntax and patterns** - Complete query language reference
114- **Available labels** - service_name, container, project (5 labels)
115- **Service identification** - All 16 application and infrastructure services
116- **Common query patterns** - Errors, HTTP requests, performance, business events
117- **Log parsing** - JSON parsing, pattern extraction, label filtering
118- **Aggregations** - Count, rate, percentiles, error percentages
119- **Multi-service analysis** - Cross-service errors, communication tracing
120
121**When to use**: Investigating errors, debugging application logic, analyzing request patterns, root cause analysis.