Glossary · W

White-Box Monitoring

Monitoring a system from the inside, based on the metrics, logs, traces and profiles that its components emit about their own state.

By Obseria TeamUpdated

Definition

White-box monitoring observes a system through telemetry that its own components emit, such as metrics, logs, traces and profiles. Because it can see internal state like queue lengths, cache hit rates, garbage collection or database wait times, it explains why a problem happens and can reveal issues before users notice them. It complements black-box monitoring, which tests the system from the outside.

What is white-box monitoring?

White-box monitoring watches a system from the inside. Instead of sending test requests from the outside, it relies on data that the application, its runtime and its infrastructure report about themselves: request counters, latency histograms, error logs, spans of a distributed trace, memory usage of a process or the number of messages waiting in a queue.

The term is the counterpart to black-box monitoring. Google's SRE book describes both as complementary: black-box monitoring is symptom-oriented and shows that users are affected right now, while white-box monitoring depends on inspecting the internals of the system and can show both the cause of a problem and early warning signs. The difference is also central to the discussion of observability vs. monitoring.

Data sources of white-box monitoring

  • Metrics: numeric time series such as request rate, error count, response time percentiles, CPU, memory, connection pool usage or consumer lag.
  • Logs: events written by the application and its dependencies, ideally as structured records with service, severity and trace ID.
  • Traces: the path of a single request through services, databases and queues, with the time spent in each step.
  • Profiles: where code spends CPU time or allocates memory, down to the function.
  • Runtime and platform signals: garbage collection pauses, thread pools, container restarts, Kubernetes events.

All of these require instrumentation: code or an agent that collects the data and exports it, for example with OpenTelemetry SDKs or Prometheus client libraries.

White-box vs. black-box monitoring

AspectWhite-boxBlack-box
PerspectiveInside the systemOutside, like a user
Typical dataMetrics, logs, traces, profilesProbe results: success, status, response time
AnswersWhy is it broken? What is about to break?Is it broken for users right now?
Blind spotsDNS, CDN, networks outside your code; stops when the system is completely downInternal causes, paths that are not probed
EffortInstrumentation of every componentA probe per endpoint or user journey

Neither approach is enough on its own. A full outage can stop internal telemetry from arriving at all, which only an external probe notices. A slowly filling disk or a growing queue, on the other hand, is invisible from the outside until it turns into errors.

Example: a white-box alert

With Prometheus-style metrics, a service exposes a request counter with a status label. An illustrative rule that fires when more than 5 % of requests fail for ten minutes looks like this:

sum(rate(http_server_requests_total{service="checkout", status=~"5.."}[5m]))
  /
sum(rate(http_server_requests_total{service="checkout"}[5m]))
  > 0.05

The same internal data then helps with the diagnosis: the trace of a failing request shows which downstream call returned the error, and the logs of that service show the message. A black-box probe would only have reported that checkout failed.

What to watch from the inside

  • Service signals: request rate, errors and duration per endpoint, as described by the RED method and the four golden signals.
  • Resource signals: utilization, saturation and errors of CPU, memory, disks and network, following the USE method.
  • Dependencies: latency and error rate of calls to databases, caches, queues and external APIs.
  • Leading indicators: queue depth, connection pool usage, disk fill level and memory growth, which often change before users see errors.

Best practices

  • Page on symptoms, investigate with causes. Alerts that wake people up should usually be based on user-facing signals such as error rate and latency. Internal cause metrics are better suited for dashboards, tickets and diagnosis, otherwise alert noise grows quickly.
  • Use consistent names and attributes. The same service name and version in metrics, logs and traces make correlation possible.
  • Control cardinality. Labels such as user IDs in metrics create very many time series and drive up cost.
  • Monitor the monitoring. If an exporter or agent stops sending data, an absent-data alert or an external probe should notice.
  • Combine with black-box checks for critical endpoints, so a full outage is detected even when internal telemetry stops.

The observability perspective

White-box monitoring is the foundation of observability. Classic monitoring watches a fixed set of known signals with thresholds. Observability goes further: rich internal telemetry with context, such as trace IDs, versions and attributes, lets teams ask new questions during an incident without shipping new code first. In that sense, observability is white-box monitoring done thoroughly and connected across signals, while black-box checks remain the independent outside view.

How Obseria helps

Obseria collects internal telemetry through OpenTelemetry SDKs and Collectors, the Obseria Agent and Prometheus endpoints, and stores metrics, logs and traces together in Obseria Lake. Metrics monitoring and distributed tracing show the inside of each service, and check rules evaluate metrics and PromQL queries, log patterns, traces and new error types. For the outside view, synthetic monitoring adds black-box checks, so a symptom seen by a probe can be followed into the traces and logs that explain it.

Frequently asked questions

White-box monitoring uses telemetry emitted from inside the system, such as metrics, logs and traces. Black-box monitoring tests the system from the outside through its public interfaces. White-box explains why something breaks, black-box confirms that users are affected.

Not exactly. White-box monitoring is the basis, because observability also relies on internal telemetry. Observability adds rich context and correlation across signals, so that new questions can be answered without adding instrumentation first.

Yes, but selectively. Alerts that page someone work best on user-facing symptoms such as error rate and latency. Internal metrics like CPU or queue depth are better for early warnings with lower urgency and for diagnosis.

Often only a little. Many runtimes and frameworks can be instrumented automatically with OpenTelemetry or an agent, and infrastructure metrics come from exporters or host agents. Custom business metrics usually need a few lines of code.

Put these concepts into practice

Try Obseria free for 14 days, with OpenTelemetry and no proprietary agents.