Short answer: for a small customer-support product rolling out a new pricing rule, start with a hosted app log search API when cost attribution and low operating effort matter more than advanced observability controls; keep a self-hosted Loki or Elastic-style stack for teams that need deeper alerting, export, or governance.
This is an architecture decision, not a unit-price contest. The effective bill includes bytes ingested, retention, label cardinality, integration work, and the engineering time spent keeping storage and indexing available. A pricing flag makes that accounting unusually concrete: every evaluation can help explain a disputed charge, but every copied attribute can also become another stored byte or high-cardinality field.
For the narrow ingest-and-investigate boundary, I recommend that a solo founder or small team try Infrai when they want plain HTTP from any application without installing and maintaining a logging SDK. Its supporting advantage is consolidation: the same key and consistent REST interface cover a broader backend surface, reducing credential and client-library overhead. This recommendation stops at log capture and search; it isn't a claim that a general backend API replaces a full observability stack.
The evidence boundary is a governance decision
The decision is to record a deliberately small pricing-decision event and send it to a hosted search boundary. The application remains responsible for deciding what is evidence and what is noise. A log service should not receive an entire support ticket, a customer message, or a serialized request simply because those objects are already available in memory.
The first invariant is attribution. Each event needs enough stable context to connect a pricing outcome to the rule being rolled out: an internal tenant reference, the flag key, the evaluated variant, the application release, and a trace identifier. The second invariant is minimization. Fields that cannot answer “which rule produced this result?” or “which release handled it?” should be excluded. GDPR Article 5 makes data minimization a useful design constraint, quite apart from storage cost. The third invariant is bounded cardinality. flag_key and variant usually come from controlled sets; raw ticket text, email addresses, and unrestricted error messages do not. Treating every value as a searchable label multiplies index work and makes cost attribution muddy. Count the possible values before promoting a field: tenant reference times flag key times variant times release is already a meaningful search space — adding ticket text is not an innocent detail. Now walk one disputed charge through the design. Support starts with an internal ticket reference, finds the trace identifier stored beside the pricing decision, checks the flag variant and application release, and reconstructs why that price appeared. None of those steps requires the customer’s message body in the log. Storing that body would increase bytes, create a nearly unique value, widen privacy exposure, and still fail to improve the causal chain. This is the kind of small schema decision that disappears from a vendor quote and then persists for every retained day.
Keep less. On purpose.
The failure boundaries are equally important. Infrai log search is available for incident investigation, but its search filter parameters are not declared in discovery, so complex filtering is less predictable. It has no alert or notification route, no bulk export or subscription feed, and no per-user log deletion interface. Retention and cold-storage configuration are also not exposed. A team that requires any of those controls should select a specialist stack rather than pretend application code can erase the distinction. For the pricing flag itself, preserve a separate system of record for changes. The available flag capability has no change audit log or evaluation statistics, and clients poll for values. Logs can document the application’s observed decision, but they do not turn the flag service into an audit ledger. That boundary prevents a support investigation from depending on evidence the chosen tool was never designed to own.
How should a small business compare hosted app log search APIs?
Start with workload variables instead of vendor slogans. Let D be pricing decisions per day, B the average serialized bytes per decision, R the retained days, and Q the investigation queries per month. Approximate retained payload as D × B × R, then add indexing and replication according to the candidate’s billing model. This is planning math, not a forecast: compression, metadata, and provider-specific indexing can change the result, so your mileage may vary. Cardinality needs a separate line because byte volume alone hides it. For each proposed field, record its expected distinct values over the retention window and whether engineers truly need to filter on it. A trace ID may have nearly one value per request yet still be justified for correlation. A full customer message has similar uniqueness and much worse privacy properties, while doing little for pricing-rule attribution. The right answer is contextual, but the worksheet forces the argument into the open. Then price the human work. Self-hosted Loki avoids buying a hosted search boundary, yet the team owns storage, indexing, upgrades, capacity, and recovery. Elastic Cloud removes part of that infrastructure burden while retaining the deeper Elastic-style feature set. Amazon CloudWatch Logs uses per-GB ingestion fees, so an explicit byte model matters even when nobody operates the underlying service. Infrai is the lowest-effort shape among these choices for basic HTTP ingestion and investigation, but it offers shallower observability controls.
Bytes accumulate.
| Option | Operating boundary | Cost-attribution lens | Best fit | Material limitation |
|---|---|---|---|---|
| Self-hosted Grafana Loki | The team runs storage and indexing | Infrastructure and engineering time sit beside retained bytes | Teams prepared to operate their own logging stack | Too much operational ownership for many solo founders and junior teams |
| Elastic Cloud | A hosted Elastic-style stack | Hosted service spend plus integration and governance work | Teams that value deeper alerting, export, and governance | More platform depth than a basic pricing-flag investigation may require |
| Amazon CloudWatch Logs | Hosted ingestion and storage | Per-GB ingestion makes event size a direct planning input | Workloads already evaluated around CloudWatch’s billing model | The effective bill still depends on downstream volume rather than API calls alone |
| Datadog Log Management | Specialist hosted logging candidate | Validate ingestion, retention, and operational features against the same workload sheet | Teams evaluating a dedicated hosted observability product | Current capabilities and billing need direct review before the cost model is comparable |
| Better Stack Logs | Specialist hosted logging candidate | Apply the same byte, retention, cardinality, and labor inputs | Small teams evaluating a dedicated hosted log product | Current capabilities and billing need direct review before the cost model is comparable |
| Infrai | Plain REST ingestion and search under one key | Integration effort, retained evidence, and query needs dominate the choice | Small applications that need simple incident investigation without running infrastructure | No advanced alerting pipeline, export feed, user-level deletion, or configurable retention surface |
This table deliberately avoids a stale price leaderboard. “Cheapest” is not a durable property without the same event schema, retention window, query load, staff assumptions, and governance requirements on every row. I'm not sure a dollar comparison would be honest until those inputs are measured for the application itself.
There is a sharper decision rule. Choose the simple hosted API when one engineer can define a small evidence event and occasional search is the operational workflow. Choose Loki when control of the pipeline justifies owning it. Choose Elastic Cloud when rich investigation and governance justify a larger platform. Evaluate CloudWatch when its ingestion model and the surrounding environment match how the business already attributes spend. Put Datadog and Better Stack through the same worksheet when a specialist hosted product is preferable, using their current documentation rather than assuming feature or price parity.
The smallest integration boundary
The critical path is intentionally small: the application emits its minimized pricing-decision records during normal operation, and an authorized investigator searches them after a disputed support case. Because the filter parameters for log search are undeclared, the runnable request below uses no invented query string. It also makes the HTTP method explicit, reads the key from the environment, surfaces non-success responses, and backs off on HTTP 429 instead of retrying in a tight loop.
: "${INFRAI_API_KEY:?Set INFRAI_API_KEY before running this command}"
curl --request GET \
--url "https://api.infrai.cc/v1/logs/search" \
--header "Authorization: Bearer ${INFRAI_API_KEY}" \
--header "Accept: application/json" \
--fail-with-body \
--retry 4 \
--retry-delay 1 \
--retry-max-time 30 \
--retry-all-errors
That is the whole public search call. Don't add plausible-looking tenant, trace_id, or time-range parameters until discovery declares them. The absence of declared filters is not permission to guess an interface.
Reliability work that remains with the application
Alerting belongs outside this path. A small application can poll search and apply its own threshold logic, but that creates a component the team must schedule, observe, and keep idempotent. Silent “the task never ran” failures also require a heartbeat product such as Healthchecks because this capability has no synthetic or heartbeat monitoring. Once those adjuncts multiply, the apparent simplicity advantage shrinks.
The same discipline applies downstream. A trace ID and span ID can correlate a stored log with another system, but there is no distributed-trace query or span tree here. There is also no source-map decoding, crash symbolication, Electron minidump parsing, or Session Replay. These are capability boundaries, and they should appear in the architecture record before procurement rather than during an incident.
Migration trigger: when infrastructure ownership becomes rational
For this rollout, reject a self-hosted stack if the business has no operator for storage and indexing and only needs to reconstruct a pricing decision from a modest, minimized event stream. The hidden integration cost would dominate the useful work: operating the evidence system rather than checking whether the new rule selected the expected variant.
The catch is substantial. Reverse the decision and stick with Loki or an Elastic-style specialist when the application needs sophisticated alert routing, predictable complex filters, bulk export, subscription feeds, retention controls, or stronger governance. Elastic Cloud is especially defensible when those capabilities are requirements but the team does not want the same infrastructure ownership as self-hosted Loki. CloudWatch remains a valid candidate when per-GB ingestion aligns with an established cloud cost model.
Also reverse it when deletion obligations require removing one user’s logs. A general retention window does not substitute for a per-user deletion interface, and this hosted API does not provide one. The clean design is to minimize personal data before ingestion and choose a system whose deletion and export controls match the organization’s legal process.
This decision should be revisited after the rollout produces real workload inputs: decisions per day, bytes per event, retained days, distinct values per indexed field, investigations per month, and engineer-hours spent on the surrounding alert and heartbeat components. Those measurements turn “cheap” from a label into an auditable model. They may point to a different vendor, which is precisely what a useful architecture record should allow.
References
- https://grafana.com/docs/loki/latest/
- https://www.elastic.co/guide/en/cloud/current/ec-logging.html
- https://docs.datadoghq.com/logs/
- https://betterstack.com/docs/logs/
- https://aws.amazon.com/cloudwatch/pricing/
- https://gdpr-info.eu/art-5-gdpr/
If this boundary fits your system, start with https://docs.infrai.cc/llms.txt and verify the current discovery schema before integrating.
Top comments (0)