Part 1 of 2 · Operations and Observability
Which open-source observability stack can you self-host, and what does compliance change?
OpenTelemetry to collect, Prometheus or VictoriaMetrics for metrics, Loki or OpenSearch for logs, Tempo or Jaeger for traces, Grafana on top, or SigNoz in one box. What each costs to run, what the licences mean for a SaaS, and the compliance work you can't skip: redaction, retention, access and…
Short answer: a well-trodden self-hosted stack is:
- OpenTelemetry to collect metrics, logs and traces from your services;
- Prometheus (or VictoriaMetrics) for metrics;
- Loki (or OpenSearch) for logs;
- Tempo (or Jaeger) for traces;
- Grafana for dashboards and alerts;
- or SigNoz for metrics, logs and traces in one product on ClickHouse.
And the twist, as we’ll see: compliance changes less the choice of tools than what you do with the data:
- redact personal data before it’s stored;
- set retention deliberately, and delete on schedule;
- restrict and log who can read logs;
- keep data in the right region;
- check the licences, which matters most for a SaaS offering observability features to customers.
It’s a good time to be working this case. A few years ago, a self-hosted stack meant gluing together tools that disagreed about everything; now OpenTelemetry gives them a common language, and the open-source options are excellent. The mystery has moved from “can we see it?” to “should we be keeping it?”, and that second question is the more interesting one.
Case file
The case Logs quietly collect personal data, then keep it and show it to every engineer Suspects The choice of tools, the AGPL licence Culprit What you do with the data, not which tools store it The fix Redact at the collector, retention enforced by storage, restricted access, data kept in-region
The cast of characters #
Here’s the line-up, one row per job.
| Signal | Options | Licence | Notes |
|---|---|---|---|
| Collection | OpenTelemetry SDKs + Collector | Apache 2.0 | One standard for metrics, logs and traces; the Collector filters, redacts, samples and routes |
| Metrics | Prometheus | Apache 2.0 | The standard; one server per environment; long-term storage needs an add-on |
| VictoriaMetrics (open-source edition) | Apache 2.0 | Prometheus-compatible, efficient long-term storage | |
| Grafana Mimir | AGPLv3 | Horizontally scalable, multi-tenant Prometheus storage | |
| Logs | Grafana Loki | AGPLv3 | Indexes labels, not full text: cheap to store, slower for free-text search |
| OpenSearch | Apache 2.0 | Full-text search and analytics; heavier to run | |
| Traces | Grafana Tempo | AGPLv3 | Object-storage backed, cheap at volume |
| Jaeger | Apache 2.0 | Mature, CNCF; the trace UI many people know | |
| Dashboards and alerts | Grafana | AGPLv3 | Works across all of the above |
| All in one | SigNoz | Open-source core (check its licence file for enterprise features) | Metrics, logs and traces on ClickHouse, with one UI |
Licences as published by each project in late 2026. Grafana Labs moved Grafana, Loki and Tempo to AGPLv3 in 2021; licences can change, so check before you adopt.
Diagram source
flowchart LR
A["Services with OpenTelemetry SDKs"] --> C["OpenTelemetry Collector: redact, sample, route"]
C --> M["Prometheus: metrics"]
C --> L["Loki: logs"]
C --> T["Tempo or Jaeger: traces"]
M --> G["Grafana: dashboards and alerts"]
L --> G
T --> G
The fine print: what the licences mean for a SaaS #
- Apache 2.0 (Prometheus, OpenTelemetry, Jaeger, OpenSearch, VictoriaMetrics’ open-source edition): use, modify and run freely, with attribution.
- AGPLv3 (Grafana, Loki, Tempo, Mimir): you can run them unmodified for your own operations without publishing anything. If you modify them and let users interact with them over a network (for example, embedding modified Grafana dashboards in your product), you must offer your modified source to those users.
The AGPL is the suspect people worry about most, and usually it’s a red herring. Most companies run AGPL observability tools internally without issue. Have counsel review the licences if observability is part of what you sell; this is a summary, not legal advice.
Case 1: a small SaaS on one or two VMs #
The goal: answer “is it up, is it slow, and why?” with the least to run.
What I’d use:
- OpenTelemetry SDKs in the app (or Prometheus client libraries for metrics), sending to one OpenTelemetry Collector.
- Prometheus for metrics and alerting rules; Loki for logs; Tempo or Jaeger for traces.
- Grafana for dashboards, with alerts to email or chat.
- Or SigNoz as a single deployment, if you’d rather run one product than four.
Keep it modest:
- 15-30 days of detailed retention, longer for downsampled metrics;
- sampling for traces (keep all errors and slow requests, sample the rest);
- the stack on its own small VM, so an incident in the app doesn’t take monitoring down with it. A detective who shares a room with the suspect tends to disappear at the worst moment.
A Server-Timing header and traces with spans for queries, pool waits and outgoing calls cover most “why is it slow?” questions. My latency-debugging lab shows that setup with OpenTelemetry and Jaeger, and the lag-debugging post shows how to read it.
Case 2: preparing for SOC 2 or ISO 27001 #
There’s something refreshing about how these frameworks work. They don’t prescribe tools. They expect you to define controls and show they operate. For observability, the evidence they want usually means:
- Logging of security-relevant events: authentication, privilege changes, administrative actions, access to sensitive data, plus cloud audit logs (CloudTrail on AWS).
- Defined retention: written down, matching the policy, and enforced by the storage itself, not by hand. Many organisations choose about a year for security and audit logs and shorter periods for debug logs; your auditor and your policy decide the numbers.
- Protected logs: restricted write and delete permissions, tamper-evidence for audit logs (for example, CloudTrail log-file validation, or object lock on the bucket).
- Access control on the observability stack itself: single sign-on, roles, and a record of who looked at what.
- Alerting that reaches a person, and incidents recorded.
The audit post covers the rest of the evidence auditors ask for.
Case 3: personal data in logs (GDPR, India’s DPDP Act) #
The crime: logs collect personal data by accident: emails in URLs, names in error messages, IP addresses, whole request bodies. Then they keep it, replicate it and show it to every engineer with dashboard access. Nobody decided this; it just happened, one helpful log line at a time. Under GDPR and India’s Digital Personal Data Protection Act, 2023, that data needs a purpose, minimisation, protection and deletion like any other.
This is the case I find most rewarding to solve, because the fix is mostly a matter of care rather than cost.
What I’d do:
- Don’t log what you don’t need: no request or response bodies by default; IDs instead of names and emails.
- Redact at the collector, before storage: the OpenTelemetry Collector’s processors can drop or hash attributes, and rewrite values matching patterns (emails, card numbers, tokens). Doing it centrally catches what individual services forget, and that’s the elegant part: one choke point protects every service behind it.
- Keep it in-region: run the observability stack in the same region as the data it describes, when residency is required.
- Delete on schedule: retention enforced by the storage (Loki and Tempo retention, object-storage lifecycle rules), so “delete after 30 days” actually happens.
- Restrict access by role: not every engineer needs production logs that may contain personal data.
Case 4: when self-hosting stops being cheaper #
Self-hosting saves licence fees and keeps data under your control. The hidden cost is the clue people miss:
- storage and compute that grow with your traffic;
- upgrades and capacity planning for several components;
- on-call for the monitoring system itself, because if it’s down during an incident, you’re blind.
Managed services (Grafana Cloud, Datadog, New Relic, and cloud providers’ own tools) charge by data volume, hosts or users, and remove that work. Compare honestly at your volume, including the engineering hours. A common middle path: self-host the high-volume data that is cheap to store yourself (usually metrics, often logs) and pay a managed service for the parts that are hard to run well, such as tracing at scale or on-call alerting. Some teams split it the other way round.
Remember this
- OpenTelemetry first, so the backend can change without touching every service.
- Redact at the collector, before anything is stored.
- Retention and access are policies the storage must enforce, not habits.
Case closed: what I’d do by default #
- Instrument with OpenTelemetry, so the backend can change without touching every service.
- Prometheus + Loki + Tempo + Grafana (or SigNoz) for a small team; budget a day a month to keep it healthy.
- Redact at the collector, and minimise what’s logged from the start; retrofitting it is much harder.
- Write the retention and access policy, then enforce it in configuration.
- Run monitoring separately from what it monitors, with its own alerts.
- Check licences before modifying or embedding any component in your product.
As an engineering lead, I’ve defined organisation-wide observability standards, and before that built AWS-based observability pipelines for service health, uptime and API latency. The solution that lasts is the same each time: standard instrumentation, a few dashboards everyone trusts, alerts that mean something, and data that’s minimised and retained on purpose.
That’s the quiet pleasure of good observability: it lets you see your system clearly while respecting the people whose data passes through it.
Comments
No comments yet.
Sign in to comment. We'll email you a link; no password needed.