Skip to content

Building an Integrated Observability Architecture with GitOps

Interactive Diagram

새 탭 ↗

Cramming Application, Node, and Kubernetes object state into a single OpenTelemetry Collector creates two problems immediately.

  • Blast radius: stateful processing like trace tail sampling and per-node log tailing running as a DaemonSet end up in the same process, so a single incident or resource contention drags down every other signal too.
  • Mismatched scaling axes: log/host-metric collection needs to scale per node, while trace/OTLP collection needs to scale with application throughput. Bundling them into one Deployment/DaemonSet forces over-provisioning for whichever axis dominates.

So in this environment the Collector is split into four role-specific deployments, and each backend (Loki/Mimir/Tempo) also gets its own storage/retention policy tuned to the signal’s characteristics.

Implementation snapshot (2025 development snapshot)

Section titled “Implementation snapshot (2025 development snapshot)”

The table below reflects the chart versions and component layout actually deployed. These values describe a single development environment (single replica, short retention) and are not production recommendations.

ComponentChartVersionDeployment modeRole
Lokiloki (Grafana)6.27.0Distributed modeLog storage/query
Mimirmimir-distributed5.6.0Distributed modeMetric storage/query
Tempotempo-distributed1.32.0Distributed modeTrace storage/query
Grafanagrafana8.9.0DeploymentUnified visualization
OpenTelemetry Collectoropentelemetry-collector0.117.11 Deployment + 3 DaemonSetsFour separated collection roles
kube-state-metricskube-state-metrics5.30.1Deployment, 1 replica28 Kubernetes object state collectors
prometheus-node-exporterprometheus-node-exporter4.44.1DaemonSetHost/node metrics
  • Every observability workload carries a toleration for the MGMT node pool, keeping it physically separate from application node pools.
  • Each component gets its own namespace using generic names (loki, mimir, tempo, grafana, otel-collector, etc.).

The deployment flow is fixed as Argo CD Application → Kustomize overlay → vendored Helm chart (Helm inflation). Instead of application code calling helm install directly, each component overlay inflates a vendored chart via Kustomize’s helmCharts feature.

# generic Argo CD Application example
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: observability-loki
namespace: argocd
spec:
project: platform
source:
repoURL: <gitops-repo>
targetRevision: develop
path: observability/loki/overlays/dev
destination:
server: https://kubernetes.default.svc
namespace: loki
syncPolicy:
automated:
prune: true
selfHeal: true
# generic Kustomize overlay: helm inflation + MGMT toleration patch
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
helmCharts:
- name: loki
repo: https://grafana.github.io/helm-charts
version: 6.27.0
releaseName: loki
valuesFile: values.yaml
patches:
- target:
kind: Deployment
patch: |-
- op: add
path: /spec/template/spec/tolerations/-
value:
key: node-role
operator: Equal
value: mgmt
effect: NoSchedule

Each component has its own overlay directory and values.yaml, so a PR changing Loki retention has no effect on Tempo or Mimir sync.

Signal routing: why the Collector is split into four roles

Section titled “Signal routing: why the Collector is split into four roles”

All four use the same OpenTelemetry Collector image, but deployment shape and pipeline configuration differ per role.

OpenTelemetry Collector receiving traces, metrics and logs through receivers, processing them and exporting to multiple backends Source: OpenTelemetry docs, Collector, The OpenTelemetry Authors, CC BY 4.0

  • otel-apps (Deployment): receives application OTLP trace/metric/log. Traces go through tail sampling to Tempo, spanmetrics-derived and general metrics go to Mimir, logs go to Loki. It attaches a service.instance.id resource attribute to distinguish multiple instances of the same service.
  • otel-loki (DaemonSet): reads /var/log/pods/*/*/*.log on every node via the filelog receiver, applies a container parser and Kubernetes attributes, and forwards to Loki.
  • otel-prometheus (DaemonSet): scrapes node/cAdvisor metrics via the kubeletstats receiver and remote-writes to Mimir.
  • otel-meta-monitoring (Deployment): aggregates kube-state-metrics plus Loki/Mimir/Tempo’s own metrics and the Collector’s own metrics, sending them to Mimir. This is the role that watches the LGTM stack itself.

The role split follows a simple rule: Deployments fit application-scoped processing that scales with usage, DaemonSets fit node-scoped processing that scales with node count.

PlantUML Diagram
PlantUML Diagram
  • Loki, Mimir, and Tempo all use Azure object storage as their backend.
  • Loki retention is set to 24h and Tempo block retention to 168h, both are development-environment cost/convenience calls, and long-term retention would need a separate policy.
  • Most components (distributor/ingester/querier, etc.) run at 1 replica. This is effectively a replication factor of 1: a node failure can make that entire component briefly unavailable. Production would need at least 3 replicas with anti-affinity.
  • There’s no ServiceMonitor/Prometheus Operator-based discovery. Scrape targets are explicitly defined in the OTel Collector pipelines.
ItemCurrent implementation (dev snapshot)Production hardening
Replica countMostly 1At least 3, with anti-affinity
Loki retention24hExtend to meet audit/compliance needs
Tempo retention168hRe-evaluate against cost and query needs
AlertingNot configuredIntroduce Mimir Ruler/Alertmanager, Loki Ruler
Dashboard provisioningJSON export only, not auto-wiredConfigMap/sidecar-based auto-provisioning

This post is the entry point of the sub-series. The actual pipeline details continue in the four posts below.

  1. Building an Integrated Observability Architecture with GitOps (this post)
  2. Kubernetes Log Pipeline: From OpenTelemetry Collector to Loki
  3. Kubernetes Metrics Pipeline: From Exporters and OTel Collector to Mimir
  4. Distributed Trace Pipeline: From Tail Sampling to Tempo Service Graphs
  5. Operating Grafana Dashboards: Signal Correlation and GitOps Boundaries

Splitting the Collector by role and separating backends by signal characteristics keeps a failure in one signal path from propagating to the others. But it’s worth being clear that this is still a single-replica development snapshot. The next posts walk through each signal’s actual pipeline one at a time.