karawaci.kode

2026-07-04 · 7 min

LogRocket vs Sentry vs Datadog: Monitoring SaaS Indonesia

Enam bulan lalu, klien SaaS Tangerang minta saya evaluate tool monitoring. Mereka pernah pakai Datadog trial, sticker shock di bill, sekarang punya budget < $80/bulan. Saya jalankan trial paralel LogRocket, Sentry, dan Datadog selama 30 hari masing-masing. Lalu pakai satu setup hybrid untuk 6 bulan terakhir.

Share angka, kasus pakai, dan rekomendasi konkret per profile tim.

Konteks evaluation

  • App: SaaS subscription management B2B Indonesia, Next.js front + Bun API.
  • Tim: 6 engineer (4 backend, 2 frontend).
  • Traffic: ~1.200 RPS peak, ~28k MAU.
  • Existing: cuma console.log ke stdout, no proper monitoring.
  • Yang dibutuhkan:
    • Error tracking dengan stack trace
    • Performance monitoring (slow endpoint detection)
    • User session replay (CS team minta untuk debug user complaint)
    • Infrastructure metric (CPU, memory, disk)
    • Alerting ke Slack

Sentry — error tracking + performance

Pricing 2026 (Team plan): $26/bulan starting, scale based on error event + transaction.

Setup

Frontend (Next.js):

// instrumentation.ts
import * as Sentry from '@sentry/nextjs';

Sentry.init({
  dsn: process.env.SENTRY_DSN,
  environment: process.env.NODE_ENV,
  tracesSampleRate: 0.1,
  profilesSampleRate: 0.05,
  release: process.env.GIT_SHA,
  beforeSend(event) {
    // Scrub PII
    if (event.user?.email) {
      event.user.email = event.user.email.replace(/(.).+(@.+)/, '$1***$2');
    }
    return event;
  }
});

Backend (Bun + Hono):

import * as Sentry from '@sentry/bun';

Sentry.init({
  dsn: process.env.SENTRY_DSN_BACKEND,
  tracesSampleRate: 0.2,
  integrations: [
    Sentry.httpIntegration(),
    Sentry.postgresIntegration(),
  ],
});

app.onError((err, c) => {
  Sentry.captureException(err, {
    tags: { tenant_id: c.get('tenantId') },
    user: { id: c.get('userId') }
  });
  return c.json({ error: 'internal' }, 500);
});

30 hari trial Sentry observations

  • Error captured: 1.247 unique error, ~38.000 event total.
  • Critical incident detected: 4 (memory leak, deadlock query, NULL handling bug, JWT validation race).
  • Mean time to detect (vs customer report): ~3 menit (Sentry alert) vs ~28 menit (customer report).
  • Performance trace useful: ~62% transaction trace include enough context untuk root cause.
  • Cost actual: $34/bulan (kami sedikit overshoot transaction quota).

Yang Sentry kurang

  • Tidak punya infra metric (CPU, disk, memory).
  • Tidak ada session replay (cuma error context).
  • Log aggregation terbatas (event-based, tidak streaming).

LogRocket — session replay

Pricing 2026: $69/bulan starter (kami negotiate ke $58 karena Indonesia market).

Setup

import LogRocket from 'logrocket';

LogRocket.init('app/kami-saas', {
  release: process.env.GIT_SHA,
  network: {
    requestSanitizer: (req) => {
      if (req.url.includes('/auth')) {
        req.body = null;
      }
      return req;
    }
  },
  dom: {
    inputSanitizer: true, // mask all inputs by default
  }
});

LogRocket.identify(userId, {
  email: userEmail,
  subscriptionTier: tier
});

30 hari trial LogRocket observations

  • Session recorded: ~12.000 unique session (sampled 30%).
  • Bug reproduced via replay: 18 dalam 30 hari (CS team-driven workflow).
  • Issues found that weren’t reported: 7 (rage click pattern, abandonment di checkout step 3, etc.).
  • Cost actual: $58/bulan.

Yang LogRocket excel

  • CS team bisa debug user complaint dengan lihat replay literal apa yang user lakukan.
  • Detect UX issue tanpa user report (rage click, dead click, abandoned form).
  • Network log per-session — bisa correlate error dengan exact action user.

Yang LogRocket kurang

  • Tidak ada infra metric.
  • Storage replay terbatas (default 30 hari retention).
  • PII scrubbing harus careful — default behavior bisa leak data sensitif.

Datadog — APM + infra

Pricing 2026: $31/host/bulan untuk Infra Pro, plus APM Pro $36/host/bulan. Kami 6 host = $402/bulan, tapi banyak feature unused. Kami ambil mix: $186/bulan (Infra + minimal APM).

Setup

Datadog Agent di tiap VPS:

DD_API_KEY=xxx DD_SITE="datadoghq.eu" bash -c "$(curl -L https://s3.amazonaws.com/dd-agent/scripts/install_script_agent7.sh)"

App-level APM:

import { tracer } from 'dd-trace';

tracer.init({
  service: 'kami-api',
  env: process.env.NODE_ENV,
  version: process.env.GIT_SHA,
  runtimeMetrics: true,
  profiling: true,
});

30 hari trial Datadog observations

  • Infra metric coverage: excellent. Out-of-the-box dashboard untuk VPS, container, Postgres, Redis.
  • APM trace depth: distributed trace cross-service kuat, terutama untuk debug “slow API call disebabkan slow DB query disebabkan blocking I/O”.
  • Alerting: 60+ pre-built alert template, customizable. Slack integration smooth.
  • Cost actual: $186/bulan (jumlah host + APM volume).

Yang Datadog excel

  • All-in-one (logs, metrics, traces, RUM, synthetic).
  • UI matang, tim cepat onboard.
  • Anomaly detection berbasis ML untuk threshold dinamis.

Yang Datadog kurang

  • Cost predictability buruk — bill bisa overshoot tanpa warning yang clear.
  • Vendor lock-in tinggi.
  • Tidak ada session replay sebagus LogRocket.

Hybrid setup yang akhirnya saya pakai

Setelah 30 hari × 3 tool, total ~$278/bulan kalau saya beli semua. Klien budget $80. Hybrid:

LayerToolCost
Error tracking + APMSentry$34/mo
Session replay (CS only)LogRocket$58/mo
Infra metricSelf-host Prometheus + Grafana€10/mo ≈ $11/mo
Log aggregationSelf-host Loki(sama VPS)
Total~$103/mo

Saya overshoot budget $23, klien OK karena value delivery. LogRocket optional, tergantung CS team workflow.

Setup self-host Prometheus mengikuti pattern di Prometheus Grafana SaaS Jakarta.

6 bulan hasil hybrid setup

  • Total incident detected pre-customer: 23 (vs estimasi 3-4 sebelum monitoring).
  • MTTR: turun dari estimasi 90+ menit ke 18 menit.
  • CS resolution time: turun 35% karena LogRocket replay.
  • False positive alert: 14% (tuning iteratif, target < 10%).
  • Cost actual 6 bulan: $103 × 6 = $618.

Kapan pakai apa

Sentry saja cukup kalau:

  • Tim < 5 engineer.
  • Tidak butuh session replay.
  • Infra simple (1-2 VPS), bisa monitor pakai cron + alert email.
  • Budget < $50/bulan.

Tambah LogRocket kalau:

  • CS team aktif debug user complaint.
  • UX-critical app (e-commerce, fintech).
  • Punya budget tambahan $50-80/bulan.

Tambah self-host Prometheus kalau:

  • Multi-VPS / multi-service.
  • Butuh custom business metric (revenue, signup, churn).
  • Punya 1 orang yang willing handle ops.

Pakai Datadog kalau:

  • Tim > 15 engineer.
  • Butuh distributed trace cross-service untuk debugging kompleks.
  • Compliance/audit butuh SOC2-compliant vendor.
  • Budget $300+/bulan dengan predictable revenue scale.

Yang break selama 6 bulan

1. Sentry quota overshoot

Bulan ke-2, deploy fitur baru yang trigger error rate spike (bug NULL handling). Dalam 4 jam, 18.000 event. Sentry quota habis, sisa bulan kami “blind” sampai quota reset.

Fix: rate limit di SDK level, max 10 event/menit per error fingerprint. Plus alert kalau approach 80% quota.

2. LogRocket session storage hit limit

Bulan ke-4, traffic spike akhir bulan, kami capture 22k session dalam seminggu. LogRocket retention default kena. Beberapa session lama purged sebelum CS sempat review.

Fix: sampling rate naik ke 50% (default 30%), plus mark “VIP” tenant untuk capture 100% via API.

3. Prometheus disk fill

Sudah saya tulis di Prometheus Grafana setup. Singkatnya: high cardinality label crash Prometheus, fix dengan strict label discipline.

4. Sentry source map upload gagal silent

Sentry kasih symbolicated stack trace dari minified JS, tapi butuh source map upload. CI step kami pernah gagal (Sentry CLI timeout), tidak ada fail. 2 minggu kami debug error tanpa proper line number.

Fix: explicit assert source map availability di smoke test:

curl -f "https://sentry.io/api/0/projects/.../releases/$GIT_SHA/files/" \
  -H "Authorization: Bearer $SENTRY_TOKEN" \
  | jq '. | length' \
  | xargs -I {} sh -c 'test {} -gt 0 || exit 1'

Verdict

Tidak ada tool monitoring universal terbaik. Bergantung profile tim, kebutuhan CS, dan budget:

  • Indonesia SMB SaaS, tim < 10: Sentry + self-host Prometheus. ~$45/bulan, cukup untuk 80% kebutuhan.
  • Mid-market, CS-heavy product: tambah LogRocket. ~$100-150/bulan.
  • Enterprise / compliance-heavy: Datadog atau equivalent. $300+/bulan, predictable scaling.

Yang saya tidak rekomendasi: pakai semua tool sekaligus tanpa clear use case per tool. Itu cuma menambah cost dan notification fatigue. Pilih per layer (error / replay / infra), evaluate ROI tiap kuartal, kurangi yang tidak dipakai.

Bukan magic. Monitoring stack yang bagus adalah yang tim Anda actually read, bukan yang paling banyak data.

Ditulis oleh Reza Pradipta