Observability experiments using Bun, Postgre, OpenTelemetry and more 👇
Grafana - Metrics dashboard
Prometheus queries using these raw /metrics
Jaeger - Distributed tracing
Loki - Log aggregation
Kubernetes Dashboard:
Headlamp - copy token 👉 for login (read only access)
Items service:
API Docs,
Health Check,
Loki logs,
Grafana Metrics,
Metrics endpoint,
Semantic cache service:
API Docs,
Health Check,
Loki logs,
Grafana Metrics,
Metrics endpoint,
Architecture
graph TB
%% Client
subgraph ClientLayer["Client Layer"]
Client[HTTP Client]
end
%% Application
subgraph AppLayer["Application Layer"]
App[items-service]
ItemsEndpoint[/items endpoint/]
MetricsEndpoint[/metrics endpoint/]
OTel[OpenTelemetry SDK]
Logs[Application Logs]
end
%% Observability
subgraph ObsLayer["Observability Stack"]
Prometheus[Prometheus Metrics]
Jaeger[Jaeger Tracing]
Grafana[Grafana Dashboards]
subgraph LogPipeline["Logs Pipeline"]
Promtail[Promtail / FluentBit Log Agent]
LogStore[Loki / OpenSearch / Elastic]
end
end
%% Data Layer (bottom)
subgraph DataLayer["Data Layer"]
DB[(PostgreSQL Database)]
end
%% Request Flow
Client -->|HTTP requests| App
App --> ItemsEndpoint
ItemsEndpoint -->|SQL queries| DB
%% Metrics Flow
App --> MetricsEndpoint
Prometheus -.->|scrapes metrics| MetricsEndpoint
Grafana -.->|reads metrics| Prometheus
%% Tracing Flow
App -->|trace spans| OTel
OTel -->|OTLP| Jaeger
Grafana -.->|trace links| Jaeger
%% Logs Flow
App -->|stdout logs| Logs
Promtail -.->|reads logs| Logs
Promtail -->|pushes logs| LogStore
Grafana -.->|logs query| LogStore
%% Styling
style App fill:#e85d04,stroke:#dc2f02,stroke-width:3px,color:#fff
style ItemsEndpoint fill:#ffba08,stroke:#faa307,stroke-width:2px,color:#000
style MetricsEndpoint fill:#ffba08,stroke:#faa307,stroke-width:2px,color:#000
style OTel fill:#f5a800,stroke:#d89000,stroke-width:2px,color:#000
style Logs fill:#6c757d,stroke:#495057,stroke-width:2px,color:#fff
style DB fill:#336791,stroke:#2d5a7b,stroke-width:2px,color:#fff
style Prometheus fill:#e6522c,stroke:#c93a1f,stroke-width:2px,color:#fff
style Jaeger fill:#60d0e4,stroke:#4db8ca,stroke-width:2px,color:#000
style Grafana fill:#f46800,stroke:#d85600,stroke-width:2px,color:#fff
style Promtail fill:#1f78b4,stroke:#145684,stroke-width:2px,color:#fff
style LogStore fill:#7cb342,stroke:#558b2f,stroke-width:2px,color:#fff
style LogPipeline fill:#ffffff,stroke:#999,stroke-width:1px,color:#000