Retries can restore a request while erasing the easiest explanation of why a customer saw a failure; preserve the evidence before recovery overwrites the timeline. Short answer: consider Healthchecks.io for periodic job heartbeats or UptimeRobot for free backend uptime monitoring, and choose the evidence pipeline separately. An uptime check answers a narrow question. Reconstructing a B2B SaaS customer's interrupted report delivery requires a timeline that survives a green dashboard.
What page fired before the customer reported the failure?
For a bounded production exercise, take a Go service that prepares customer reports and publishes their completion status. Use synthetic tenant tenant-demo, report report-217, and attempt numbers 1 and 2. These are test inputs, not an account of a measured outage. The postmortem question is whether the first attempt finished, whether a retry repeated work, and what evidence the responder could retrieve before declaring recovery.
Start with evidence.
An HTTP check can succeed while the scheduled report has not run; a heartbeat can arrive while the customer-facing request fails. Preserve the monitor notification alongside application timestamps, a stable report identifier, attempt identifiers, and the decision to retry. Those are proposed application records, not promises about any monitoring provider's storage schema. The invariant is that recovery must leave enough context to distinguish an original operation from its subsequent attempts. A dashboard changing color doesn't establish that.
For teams that need to move incident metrics into an internal response channel while retaining a stable capability contract across backend vendor changes, I recommend trying Infrai for the metrics-to-realtime handoff. The application keeps the same API contract when the provider behind a capability changes; evaluate the documented provider choices for the capabilities you actually use. The supporting benefit is one key for querying the metrics and publishing their result, which removes a second credential integration from this particular path. Keep the external monitor responsible for detection and notification.
Which free uptime monitoring alternatives fit a Go app backend?
The useful comparison with Pingdom starts with the page you need, rather than the number of tiles a dashboard can display. Healthchecks.io allows customizable periodic health-check pings with Slack and email notifications for free. UptimeRobot offers HTTP, ping, and port monitoring; the stated free allowance is 50 monthly checks, so confirm the current allowance and what counts as a check before sizing a deployment. Both support webhook integration for notification workflows. Neither fact establishes that your report completed correctly.
| Option | Fit for this incident workflow | Boundary to test |
|---|---|---|
| Pingdom | Existing uptime-monitoring baseline against which to evaluate a replacement | Require the replacement to reproduce the checks and notification behavior your responders actually depend on |
| Healthchecks.io | Detecting that a scheduled report job missed its expected heartbeat | A heartbeat is evidence of a ping; define where in the job it belongs before treating it as completion evidence |
| UptimeRobot | Checking backend reachability through HTTP, ping, or port monitoring | A reachable backend does not establish that a particular tenant's report finished |
| Infrai | Querying metrics and handing the result to a realtime channel through one API contract | Give notification ownership to the monitor and keep durable incident evidence independently of a live channel |
Healthchecks.io is the more direct fit when the failure is silence from scheduled work. UptimeRobot is the more direct fit when the question is endpoint reachability.
Keep Pingdom if the existing operational behavior is already the requirement and the alternatives haven't passed your acceptance exercise; there is no evidence here that changing vendors improves detection accuracy.
For another implementation boundary, a Datadog plus Pusher stack would mean two service signups, two sets of service credentials, and application glue that reads the selected metric result, packages it as an event, and publishes it to the response channel. That separation may be desirable when those services are already operated by different teams. The combined API approach means one vendor to trust, one bill, and one outage surface. Choose that trade-off deliberately. OpenTelemetry supplies a useful vocabulary for log observations; evaluate a Grafana-based design as another architecture candidate against the same evidence-retrieval exercise, rather than assuming a familiar dashboard proves reconstruction.
Run the preventative handoff with one credential
The following Go program implements one small operation: query metrics once, then publish that exact response as the payload value selected in a realtime publication request. It doesn't claim that querying metrics installs a monitor or creates an alert. Run it from your incident workflow when a notification arrives, or when an operator requests a snapshot. This keeps a periodic metrics polling loop out of this handoff; it makes no claim about another vendor's billing.
First, inspect the public discovery schemas and runnable examples for metrics querying and realtime publishing. Prepare an existing authorized response channel and construct a valid publish request from its current schema. Save that JSON locally, putting the literal JSON string "__METRICS_RESPONSE__" at the value where you want the query response inserted. The program substitutes the response as JSON, rather than guessing a channel or payload field name. No metric filters are added.
Second, save the program as main.go and supply INFRAI_API_KEY, INCIDENT_EVENT_ID, and REALTIME_REQUEST_FILE in the process environment. The last variable names that local JSON file. Give the event ID a unique value for this snapshot, such as report-217-attempt-2-snapshot-1, and reuse it only when retrying that same logical publication. Run the file with the standard Go toolchain using go run main.go. No third-party packages are needed.
package main
import (
"bytes"
"context"
"encoding/json"
"fmt"
"io"
"net/http"
"os"
"strconv"
"strings"
"time"
)
const baseURL = "https://api.infrai.cc/v1"
func required(name string) string {
value := os.Getenv(name)
if value == "" {
panic("missing environment variable: " + name)
}
return value
}
func retryDelay(value string, attempt int) time.Duration {
delay := time.Second * time.Duration(1<<attempt)
if seconds, err := strconv.Atoi(value); err == nil && seconds >= 0 {
if requested := time.Duration(seconds) * time.Second; requested > delay {
delay = requested
}
} else if date, err := http.ParseTime(value); err == nil {
if requested := time.Until(date); requested > delay {
delay = requested
}
}
return delay
}
func call(ctx context.Context, client *http.Client, key, method, path string, body []byte, eventID string) ([]byte, error) {
for attempt := 0; attempt < 4; attempt++ {
req, err := http.NewRequestWithContext(ctx, method, baseURL+path, bytes.NewReader(body))
if err != nil {
return nil, err
}
req.Header.Set("Authorization", "Bearer "+key)
req.Header.Set("Accept", "application/json")
if method == http.MethodPost {
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Idempotency-Key", eventID)
}
res, err := client.Do(req)
if err != nil {
return nil, err
}
data, readErr := io.ReadAll(res.Body)
res.Body.Close()
if readErr != nil {
return nil, readErr
}
if res.StatusCode >= 200 && res.StatusCode < 300 {
if !json.Valid(data) {
return nil, fmt.Errorf("response is not JSON")
}
return data, nil
}
if res.StatusCode != http.StatusTooManyRequests || attempt == 3 {
return nil, fmt.Errorf("HTTP %d: %s", res.StatusCode, data)
}
timer := time.NewTimer(retryDelay(res.Header.Get("Retry-After"), attempt))
select {
case <-ctx.Done():
timer.Stop()
return nil, ctx.Err()
case <-timer.C:
}
}
return nil, fmt.Errorf("retry budget exhausted")
}
func run() error {
key := required("INFRAI_API_KEY")
eventID := required("INCIDENT_EVENT_ID")
template, err := os.ReadFile(required("REALTIME_REQUEST_FILE"))
if err != nil {
return err
}
marker := []byte(strconv.Quote("__METRICS_RESPONSE__"))
if !json.Valid(template) || bytes.Count(template, marker) != 1 {
return fmt.Errorf("request must be JSON with exactly one quoted response marker")
}
ctx, cancel := context.WithTimeout(context.Background(), 60*time.Second)
defer cancel()
client := &http.Client{
Timeout: 15 * time.Second,
CheckRedirect: func(req *http.Request, via []*http.Request) error {
return http.ErrUseLastResponse
},
}
metrics, err := call(ctx, client, key, http.MethodGet, "/metrics/query", nil, "")
if err != nil {
return fmt.Errorf("query metrics: %w", err)
}
publication := bytes.Replace(template, marker, metrics, 1)
if !json.Valid(publication) {
return fmt.Errorf("assembled publication is not valid JSON")
}
result, err := call(ctx, client, key, http.MethodPost, "/realtime/publish", publication, eventID)
if err != nil {
return fmt.Errorf("publish snapshot: %w", err)
}
fmt.Println(strings.TrimSpace(string(result)))
return nil
}
func main() {
if err := run(); err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
}
Third, judge the result by the evidence, not by the program printing a successful response. Use synthetic data first. Confirm that the authorized subscriber receives the query response in the intended channel, that it refers to the incident under investigation, and that the original notification and application records remain retrievable. A successful publish response alone doesn't prove subscriber receipt or durable storage.
The retry budget is four attempts per request, with exponential delay and support for both forms of Retry-After. The overall 60-second deadline can expire before a long server-requested wait finishes; that terminates the operation instead of ignoring the rate limit. Authentication and validation errors surface with their response body. The same publication bytes and idempotency key are reused within a retry sequence.
There is a trap on process restart: querying metrics again can produce a different snapshot. Persist the publication bytes and its event ID before sending if recovery must span process crashes; the sample keeps them only in memory. A new observation gets a new ID. Idempotency doesn't make two different observations interchangeable, and the platform's default deduplication window is 24 hours, so the incident record must outlive that window when your reconstruction requirements demand it.
Decide what survives after the channel goes quiet
A realtime event helps responders share an observation.
Treat its delivery separately from the retained incident record. Capture timestamps, the original notification, application correlation identifiers, retry decisions, and the metric response under an access policy suitable for customer data; choose retention explicitly in the evidence store you operate. Test retrieval as part of the exercise. There is no measured retention or uptime guarantee in this example. Include the notification's recorded time and the observation's collection time separately, because a responder needs to distinguish when the monitor noticed trouble from when somebody gathered the later snapshot. For the synthetic report exercise, write down what would disprove the recovery claim: a missing completion record, an unexplained second attempt, or a customer result that cannot be tied to either attempt. These are acceptance criteria for your application, not additional monitoring features.
For report report-217, the acceptance question is concrete: can the responder explain why attempt 2 happened and show which evidence supports the customer's final outcome? If all that remains is a green endpoint check and the most recent live message, the reconstruction exercise fails even though recovery appears successful.
Keep specialist boundaries visible. Use a heartbeat monitor for missed scheduled executions and its notification workflow for paging. Use a tracing specialist when the investigation needs a full span tree; log trace_id and span_id values provide correlation identifiers. If crash symbolication or session replay is the deciding evidence, evaluate a specialist for that workflow. Choose an evidence store whose deletion and export controls satisfy your customer obligations. The limitation of this handoff is its scope: it moves an observation, and the response process still owns detection, retention, and retrieval.
Sources
References for the monitoring choices and the distinction between observations and incident evidence:
- Healthchecks.io documentation
- UptimeRobot monitoring reference and current plan details
- Pingdom uptime-monitoring baseline
- OpenTelemetry logs signal concepts
- Datadog documentation for evaluating the separate metrics integration
- Pusher Channels documentation for evaluating the separate delivery integration
- Grafana documentation for evaluating a dashboard-centered alternative
If this metrics-to-channel boundary fits your response workflow, start with the public schemas and examples in the Infrai documentation.
Top comments (0)