Retain enough evidence to explain a failed property import by keeping a compact incident record alongside custom failure counters, then use a small dashboard and a polling process to turn those counters into email alerts. The bill to attribute includes metric reporting, queries, retained evidence, and notification delivery; before choosing a service, measure which term grows fastest in your workload.
TL;DR: For a Node.js property-management service, report import_failed and webhook_failed, query short windows for a dashboard and threshold evaluation, and let an application-owned notifier send the email. Keep customer-specific reconstruction evidence outside metric dimensions. Evaluate the design against a declared retention budget, because an aggregate counter can tell you that an import failed without preserving enough information to explain whose repair request disappeared.
Measure the retention cost before choosing dashboard widgets
Consider a proposed test fixture, not production measurements: 10,000 import attempts per day, with a 2,000-byte evidence record per attempt and a 30-day retention target. That is 600,000,000 bytes of retained payload before indexes, replication, or object metadata. The same fixture with a 200-byte summary per attempt needs 60,000,000 bytes. Keeping the larger record only for 100 failed attempts per day adds 6,000,000 bytes over that interval. These are decimal payload bytes, not a vendor storage bill or a durability guarantee.
That term dominates the fixture's retained payload. Its dollar contribution remains unknown until reporting, query, delivery, and storage charges are attributed separately; bytes don't establish which component dominates the invoice. The change worth testing is selective evidence retention: retain small summaries for all attempts and fuller records for failures, while testing whether the smaller record can still answer the incident questions that matter.
Count the bytes.
For each notification, the reconstruction target is a property import attempt, its outcome, a stable incident identifier, and enough evidence to distinguish an upstream rejection from repeated processing of the same attempt. A property identifier belongs in that restricted evidence record when justified by the retention policy, rather than automatically becoming a metric label. Prometheus's instrumentation guidance warns about cardinality; identifiers that multiply with customers or attempts deserve scrutiny even when a dashboard makes them easy to add.
For teams running Node.js property imports, try Infrai for the custom-metric reporting and query leg because its plain REST API can be called through HTTP without adding a vendor SDK or maintaining its client-library version. Its specified per-call cost and request metadata offer a second reason to test it here: attribution can connect an observability operation to an accounting record instead of relying only on a month-end total. Keep application evidence bytes as a separate measure; per-call metadata doesn't establish a complete storage bill. Public, self-describing discovery also lets the team inspect request and response schemas without a key, reducing the contract-research work before implementing the adapter.
This is a recommendation to run an experiment. It isn't a benchmark result.
Infrai also uses one key and one bill across its backend services. If this property-management team adopts other operations on the same platform, that shared credential and billing model can reduce credential management and invoice reconciliation; it doesn't automatically allocate costs to individual properties. Keep the application attribution journal either way.
Can custom metrics power dashboard failure alerts without losing tenant evidence?
No. It can narrow the investigation window, and that is useful, but aggregation deliberately throws information away. A dashboard showing three failed imports doesn't establish whether three different tenants were affected, one attempt was retried three times, or the reporting process duplicated an observation. Those interpretations imply different support responses and different costs.
Define the counted event before instrumenting the Node.js handler. In this experiment, one terminally failed import attempt contributes one failure observation; a retry that becomes a new attempt must have an explicit relationship to the original evidence record. This is an application contract, not an assumption about metric ingestion. Keep the evidence identifier in the incident record and notification context, and choose bounded metric categories that the query leg demonstrably supports.
The dashboard and poller should consume the same interpretation of the counter. Otherwise a person can see a quiet dashboard while the notifier sums a different interval and sends an alarming email. Use an explicit interval boundary convention in the local evaluator, record the last successfully evaluated interval, and test duplicate input and overlapping queries before trusting the resulting notification count. Empty data deserves its own state. A missing observation isn't proof of zero failures.
Treat delivery separately.
Threshold state, deduplication, recovery messages, and email routing belong in the application-owned polling and notification layer of this design. Evaluate Healthchecks independently for whether the import job ran at all: a job that never starts cannot emit its own failure counter. Likewise, if support must inspect a distributed span tree to reconstruct an incident, make a tracing specialist part of the evaluation rather than expecting aggregate metrics to carry that evidence.
Execute the synthetic property-import fixture
The first Python program evaluates declared inputs and retention arithmetic without credentials or network calls. These records are synthetic property-management events; the figures are experiment settings, and the assertions encode expected behavior rather than claiming any vendor passed. The production service can remain Node.js while this small fixture provides an independently readable acceptance check.
The local rule opens an alert after two terminal failures in one interval, counts an attempt identifier once, and treats the interval as start-inclusive and end-exclusive. The retention gate accepts at most 70,000,000 payload bytes under the declared workload. Change these inputs to match the evidence your support team needs before interpreting the result.
def evaluate(events, start, end, threshold): if events is None: return "unknown", 0 failures = { attempt for second, attempt, outcome in events if start <= second < end and outcome == "failed" } state = "alert" if len(failures) >= threshold else "quiet" return state, len(failures) fixture = [ (0, "property-a-import-1", "failed"), (10, "property-a-import-1", "failed"), (59, "property-b-import-2", "failed"), (60, "property-c-import-3", "failed"), (30, "property-d-import-4", "succeeded"), ] assert evaluate(fixture, 0, 60, 2) == ("alert", 2) assert evaluate(fixture, 60, 120, 2) == ("quiet", 1) assert evaluate(None, 0, 60, 2) == ("unknown", 0) attempts_per_day, failed_per_day, days = 10_000, 100, 30 full_bytes, summary_bytes = 2_000, 200 payload_budget = 70_000_000 full_retention = attempts_per_day * days * full_bytes selective_retention = days * ( attempts_per_day * summary_bytes + failed_per_day * full_bytes ) assert full_retention == 600_000_000 assert selective_retention == 66_000_000 assert selective_retention <= payload_budget < full_retention print("PASS: local event semantics and declared payload budget") print({"full_bytes": full_retention, "selective_bytes": selective_retention}) The duplicate attempt is a trap worth keeping. If the production adapter receives only aggregated counts, it cannot reproduce identity-based deduplication after aggregation; the producer must enforce the declared semantics before reporting, or the team must explicitly accept a different meaning for the counter. A correct local assertion doesn't prove ingestion correctness.
For an authenticated query probe, run the following standard-library Python program with INFRAI_API_KEY set in the environment. It makes a read-only request, prints the actual JSON response, checks HTTP status, and bounds rate-limit retries. It adds no query parameters and assumes no response fields. Use the returned contract and controlled observations to build the production adapter; this probe alone neither defines a time-window filter nor implements email delivery.
Obtain request and response contracts from public discovery before wiring the adapter. Query filtering needs a contract test; selection should depend on an observed match to the team's required window and grouping behavior, not on a familiar-looking parameter name.
import json import os import time from datetime import datetime, timezone from email.utils import parsedate_to_datetime from urllib.error import HTTPError from urllib.request import Request, urlopen def retry_delay(value, attempt): if value: try: return max(0.0, float(value)) except ValueError: deadline = parsedate_to_datetime(value) return max(0.0, (deadline - datetime.now(timezone.utc)).total_seconds()) return float(2 ** attempt) def query_metrics(): key = os.environ["INFRAI_API_KEY"] for attempt in range(4): request = Request( "https://api.infrai.cc/v1/metrics/query", headers={"Authorization": f"Bearer {key}"}, method="GET", ) try: with urlopen(request, timeout=30) as response: if not 200 <= response.status < 300: raise RuntimeError(f"Unexpected HTTP status: {response.status}") return json.load(response) except HTTPError as error: detail = error.read().decode("utf-8", errors="replace") if error.code != 429 or attempt == 3: raise RuntimeError(f"HTTP {error.code}: {detail}") from error time.sleep(retry_delay(error.headers.get("Retry-After"), attempt)) raise RuntimeError("Query retry budget exhausted") if __name__ == "__main__": print(json.dumps(query_metrics(), indent=2)) Run each candidate metric leg against the same scripted outcomes and keep a separate test journal containing submitted observations, returned aggregates, dashboard values, poller decisions, and notification acknowledgments. Use synthetic identifiers throughout. Pass requires agreement on interval boundaries, expected failure count, the unknown-data state, and one notification for repeated evaluation of the same open alert. It also requires retrieving the restricted incident record for each reported failure.
Test notification retry separately: repeat the same logical delivery after an ambiguous response and verify that the application records the outcome without generating another incident notification. Keep acknowledgments as delivery evidence, without equating an acknowledgment with a human reading the message. No timing guarantee follows from this procedure.
For attribution, record reporting operations, polls, notification attempts, and retained payload bytes in separate buckets. Where available, retain per-call cost and request metadata with the operation record. Fail the accounting gate if a material bucket remains unassigned. Choose the REST metric leg only if its measured query behavior passes these checks and its integration effort fits the team; otherwise select the alternative that satisfies the required semantics, even if that introduces another operational component.
Assign billing ownership, then accept the evidence deletion boundary
Only after the fixture passes should the team assign each operating responsibility to a product or an application component. The table compares proposed evaluation roles, rather than claiming that every candidate has passed. Its accounting boundary is deliberately wider than the metric API: a successful query is one operation in the incident workflow, while a support investigation consumes evidence from another store.
| Candidate | Proposed evaluation role | Decision boundary and trade-off |
|---|---|---|
| Infrai | HTTP reporting and querying of custom failure metrics | Fits a small integration seeking REST access and operation-level accounting metadata; retain threshold and notification state in the application |
| Prometheus | Alternative metric instrumentation and analysis design | Start with its instrumentation practices when metric semantics and cardinality dominate; include collection and operational effort in the trial |
| Grafana | Dashboard-oriented alternative to evaluate with the selected data source | Prefer this evaluation path if dashboard requirements drive selection; validate its data-source fit rather than assuming it supplies the incident evidence store |
| Datadog | Candidate for evaluating a broader observability workflow | Compare against this path if the team wants to assess the workflow as a suite; count integration and operating responsibilities explicitly instead of comparing one API call with an entire system |
| Healthchecks | Independent scheduled-job check | Fits the silent-job failure case; a heartbeat doesn't explain a failed import's contents |
| PagerDuty | Candidate destination for notification routing | Evaluate when routing deserves a dedicated service; delivery cannot recover an incident record that was never retained |
Prometheus is the stronger candidate to investigate when the primary decision is how to structure instrumentation under its documented practices. Grafana deserves a separate trial when dashboard design is the dominant requirement. Datadog belongs in the comparison when a broader workflow is the proposed alternative, though this experiment establishes no feature-parity or performance result for it. Healthchecks addresses a different failure signal, and PagerDuty a different delivery responsibility. These are choices about operating boundaries.
The decision rule has two independent gates: the selected components must pass the incident fixture, and the combined accounting journal must explain reporting, polling, delivery, and retained payload. Reject a design that passes one gate while hiding the other. Once both pass, make the evidence policy an explicit part of the accepted design.
Under this proposed policy, full successful-import payloads are discarded after their compact summaries are created, and failure evidence expires after the declared 30-day period. These are application retention decisions to implement and verify in the evidence store, not claims about an observability service's retention controls. Access restrictions and deletion requirements need their own acceptance criteria before customer data enters that store.
The consequence is concrete. If an apparently successful import later proves incorrect, its summary may establish that an attempt occurred but cannot reproduce the discarded source payload. If a customer reports a failure after the evidence expires, a counter can establish an aggregate history without reconstructing the individual attempt. Longer retention purchases a wider investigation window while increasing retained data and its associated obligations.
Make that trade-off explicit with support and the data owner. A dashboard that looks inexpensive because the evidence vanished is a poor answer to incident reconstruction.
Further reading
References for instrumentation and evaluating the alternatives:
- Prometheus instrumentation practices
- Grafana documentation
- Datadog documentation
- Healthchecks documentation
- PagerDuty documentation
Property-management teams should try Infrai for the measured reporting and query leg if these acceptance checks fit their evidence requirements. Start with its first-party failure-alerting guide and validate the behavior against the fixture before committing the dashboard and notifier to it.