System Monitoring Best Practices

Monitoring approaches complement each other

Common system-monitoring metrics include:

  • Databases (up/down)
  • Kubernetes services (restarts, CPU/memory usage)
  • HTTP (errors count, response duration)
  • Logging (errors count)

These metrics belong to SRE monitoring. They do not show the full health of an application or its business logic.

SRE and DevOps monitoring address different questions. SRE monitoring shows which component is unavailable. DevOps monitoring helps explain why it failed and how the failure affects the whole project. The difference is clear when you monitor business logic or configure alerts.

Metrics and alerting

Consider an HTTP /login endpoint. Request-duration metrics can show when the system begins to degrade. What threshold should trigger an alert: 0.5s, 1s, 5s, or 10s? All can be normal in some situations, including 10s when a client has a last-mile problem. A single threshold would create too many alerts.

Rounding the values would lose useful detail. Instead, group requests by duration and calculate the percentage in each group.

duration% requests
<= 0,5s15%
> 0.5s  <= 1s60%
> 1s <= 5s22%
> 5s3%

These groups produce two useful metrics:

  • 95% of all requests are no longer than 5s-
  • requests longer than 5s do not exceed 3% of all requests

This approach uses percentiles.

How it looks in real life

The screenshot shows request latency for the DjAdmin service.

Ninety-nine percent of requests complete in 200 ms.

image

0.1% of requests are complete in 2s which is within acceptable limits

SRE monitoring is blind to application issues

image

Five seconds per request is slow, but latency alone does not show where the problem is.

Typical SRE monitoring analyzes total request duration. The request path can include:

  1. External load balancer
  2. Kubernetes ingress
  3. Service middlewares
  4. Service controller
  5. Database query
  6. Service business login
  7. Response

Memory usage provides another example. SRE monitoring can measure Kubernetes pod or application memory usage.

image

That metric does not explain which part of an application uses memory. Each application has different memory areas, and each points to different issues. The “Prerender-API” service (Node.js) provides an example.

How it looks in real life:  image

SRE monitoring does not expose this memory leak. Frequent deployments can hide the problem, and SRE tools alone cannot export metrics from inside the application. image

Monitoring is also a developer tool. It needs usable APIs and libraries for application-level metrics. CPU and memory usage and up/down status are only part of a monitoring system. Business metrics provide the other major part.

Business metrics

Programmers usually define business metrics because they understand the application flow. The following example shows why they matter.

Example

Consider this flow:

  • The user tries to SignUp on to the frontend, the frontend sends an API request to Auth0 API
  • Auth0 store user in the internal database,
  • Auth0 sends a webhook to our backend API
  • Backend API store user info in PostgreSQL
  • Auth0 sends a verification email to the user through SendGrid
  • Users after clicking on to link in the verification email are redirected to Auth0 to confirm email verification
  • Users are redirected to the backend API to put email confirmations status in PostgreSQL

Several steps can fail. Monitoring, logging, and alerting can reveal where the flow stops.

A simple business-metric chart can show whether the services stay in sync.

SignUp data grows, but another step falls behind

image

Potential problems:

  • frontend and Okta integrations
  • Okta issues

SignUp and webhooks grow at different rates

image

Potential problems:

  • Okta actions missconfiguration
  • Project ingress route unavailable
  • User service or DB issues

User verification status falls behind

image

Potential problems

  • Issue with Email service (config, profile or billing, domain reputation, etc )

How to build alerting

Two simple metrics can cover a lot of different cases:

  • The difference between SignUp, Webhooks, and Registered should remain 0.
  • The gap between SignUp, Webhooks, Registered, and Verified should remain below 10%. A larger gap needs investigation, although some loss is expected.

Integrating with Torque: Less to Build, Less to Maintain

article Integrating with Torque: Less to Build, Less to Maintain image

August 2026 Development Update

article August 2026 Development Update image

June 2026 Development Update: Building the Operating Foundations

article June 2026 Development Update: Building the Operating Foundations image