Engineering Blog

6 min read

What Does a Self-Caring Software Look Like? — DataBuff Self-Monitoring & Self-Troubleshooting

When you're on call, the worst thing isn't that your business went down — it's that your monitoring platform itself broke and you had no idea. Log volume suddenly drops, a chunk of data silently disappears — and after hours of searching you realize it was never the business at fault: the collection pipeline choked on itself. To make it worse, traditional monitoring software is always watching "everything else," while being a black box itself: CPU spikes, memory full, queues blocked — it never says a single word.

First, what is DataBuff: an open-source AI-native APM where the AI lives directly on top of your OpenTelemetry data — asking questions and troubleshooting are done by AI experts calling tools against real data. Project on GitHub (github.com/databufflabs/databuff). Its approach is different: it treats itself as a business system being monitored. Once installed, you can see whether it's healthy, why it's abnormal, which parameter to tune — you can even say one sentence and it will run an inspection on itself. This article walks through a real case.

1 · It watches itself: the platform's self-monitoring page

DataBuff's "Deployment Status" page exposes metrics for all three core components: ingest (collects data), web (queries data), and Doris (stores data). The overview opens with four cards that state the conclusion up front: inbound events per second, any write failures, Doris disk remaining, any query errors.

DataBuff Deployment Status overview: inbound TPS, write failures, Doris disk usage, query failures
Deployment Status overview: inbound TPS 5898/s, Doris disk 14.09%, query failures 5

Scrolling down gets more granular: every signal path in ingest — trace / metric / log — is tracked individually with "how many, how big, how slow, any dropped"; Doris disk and CPU are broken out too.

2 · It understands itself: every metric ships with its own manual

More metrics isn't the point — every metric comes with an explanation and its tuning parameters. Click the title of any chart and a drawer pops up: how this metric is computed, whether you should worry, which env var to tune when it goes wrong, and the default value. All explained at once.

Write Drop metric drawer: how it's computed, how to read it, relevant env vars
Click the "Write Drop" title: the drawer explains how it's computed, how to read it, and which params to tune (INGEST_DORIS_* and defaults)

Take the "Write Drop" metric: the drawer tells you it only occurs in two situations — the queue is full and a whole batch is dropped, or writes fail consecutively and are discarded; it reminds you that "any sustained drop means data loss — check queue depth, write failures, and Doris liveness first"; and finally it lists the tunable parameters directly.

3 · It does health checkups: one sentence, AI inspects the whole platform

Don't want to flip through page after page? Just tell the AI platform "inspect the DataBuff platform and produce an HTML inspection report". The product support expert reads the metric catalog, queries the platform's own self-monitoring metrics, picks out the anomalies, and produces an HTML report you can forward directly.

Platform inspection HTML report first screen generated by the product support expert
Platform inspection report triggered by one sentence (live): overall healthy, zero inbound/write failures, Doris all green, two follow-ups auto-flagged

We ran it live: within minutes it automatically checked ingest, writes, pipeline, query domain, Doris, and process resources. The conclusion matched manual troubleshooting — one query-domain failure was still ongoing, and it flagged it as-is.

4 · It diagnoses: logs are dropping, and it finds the cause itself

This data loss isn't made up — it actually happened and was actually fixed in our demo environment. The "Write Drop" metric on the Deployment Status page went red — only the log signal was dropping continuously, thousands to fifteen thousand per minute:

Write Drop self-monitoring chart: log line dropping continuously, Ready queue 16/16 full
Write Drop self-monitoring chart (live): the log line keeps dropping, thousands to 15k/min, Ready queue 16/16 full

At this point, no one needs to flip through pages. Just say the word in the AI platform and let the expert investigate. It first rules out two "non-issues": the business side is normal — not the app's fault; Doris storage is alive and writes are fast — not the storage's fault. The real cause lands in ingest. Logs are batched and pushed into a write queue — this environment's queue holds only 16 batches, normally 32. Sudden bursts don't fit, and the overflow gets dropped as whole batches. The log shows Doris ready queue full (16/16) every minute — confirmed.

AI troubleshooting explains the drop chain: batching, 16-batch write queue full, Doris storage
AI troubleshooting explains the drop chain (live): batching → 16-batch write queue → queue full, whole batch dropped → Doris storage, each step backed by a metric

It packages "why it dropped, where it dropped, which param to tune, and to what value" into a conclusion with evidence, and hands over the fix suggestion:

The fix suggestion from troubleshooting: which param to tune, suggested value
The fix suggestion from troubleshooting (live): which param to tune, the default, and the suggested value, all written in the conclusion
5 · It fixes itself: changing params and restarting, all on its own

The suggested fix is exactly this group of INGEST_DORIS_* parameters — the core problem is a too-small queue, just make it bigger:

ParameterBeforeAfterEffect
INGEST_DORIS_MAX_READY_BATCHES1632Write queue too small for bursts; double it
INGEST_DORIS_FLUSH_TIMEOUT_MS30s60sRestore default write timeout
INGEST_DORIS_FLUSH_BATCH_BYTES50 MiB50 MiB (unchanged)Not touched this time

And you don't change the params or restart by hand. The product support expert SSHs in, edits the config, and restarts ingest per the suggestion, then re-checks to confirm:

Product support expert executes the operation: SSH, backup config, change params, restart ingest, verify
Product support expert executes the operation (live): SSH → backup config → change params → restart ingest → verify
Post-fix recheck: query the platform's self-monitoring again, confirm drops back to zero
Post-fix recheck (live): query the platform's self-monitoring again, confirm drops back to zero

After the restart takes effect, drops return to zero — before the fix, thousands dropped per minute; after the restart, several consecutive minutes at 0, the curve back to normal:

Self-monitoring chart after the fix: Write Drop back to zero, curve recovered
Self-monitoring chart after the fix (live): Write Drop back to zero, curve recovered

All a human did: ask it to diagnose, then ask it to fix.

Getting started · you can use it the same way
  • After install, check Deployment Config → Deployment Status; scan the four overview cards for health at a glance
  • To confirm whether data is being lost: ingest page → "Write Drop", click the title for the explanation
  • Add "how to fix dropping data" to your on-call runbook: trigger troubleshooting in the AI platform for a fix suggestion, let the product support expert SSH in to change INGEST_DORIS_* and restart ingest
  • Periodically have the support expert run a platform inspection and forward the report to the team
Closing · the self-discipline software should have

Software used to be done the moment it shipped; problems were handled by people watching, investigating, and restarting. What DataBuff does isn't complicated: it builds the operational work into the software itself, using the same methods you already use to watch your business.

This data loss — from discovery to on-box fix — nobody opened a runbook or guessed a direction even once.