Business metric monitoring: Prometheus and Grafana integration

The product goes down, but the signal comes from users, not the system. We set up business metric monitoring as a turnkey service: we link product events to dashboards and alert rules so the team learns about an incident first. This reduces incident response time multifold and removes blind spots in the data.

Our competencies:

Frequently Asked Questions

Latest works

  • Development of a web application for FEEDME
    Development of a web application for FEEDME
    1359
  • Development of an online store for the company FURNORO
    Development of an online store for the company FURNORO
    1330
  • B2B Advance company logo design
    B2B Advance company logo design
    776
  • Development of a web application for Enviok
    Development of a web application for Enviok
    1077
  • AIDER company logo development
    AIDER company logo development
    1022
  • CRM development for Chasseurs
    CRM development for Chasseurs
    1113

Business metric monitoring: where it breaks in production

Business metric monitoring almost never comes down to a lack of data—the data exists, but it is collected in disparate sources.

Orders, registrations, payments, and errors live in the product database, billing, queue, and application logs, and each source has its own format, its own write time, and its own delay before the number becomes true.

Until sources are brought together, manual reporting takes a day or two: an analyst exports a table, joins it with billing, and sends a summary. The output is data from last week, not from the last hour.

Business metric monitoring in this form turns into after-the-fact reporting that records the result rather than managing it.

Hence production bottlenecks: payment errors, increased response time, a broken integration with an external service. In numbers this is visible, but visible later than the customer manages to write to support.

The delay in reacting to a failure is measured in days, not minutes: the share of successful payments dropped on Thursday, and investigation began on Monday.

We break down how this is closed. The application exposes metrics to the shared Prometheus environment, they are aggregated on one dashboard together with billing data, and rules with alerts are configured on them. Then the system reports degradation, not the customer.

What changes after implementation: effect on timelines and failures

Previously, degradation manifested at the business level, not the infrastructure level: the service responds, nodes are not overloaded, but the number of placed orders falls.

Business-facing metrics are moved to a separate collection, and alerting rules are built on the rate of change of the indicator, not only on an absolute threshold—a conversion drop of a quarter over a short window raises a signal earlier than the revenue on-call engineer notices it. Incident detection time is reduced from hours to minutes.

The share of automatic alerts grows not because “everything has been automated,” but because every critical path has gained a measurable signal: the number of successful payments, the share of failures at the checkout step, cart depth.

The system itself says which scenario has degraded and in which segment—manual dashboard rounds remain only for areas where the signal has not yet been set up.

Service recovery time is determined by the quality of context next to the signal.

The metric graph sits alongside a breakdown by release version, payment method, and region, so the cause is visible before the investigation begins, and the rollback decision is made based on fact, not guesswork—a typical incident is closed in one short cycle instead of a series of clarifying questions.

The main effect is a class of failures that has gone away: “silent” degradations, in which the application responds correctly but the business process does not complete.

An integration with a payment provider that returns errors in the response but not in the status code no longer lives until the first complaint.

Prometheus stores time series together with technical metrics, so the cause is correlated in a single query rather than assembled piece by piece manually.

Data collection methods: agents, integrations, event stream

The collection method determines which metrics will appear on graphs at all and with what delay. Prometheus scrapes metrics from addresses it knows on a schedule, Grafana builds panels and alerts from them—but the source of these metrics differs in every infrastructure. Below are real alternatives and their applicability boundaries.

Method When it fits Limitations
Agent collector on the node Hosts and services under our control, stable addresses Short-lived jobs do not have time to expose metrics
Gateway for short jobs Batch jobs, scheduler, one-off processes No source availability check, label lifetime is needed
Export from the business system Metrics are already calculated inside the system Delay between runs, load on the database
Event stream High frequency, many sources Aggregation at the consumer, growth in the number of label combinations
Direct instrumentation Own services, detail is needed Code changes and rebuild when the metric set changes

In practice, the choice is dictated not by the tool but by the nature of the load: long-running services are convenient to poll, short jobs can only send metrics themselves, and business metrics are often already calculated in the business system and require periodic export.

We address the label issue separately: arbitrary values in labels—order ID, customer number—bloat the database over months and slow down queries. We aggregate high-frequency streams to the required dimension: operation type, region, channel.

Implementation stages: from source audit to handover

Implementation proceeds in fixed steps: first we find out what can be measured at all, then we agree on how to count it, and only then do we connect production.

The order is critical—a metric model assembled before the source audit gets rewritten entirely, and alerting rules without a relationship schema produce noise instead of signal.

  1. Data source audit. We go through applications, queues, billing, and external services, writing down which events are already logged, where the counter exists only on the client side, and what will have to be exposed separately. The result is a table “source → metric → collection method → owner.”
  2. Unified metric model. We reduce metrics to a common dictionary: names, labels, units, aggregation window. We fix what counts as an order and what counts as an attempt—otherwise the same funnel on two panels shows different numbers.
  3. Relationship schema. We describe how metrics connect to each other: order ID, customer, sales channel. Without this, it is impossible to break down revenue by segments and connect a sales drop to a specific service.
  4. Rules and thresholds. We configure aggregation and alerts for business deviation, not hardware load: the signal should mean that something broke for the customer, not that load increased.
  5. Test failure check. We kill the collector, delay the queue, inject duplicate events. We see whether the signal arrived, how long it took, and whether the on-call engineer has enough data to understand the cause without reading code.
  6. Handover to operations. We commit the configuration to the repository so that panels and rules are versioned rather than living in someone else’s account, and we train on-call engineers on real incident reviews and the test failure.

After handover, sources can be changed: a new metric goes through the same path—from dictionary to alert—and rules are edited in the repository with change history.

Alerting rules, panels, and on-call documentation

An alert without instructions is noise that wakes a person and gives no next step.

That is why we assemble the monitoring kit as a transferable artifact: configurations live in the repository, changes go through the same review as service code, and every threshold and panel has an owner. The customer receives not a configured Grafana but a working observation procedure.

  • Metric collection and retention configurations: target discovery rules, scrape intervals, retention period, a separate set for business metrics.
  • Data flow diagram: from metric source to panel and alert, including the notification routing chain.
  • Alert thresholds: what counts as a warning, what counts as an incident, how long the condition must hold before firing, and who receives the signal.
  • Monitoring panels: a business panel for the department head and a technical one for the on-call engineer, with an explanation for each metric—what it means and what to do on deviation.
  • On-call instructions: first actions, escalation points, typical causes of deviations, and ways to verify them.
  • Incident review procedure: description template, who leads the review, which actions are recorded as corrective, and how the result is verified.
  • Review schedule: when thresholds and panels are updated—when the product changes, after an incident review, when the metric owner changes.

We consider the kit ready when a new engineer goes through a training incident using the instructions and finds the cause without the person who set it up: this tests both the documentation and the actual response time of the on-call engineer.

Case study: how we reduced response time to a product failure

For a product team, a failure developed quietly: some requests to place an order returned an error, and the on-call engineer learned about it from support tickets—on average, after an hour and a half.

Metrics were collected only from hardware, and business events—successful payment, failure at the confirmation step, queue depth—were not aggregated anywhere, so a funnel failure looked like a normal evening traffic decline.

Prometheus and Grafana had already been deployed by then, but worked as a dashboard without signals: someone had to look at them manually.

What we rebuilt

We described the order path as a set of metrics and linked them to service metrics: share of successful payments, time from order creation to confirmation, distribution of failures by code, queue processing delay.

We moved alerting rules from hard thresholds to deviation from a baseline over a sliding window—this removed most false positives and noise in the on-call shift.

Every alert comes with a metric graph and a link to the panel, so diagnostics begin with a hypothesis, not with a chat asking “is everyone seeing this?”

Metrics before and after

Metric Before After
Degradation detection by tickets, ~90 min by metric, ~5 min
Start of diagnostics after a support round immediately from the alert
False alerts most firings occasional, with a clear cause
Release rollback decision by complaints by metric deviation

A separate effect is on releases: if the share of payment failures grows after rollout, the rollback decision is made from the graph, not from a call from support.

Incident review is faster because the metric history is already collected—the picture does not have to be reconstructed from logs after the fact.

How does business metric monitoring differ from server monitoring?

Server monitoring answers the question “is the system working”: node load, service availability, response codes, queue length.

Business metric monitoring answers the question “does the system produce a result”: how many orders were placed, what share of payments went through, how many customers returned.

The signals diverge—the service can be fully available while revenue falls due to an error in cart calculation.

The second difference is the frequency of changes and metric ownership. Server metrics change in seconds, they are owned by the infrastructure team, and the decisions are technical: scale resources, restart a node, roll back a release.

Product metrics are measured in hours and days, the product owner is responsible for them, and decisions concern priorities and scenario logic.

The loops are combined on one canvas: the metric is taken from the same source as the workflow, and the alert comes not when “it went down” but when the metric goes outside the corridor.

Prometheus and Grafana accept both types of data in one model, so an order drop is visible next to an error spike on a specific service—the cause is found in minutes, not based on the results of a week-long review.

Common technical doubts before starting

Before starting, the same questions almost always come up: will data collection load the product, how long to retain history, will the application have to be rewritten, and how to find a metric among hundreds of others later. We answer briefly—we expand on the details during the design phase.

The Prometheus and Grafana integration is built so that the application only exposes values at a separate address, while collection, storage, and graphs live outside its process.

How much does monitoring load the product?

The collector accesses a separate address once every 15–30 seconds and reads counters already calculated in memory—without queries to the product database.

The main risk here is not the collection itself but the number of time series: high-variance labels do not go into the instrumentation.

How long should metric history be retained?

History is stored in a separate storage, not in the product database: fresh data on fast disks, then recording rules roll it up into weekly and monthly summaries. We keep detailed points for months and aggregates for years, so that periods can be compared with each other.

Will the application code have to be changed?

In a targeted way: counters and histograms are added where a business-significant event occurs—order, payment, failure. This is a few lines inside existing handlers; the logic and data schema are not touched.

In parallel, we establish mandatory event labeling; otherwise, searching metrics later turns into archaeology.

How do we find metrics and who is responsible for dashboards?

A unified dictionary of names and labels works: every metric has an owner and a description, so search is by business meaning, not guesswork.

Engineers are responsible for collection and availability, the product team for the correctness of events and dashboard content, and we for the integration, alerts, and change procedure.

Let's discuss the task: what to send for estimating the scope of work

To come back with a scope estimate and work plan, we need not a retelling of the situation but access to facts: how the environments are structured, where order data comes from, and what is already configured.

The more specific the input data, the fewer assumptions in the estimate and the more precise the stages. Below is the minimum set that most often determines the difference between “roughly clear” and a working plan.

  • List of services and their owners, with criticality marking: what can survive a night of downtime and what must not be stopped at all.
  • Points where business metrics are born: order placement, registration, payment, cancellation—and in what form these events can be read.
  • Current dashboards and alerting rules, if any, together with complaints about them: what is noisy, what is silent during a failure.
  • Access to repositories with infrastructure configuration and to the environment where Prometheus and Grafana builds are deployed.
  • Environment diagram: how many stands there are, how they differ, how changes are released, and how rollback is performed.
  • Constraints: access regulations, security requirements, maintenance windows, prohibitions on exporting metrics outside.
  • The person responsible on your side who will confirm priorities and approval timelines.

If some data is closed, this does not block the start—we will discuss the task, record assumptions, and come back with a work plan and scope estimate. The decision is then yours: there are no obligations on either side at this stage.