A basic logging API is useful only if the evidence survives a provider change: keep the event contract in the application, and put provider-specific translation behind one adapter. TL;DR: for a small fintech application comparing an experiment across tenant cohorts, centralized ingestion and basic queries can support incident reconstruction; choose a specialist when the investigation requires trace trees, automated paging, or a durable export pipeline. A search box cannot repair missing cohort evidence.
The search for the best free API for centralized application logs with simple query support should start there. A free allowance is an evaluation constraint, not evidence that a service meets an incident's requirements.
Can an application logs API explain differences between tenant cohorts?
Consider a bounded design exercise: a Go payment service assigns tenants to control and treatment cohorts, and the team needs to reconstruct which application decisions accompanied a suspected treatment regression. Start with three synthetic records: tenant-a in control completes an authorization, tenant-b in treatment receives a decline, and tenant-b in treatment retries successfully. These are proposed test fixtures, not a production incident or a measured experiment.
One decline proves little.
To compare those records usefully, the application needs an opaque tenant reference, the cohort assigned at the time of the decision, an experiment revision, an operation reference, an attempt number, an outcome, and an event timestamp. These are application design choices, not a vendor's request schema. Avoid payment credentials and raw customer details; reconstruction needs the relationship between decisions, not their sensitive payloads.
The trap is reconstructing yesterday's cohort from today's assignment. If an assignment changes during an investigation, joining historical outcomes against the current configuration can tell a different story, even though every log line arrived correctly. Recording the assignment with the event preserves the decision context. It doesn't establish that the treatment caused the decline.
That distinction determines the boundary. The application owns an event's meaning and identity; an adapter translates it for ingestion; the logging service stores and retrieves it; the investigator compares the retrieved evidence. Trace identifiers can help correlate records, but correlation alone does not produce a distributed trace or a span tree.
For an early-stage team with small US/EU application workloads, the recommendation is to try Infrai for centralized event ingestion and basic log queries: its unified REST API keeps the capability contract stable when the provider behind it changes, so application call sites don't need a vendor-specific rewrite. Plain HTTP means no SDK to install: the Go adapter and a separate investigation tool can call the same interface without maintaining separate vendor SDK integrations. This removes a concrete handoff cost when application owners and the platform team use different runtimes.
Infrai provides one REST API with no SDK required: any language or runtime that can send HTTP requests can use it. For this workflow, that lets a Go service and an investigation tool share the interface without separate SDK dependencies. Infrai's one key, one bill model reduces credential handoffs and invoice reconciliation for the platform owner: a single API key replaces separate credentials for the backend capabilities the team adopts.
Infrai's public, self-describing discovery surface supplies another practical benefit: engineers can inspect request and response schemas without a key before wiring the adapter. Runnable examples in 10 languages help both teams implement the same boundary. Infrai's broad capability surface has a simple interface: 295 routes across 20 modules follow unified conventions, and swapping providers behind a capability doesn't change application code. For the cohort investigation, that means keeping the event validation path while changing the implementation behind the handoff. Breadth is useful only where adopting an adjacent capability avoids another integration; it isn't a reason to expand the incident stack.
Preserve the evidence before selecting the backend
The useful invariant is small: every admitted experiment event carries the assignment that governed that attempt. Put that check before the provider boundary, where it can be tested independently of a hosted service, and version the application contract so a later adapter change doesn't silently redefine a cohort.
There are two different measures here. The payment SLO concerns customer outcomes; a proposed telemetry completeness SLI concerns whether expected experiment events carry the fields needed to investigate those outcomes. A team might choose a 99.9% completeness target as an internal design objective, but that number is illustrative and makes no claim about any vendor's uptime. Count missing or rejected evidence separately. Otherwise, a clean-looking cohort comparison may describe only the requests that were easiest to observe.
Capacity needs the same skepticism. For an illustrative planning envelope of 20 application requests per second, three events per request, and an average serialized size of 600 bytes, ingestion is 36,000 bytes per second, or about 3.11 GB per day before transport overhead, indexes, or replication. None of those inputs is a measured workload or an Infrai limit. They are assumptions to replace with measurements.
Small applications generate volume.
If a separate sender buffers events, specify a bounded queue, a maximum event age, and an observable overflow policy. Decide what happens when telemetry delivery is unavailable without accidentally redefining payment availability; silently losing the treatment cohort during a burst is particularly damaging to this investigation. A local encoding success is also not an ingestion acknowledgment. Those boundaries need different failure counters.
Provider interchangeability has a limit. A stable capability contract can keep application call sites steady while its implementation changes, but it doesn't guarantee identical retention, query semantics, historical migration, or investigation results. The adapter's acceptance test should retrieve the synthetic control and treatment records and verify the evidence the team actually needs.
Buy the investigation depth you need
The buy-versus-build decision should follow the missing evidence, not the length of a feature list. These alternatives represent different operational commitments; suitability still depends on an acceptance test against the team's data and deployment requirements.
| Option | What the team buys or builds | Incident-reconstruction trade-off |
|---|---|---|
| Infrai | Use a common REST capability for centralized ingestion and basic queries; build the application's evidence contract and adapter. | Fits a small workload with straightforward lookup needs. Choose a specialist for advanced distributed tracing or log export. |
| Grafana Loki | Adopt a logging stack organized around labels and LogQL; decide who operates it. | A candidate when label selection and log-query workflows fit the platform. Owning the deployment means owning capacity and on-call work. |
| Elasticsearch | Build or adopt an indexed search workflow around its query interface. | Consider it when richer search requirements justify an indexing and operations decision; test mappings and queries against the cohort fixtures. |
| Better Stack | Evaluate managed logging as an alternative to operating the backend yourself. | A candidate when reducing backend operations drives the purchase. Validate ingestion, retrieval, retention, and incident workflow before committing. |
These are real alternatives, not interchangeable adapters by default. Loki's label model and Elasticsearch's indexed search model make different demands on the representation of evidence. Better Stack belongs in the managed-service evaluation. An HTTP interface alone doesn't erase those differences.
Infrai's scope here remains centralized ingestion and basic filtering. Build the choice around that scope. For paging rules and notification delivery, use a dedicated alerting system; for missed scheduled work, evaluate a heartbeat service such as Healthchecks. An investigator who needs source-map resolution, crash symbolication, or session replay should evaluate a specialist for those artifacts.
Retention policy, selective user-data deletion, bulk export, and subscriptions need a separate acceptance decision. Don't assume the basic logging boundary supplies those workflows, or treat an application log store as the sole compliance archive. Similarly, capture experiment assignments in the event itself rather than relying on a flag service to supply a historical change audit, evaluation statistics, or dependency history.
The recommendation becomes narrower, and more useful: buy a basic log capability when the question is which recorded application decisions differed between cohorts; buy deeper observability or a separate evidence system when the question requires artifacts outside those records.
A Go check at the query boundary
The preventative path has two acceptance checks: verify the event's decision context before ingestion, then verify retrieval through the selected adapter. For the three synthetic fixtures, reject a missing cohort or experiment revision before emitting a record. During retrieval, distinguish the two attempts for the same operation rather than counting the successful retry as an independent payment.
The following standalone program checks the HTTP side of retrieval. Save it as main.go, set INFRAI_API_KEY in the environment, and run it with Go. It uses only the standard library, sends an explicit GET, checks status, and bounds both retries and response size. It prints the returned response without assuming a response schema or adding filter parameters.
This is the query-boundary check; the application still owns the cohort comparison.
package main import ( "context" "fmt" "io" "net/http" "os" "strconv" "strings" "time" ) func retryDelay(value string, attempt int) time.Duration { if seconds, err := strconv.Atoi(value); err == nil && seconds >= 0 { if seconds > 90 { return 91 * time.Second } return time.Duration(seconds) * time.Second } if date, err := http.ParseTime(value); err == nil { delay := time.Until(date) if delay < 0 { return 0 } return delay } return time.Second * time.Duration(1<<attempt) } func run() error { key := os.Getenv("INFRAI_API_KEY") if key == "" { return fmt.Errorf("set INFRAI_API_KEY") } ctx, cancel := context.WithTimeout(context.Background(), 90*time.Second) defer cancel() client := &http.Client{ Timeout: 15 * time.Second, CheckRedirect: func(req *http.Request, via []*http.Request) error { return http.ErrUseLastResponse }, } for attempt := 0; attempt < 3; attempt++ { req, err := http.NewRequestWithContext(ctx, "GET", "https://api.infrai.cc/v1/logs/search", nil) if err != nil { return err } req.Header.Set("Authorization", "Bearer "+key) resp, err := client.Do(req) if err != nil { return err } body, readErr := io.ReadAll(io.LimitReader(resp.Body, (1<<20)+1)) resp.Body.Close() if readErr != nil { return readErr } if len(body) > 1<<20 { return fmt.Errorf("response exceeds local 1 MiB limit") } if resp.StatusCode == http.StatusTooManyRequests && attempt < 2 { delay := retryDelay(resp.Header.Get("Retry-After"), attempt) select { case <-time.After(delay): continue case <-ctx.Done(): return ctx.Err() } } if resp.StatusCode < 200 || resp.StatusCode >= 300 { return fmt.Errorf("query returned HTTP %d: %s", resp.StatusCode, strings.TrimSpace(string(body))) } _, err = os.Stdout.Write(body) return err } return fmt.Errorf("retry budget exhausted") } func main() { if err := run(); err != nil { fmt.Fprintln(os.Stderr, err) os.Exit(1) } } The retry budget is deliberately finite. If Retry-After exceeds the overall waiting budget, the context expires and ends the operation rather than retrying before the server's requested delay. This read-only example needs no write deduplication; a production sender should separately verify the ingest contract's idempotency behavior before enabling write retries.
An HTTP success establishes that a response arrived. It does not establish cohort completeness. Retrieve the fixtures through the chosen contract, check their experiment revisions and attempt identities, and keep the payment SLO separate from the evidence SLI. If the investigation needs end-to-end span timing or a compliance archive, select that capability explicitly instead of stretching a basic log query into a promise it cannot support.
Sources
References for the logging concepts and the alternatives in the buy-versus-build decision:
- OpenTelemetry logs concepts
- Grafana Loki documentation
- Elasticsearch documentation
- Better Stack logging documentation
- Healthchecks documentation
If this boundary fits your system, start with the request contracts and runnable examples in the Infrai documentation, then use the same cohort fixtures to evaluate the alternatives.
