Cost, Cardinality and the Vendor Landscape

Where the money goes

Every signal has a different pricing driver: the unit the bill is counted in. Know the unit and you know what to cut.

SignalTypical billing unitWhat actually multiplies itSelf-hosted cost shows up as
MetricsActive series, or "custom metrics" (a unique metric name + tag-value set)Product of label cardinalities; histogram buckets; pod churnRAM in TSDB heads/ingesters (see Prometheus), ruler and query CPU
LogsGB ingested; sometimes also GB or events indexed and retention daysVerbosity (debug), request volume × line size, retries/loopsElasticsearch: disks + CPU for indexing; Loki: object storage + query scan
TracesSpans or GB ingested; sometimes sampled/retained spansSpans per request × request rate; sampling rate (see the Distributed Tracing guide)Collector/gateway CPU, object storage
Infrastructure / APMPer host, container or vCPU, often a monthly high-water or average countAutoscaling, short-lived hosts, number of agentsAgent CPU/RAM on every node
EverythingSeats / users, add-ons (RUM, synthetics, profiling)Org size, product breadthOn-call and platform-team time

Back-of-envelope: metrics

Cardinality estimates are multiplications, so do them before shipping a metric. Illustrative fleet: 200 services × 10 pods = 2,000 pods.

per pod
  runtime + process metrics (Go/JVM, process_*)                     ~   100 series
  HTTP server duration histogram:
      series per label combination = buckets (11 + Inf) + _sum + _count = 14
      combinations actually seen   = method(4) x route(~15) x status(~6), sparse ~100
      14 x 100                                                   ~ 1,400 series
  per-pod total                                                  ~ 1,500 series

fleet:   2,000 pods x 1,500                                     = 3,000,000 active series
memory:  3,000,000 x ~3-4 KB per head series (measure yours)    = ~ 9-12 GB of RAM

Now one engineer adds a label user_id to a middleware counter present in every service. If each pod sees 1,000 distinct users per 2-hour head window, that is 2,000 pods × 1,000 = +2,000,000 series from one line of code (+67%), and the series are short-lived, so churn (new series per hour) stays high even after you remove it, until old blocks age out. The same arithmetic on a vendor bill is a custom-metrics count, not a CPU graph.

active series ≈ Π (distinct values of each label) × (histogram series per combination) × (targets exposing it)

Back-of-envelope: logs

5,000 requests/s x 300 bytes/line (one access-log line per request)
= 1,500,000 B/s = 1.5 MB/s
x 86,400 s/day = 129.6 GB/day   (call it 130 GB/day)
x 30 days      = 3,888 GB       (about 3.9 TB per month, before replicas)

Illustrative price: at $0.50 per GB ingested (a made-up round number, not a quote)
  raw 130 GB/day  = ~ $1,950 per month;  one chatty debug flag doubling it = ~ $3,900

The line is one request log per request, with no application logs yet. Add a retry loop that logs each failure and the number is not linear in traffic any more: it is linear in failures × retries.

The cardinality-control levers

Think of them in order of where they act. The earlier the lever, the more it saves and the less you can ever recover.

  1. Drop at the source. Do not emit it: remove the label in code, lower log level, exclude health checks. Cheapest and irreversible.
  2. Drop at the collector. Prometheus metric_relabel_configs, OTel Collector filter/transform processors or SDK Views, Alloy/Vector/Fluent Bit filters. Central control without redeploying apps.
  3. Sample. Traces (head or tail, the Distributed Tracing guide); logs (keep all errors, 1-in-N of successes); keep a rate metric so you can still count what you dropped.
  4. Aggregate before storing. Recording rules (see PromQL) that pre-compute sum without (pod, instance), then drop the raw series with a short retention; streaming aggregation in an ingest proxy (e.g. VictoriaMetrics vmagent) or a vendor control plane.
  5. Convert log to metric. If you only ever count or time something ("checkout errors per minute"), emit a metric (or Loki ruler / OTel count connector) and drop the lines. A series costs bytes; a log per event costs bytes per event.
  6. Tier retention. Raw high-res for days, downsampled for months (Thanos/Mimir compactor, see Scaling Prometheus), logs hot for a week then cold object storage, traces for a few days.
  7. Let a tool recommend cuts. Grafana Cloud's Adaptive Telemetry suite: Adaptive Metrics (finds unused labels/series and suggests aggregation rules; Grafana reports about a 35% average metrics-cost reduction, a vendor claim), Adaptive Logs (pattern-based sampling recommendations, with exemptions), Adaptive Traces (tail sampling, GA at ObservabilityCON 2025). Chronosphere and others offer similar control planes. These are Cloud features, not open-source components.

prometheus.yml: drop an exploding label and a debug metric at scrape time

scrape_configs:
  - job_name: kubernetes-pods
    metric_relabel_configs:
      - action: labeldrop            # remove the label; series that collide are then rejected, aggregate first
        regex: user_id|request_id
      - action: drop                 # drop a whole noisy metric family
        source_labels: [__name__]
        regex: 'myapp_debug_.*|go_gc_.*_bucket'

otel-collector.yaml: filter + transform on the way through (gateway)

processors:
  filter/drop_noise:
    error_mode: ignore
    logs:
      log_record:
        - 'severity_number < SEVERITY_NUMBER_INFO'                       # drop DEBUG/TRACE
        - 'IsMatch(body, ".*GET /(healthz|readyz).*")'
  transform/shrink:
    metric_statements:
      - context: datapoint
        statements:
          - delete_key(attributes, "user.id")
service:
  pipelines:
    logs:    { receivers: [otlp], processors: [memory_limiter, filter/drop_noise, batch], exporters: [loki] }
    metrics: { receivers: [otlp], processors: [memory_limiter, transform/shrink, batch], exporters: [prometheusremotewrite] }
Illustrative funnel. A fleet emits 130 GB of logs per day. Dropping debug lines and health checks at the source removes 50 GB leaving 80. Sampling successful access logs removes 25 leaving 55. Converting request logs into metrics removes 20 leaving 35 GB per day. Tiering retention keeps 7 days hot, 245 GB, and 23 days cold, 805 GB, so 1,050 GB is stored for 30 days instead of 3,900 GB.
Cost-control funnel: ILLUSTRATIVE numbers, one log fleet, bars drawn to scale. Read it as: the order is the point. Levers 1–3 shrink what is produced (and so what every downstream system must carry); lever 4 only changes how cheaply what remains is parked. In metrics the same funnel is: drop labels, aggregate with recording rules, downsample.

Build vs buy

Self-hosting means you pay in hardware, object storage and engineers; buying means you pay per unit of telemetry and trade operations for a bill that scales with your data. The honest comparison is total cost of ownership: a vendor's per-GB price against your cluster cost plus the salaries of the people who tune rings, compactors and Elasticsearch heap. Large, steady, well-understood volumes favour self-hosting; small teams, spiky volume, or need for breadth (RUM, synthetics, security, incident tooling) favour buying. Many orgs end up hybrid: OSS for high-volume infrastructure metrics and logs, a vendor for APM and on-call.

OptionModelStrengthsPricing driver (check current page)Lock-in
Self-hosted OSS (Prometheus, Grafana, Loki, Tempo)You operate itNo licence fee, full control, open interfaces; Prometheus and Grafana are the industry defaultsYour infra + engineer time; cardinality still decides costLowest: PromQL, LogQL, OTLP are open; AGPL on Grafana-Labs components
Grafana CloudManaged LGTMOpen engines operated for you; Adaptive Telemetry; IRM; free tierActive series, GB logs/traces/profiles, plus users and some add-onsLow for data and queries; Adaptive/IRM features are proprietary
DatadogSaaS, agent-basedVery broad integrated platform (infra, APM, logs, RUM, security); strong integrations and UXPer host/container for infra and APM; custom metrics by unique name + tag set (allotment per host: 100 on Pro, 200 on Enterprise per its docs); logs per GB ingested and per indexed events; spansMedium to high: Datadog agent, proprietary monitors/dashboards/query language; OTel ingestion supported
New RelicSaaS, one data platformAll telemetry in one queryable store (NRQL); simple modelGB of data ingested (free monthly allowance) plus per-user pricing by user tierMedium: NRQL, dashboards; OTLP ingest supported
HoneycombSaaS, event-centricWide events and high-cardinality exploration (BubbleUp); OTel-native; the "unknown unknowns" tool (see What observability is)Events per month (metrics counted as data points); unlimited seats per its pricing pageLow-medium: OTel-native ingestion; query UX is its own
DynatraceSaaS/managed, agent-basedOneAgent auto-instrumentation, automatic topology and root-cause AI (Davis), strong in large enterprisesConsumption subscription with per-capability rates (e.g. host-hours, ingest GB, retention)Medium to high: OneAgent, Grail/DQL
Elastic ObservabilitySelf-managed or Elastic CloudSearch and analytics on logs in one engine, plus APM and security; AGPL option since 2024Provisioned capacity (hosted) or usage/ingest + retention (serverless)Medium: Elastic query languages and mappings; OTLP supported
Splunk (Cisco)Enterprise and SaaSLog search and security heritage; Observability Cloud for metrics/APM/tracesHistorically GB/day ingest; workload-based options; Observability Cloud per host or usageMedium to high: SPL, indexes, apps
ChronosphereSaaS, metrics-firstCardinality "control plane": see and shape data before it is stored; Prometheus/OTel compatibleData persisted after shaping rules (contract-based)Low-medium: PromQL and OTel
SigNozOSS or Cloud on ClickHouseOTel-native, logs+metrics+traces in one columnar store; self-host optionCloud: GB ingested for logs/traces, metric samplesLow: OTel in, ClickHouse underneath

OpenTelemetry as the anti-lock-in lever

The main cost of switching vendors is re-instrumenting every service. With OpenTelemetry (see OpenTelemetry) you instrument once against the vendor-neutral API/SDK and OTLP, and the backend becomes a Collector exporter setting. In practice: apps send OTLP to a gateway Collector (see OTel Collector) that you own; the gateway fans out, so you can run two backends in parallel during a migration and compare; the cost-control levers above (filter, transform, sample, batch) live in your gateway, not in a vendor's agent. What OTel does not remove: dashboards, alerts and queries are still written in the vendor's language, and some vendor features (auto-discovery agents, proprietary correlation) are not available through OTLP.

"Observability is 10 to 30 percent of infrastructure spend"

This number is folklore, not data. The most-cited source is Honeycomb's co-founder, who wrote in 2018 that teams with good observability spent "~20-30% of their infra bill" on it and says plainly it was based on "absolutely no data"; his 2025 update is "15-25%", again from what "lots of people pay", and he notes analysts suggest 10% is achievable for large enterprises while he is "still searching for the evidence". Gartner publishes dollar figures instead of ratios: its April 2025 report Get Your Observability Spend Under Control reports a median single-vendor spend above $800,000 a year and predicts that by 2028, 80% of enterprises without cost controls will overspend by more than 50% (as summarised by secondary sources). Use the range as a smell test for "is our bill absurd?", never as a budget.

The Invariants

  • Guarantees: Cost scales with what is stored or indexed, so a lever that acts earlier in the pipeline cuts every downstream cost at once; instrumenting with OTel and routing through your own Collector keeps the choice of backend reversible; any label with unbounded values multiplies series count by its distinct values.
  • Does not guarantee: That dropped data can be recovered (sampling and label-dropping are irreversible); that OTel removes all lock-in (queries, dashboards and alerts are still vendor-specific); that vendor pricing models stay as described here; that "10 to 30 percent of infra" is a real benchmark; that cheaper per-GB means cheaper overall once query, retention and people costs are counted.