Skip to content

Commit 712983d

Browse files
Merge pull request #16 from nextinterfaces/adds-grafana
Adds Grafana and Prometheus reducing memory requirements
2 parents fbc0f6a + b6142f6 commit 712983d

File tree

3 files changed

+16
-11
lines changed

3 files changed

+16
-11
lines changed

apps/items-service/src/html.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,14 @@ export function getRootPageHtml(): string {
4444
4545
<p>A simple REST API service for managing items, built with Bun, Postgre, Jaeger and OpenTelemetry.</p>
4646
47-
<p><a href="/jaeger" target="_blank">Jaeger Open Telemetry</a></p>
48-
<p><a href="/metrics" target="_blank">Prometheus Metrics</a></p>
49-
<p><a href="/items/docs" target="_blank">Swagger Docs</a></p>
47+
<p><strong>Observability:</strong></p>
48+
<p><a href="/jaeger" target="_blank">Jaeger</a> - Distributed tracing</p>
49+
<p><a href="/prometheus" target="_blank">Prometheus</a> - Metrics collection</p>
50+
<p><a href="/grafana" target="_blank">Grafana</a> - Metrics visualization</p>
51+
<p><a href="/items/metrics" target="_blank">Metrics Endpoint</a> - Raw Prometheus metrics</p>
52+
53+
<p><strong>Documentation:</strong></p>
54+
<p><a href="/items/docs" target="_blank">Swagger Docs</a> - Interactive API documentation</p>
5055
5156
<p><strong>API Endpoints:</strong></p>
5257
<p><a href="/items/v1/health" target="_blank">/v1/health</a> - Service and database health check</p>

infra/k8s/observability/grafana-deployment.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,11 +149,11 @@ spec:
149149
mountPath: /var/lib/grafana
150150
resources:
151151
requests:
152-
memory: "256Mi"
153-
cpu: "100m"
152+
memory: "64Mi"
153+
cpu: "50m"
154154
limits:
155-
memory: "512Mi"
156-
cpu: "500m"
155+
memory: "128Mi"
156+
cpu: "200m"
157157
livenessProbe:
158158
httpGet:
159159
path: /api/health

infra/k8s/observability/prometheus-deployment.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ spec:
5656
mountPath: /prometheus
5757
resources:
5858
requests:
59-
memory: "512Mi"
60-
cpu: "200m"
59+
memory: "128Mi"
60+
cpu: "50m"
6161
limits:
62-
memory: "1Gi"
63-
cpu: "500m"
62+
memory: "256Mi"
63+
cpu: "200m"
6464
livenessProbe:
6565
httpGet:
6666
path: /-/healthy

0 commit comments

Comments
 (0)