How bhanuwealthy/otel-demo works
Project type and purpose
• This is a small microservice demo (“otel-demo”) showcasing end-to-end observability using OpenTelemetry.
• It includes two Go services (order, user), a Python-based traffic generator, backing data stores (MongoDB, Redis), an OTel Collector, and the observability backend (Tempo for traces, VictoriaMetrics for metrics, Grafana).
• Local deployment manifests live under kind-deployments and local-setup, indicating a Kubernetes-based local cluster.
Break out the top-level components
a. Microservices layer
• user-service (Go)
• order-service (Go)
b. Traffic generator
• py-project/run.py + postman.js (simulates client calls)
c. Data layer
• MongoDB (persistent user/order data)
• Redis (cache or auxiliary store)
d. Observability pipeline
• Instrumentation libraries (utils/otel.go, middleware.go) embedded in services
• OpenTelemetry Collector (receives traces & metrics)
• Tempo (distributed trace store)
• VictoriaMetrics (time-series metrics store)
e. Visualization
• Grafana dashboards (datasources configured via local-setup/grafana-datasources.yaml)
Relationships and data-flows
• Traffic generator → user-service & order-service (HTTP calls)
• user-service ↔ MongoDB
• order-service ↔ MongoDB (and/or Redis)
• Each service → OTel Collector (OTLP export of traces & metrics)
• Collector → Tempo (traces)
• Collector → VictoriaMetrics (metrics)
• Grafana → Tempo & VictoriaMetrics (reads data for dashboards)
Architectural patterns and design principles
• Microservices loosely coupled via HTTP/REST
• Centralized observability pipeline (Collector) decouples instrumentation from backends
• Infrastructure as Code: Kubernetes manifests (kind-deployments) + local-setup for local docker/kind cluster
• Clear separation of concerns: application code, infra code, docs