Quick revision
The short answer
I would start from the use cases, incident debugging, security investigations, audit and analytics, because each needs different retention and query power, and then compare options on total cost over five years, including staff, hardware, licensing and egress, not just vendor prices. Collection should move to OpenTelemetry so the edge is not locked to any backend, compliance needs such as personal data handling, residency and retention are hard requirements, and whatever we choose is migrated with dual shipping and a planned cut-over period.
What to remember
In this answer, we decided a logging platform for five years by starting from use cases, incident debugging, security, audit and analytics, each with its own retention and query needs. We compared options on five-year total cost including staff, hardware, licensing, egress and growth, standardised collection on OpenTelemetry to avoid lock-in at the edge, treated personal data handling, residency and retention as hard constraints, scored the options with engineering, security and finance, and planned any migration by use case with dual shipping, success criteria and a contract that covers the cut-over.
Your turn
Answer it aloud as you would in the interview, or type your answer below. Then show one part at a time and compare.
I would start from the use cases, incident debugging, security investigations, audit and analytics, because each needs different retention and query power, and then compare options on total cost over five years, including staff, hardware, licensing and egress, not just vendor prices. Collection should move to OpenTelemetry so the edge is not locked to any backend, compliance needs such as personal data handling, residency and retention are hard requirements, and whatever we choose is migrated with dual shipping and a planned cut-over period.
Why this question is asked
A five-year platform decision is expensive to get wrong in either direction. Renew the vendor without looking, and the bill keeps growing with volume; move everything to self-hosted ELK because it looks cheaper, and the company may discover it has taken on an operations burden it cannot staff. Interviewers ask this to see how a senior leader structures a decision that involves money, risk, compliance and the daily work of many engineers. In this answer, we will start from use cases, build a total cost comparison, protect our flexibility with OpenTelemetry, treat compliance as a constraint, choose, and plan the migration.
1Start From Use Cases, Not Products
Logs serve several purposes, and each has its own needs. Incident debugging needs fast search over the last few days, good correlation with traces and high availability during outages. Security investigations need long retention, often a year, complex queries and integration with security tooling. Audit needs completeness, tamper resistance and retention set by regulation, sometimes many years, but rarely fast queries. Analytics, such as product questions answered from logs, often belongs in a data warehouse rather than a logging platform at all.
Writing these down with real numbers, such as daily volume, retention and query patterns per use case, changes the question. It is no longer vendor or ELK, but which platform for which use case, and the answer may be a split.
| Use case | Retention | Query needs | Share of volume |
|---|---|---|---|
| Incident debugging | 7 to 14 days | Fast, recent, trace correlation | About 80 percent |
| Security investigations | 1 year | Complex search, SIEM integration | About 10 percent |
| Audit | Per regulation, years | Rare, must be complete | Under 5 percent |
| Analytics | Months | Aggregations; better in a warehouse | About 5 percent |
2Compare Total Cost, Not Vendor Prices
The vendor quote is one line on a long list. For the self-hosted ELK option, we add hardware or cloud instances, storage including replicas and snapshots, the engineers who run, upgrade and secure the cluster and carry its pager, licensing or subscription for the features we need, and network egress if logs cross regions or leave the cloud. For the vendor option, we add the cost of growth, since usage-based pricing grows with volume, data egress to the vendor, and the people who still manage the pipeline and the contract.
We model five years, because the decision lasts that long, with realistic volume growth, for example 25 percent a year, and with the effect of volume reductions we plan anyway. A comparison that ignores staff typically favours self-hosting; one that ignores growth typically favours the vendor. Putting both on one page with the assumptions visible lets finance and engineering argue about the assumptions, which is where the real disagreement lies.
3Avoid Lock-In at the Edge With OpenTelemetry
Whatever we choose, the most expensive part of switching later is changing how every service collects and sends logs. So we standardise collection on OpenTelemetry: services write structured logs, node agents or OpenTelemetry collectors gather them, and only the collector's exporters know the backend. Logs from Spring Boot follow a common schema with trace ids, so they work with any backend that understands OTLP or JSON.
This reduces lock-in to the backend itself, which is a much smaller problem. In five years, if prices or needs change, switching becomes a project in the platform team rather than in every product team. It also improves our negotiating position right now, because the vendor knows we can leave.
4Compliance as a Constraint
Compliance needs are not trade-offs; they decide which options are allowed. We list them with the legal and security teams: where personal data may be stored (data residency, for example EU data staying in the EU), how it is masked or removed before storage, how long each class must be kept and when it must be deleted, who can access what and how access is audited, and what certifications the provider needs.
Each option is checked against the list. A vendor without a region in a required country may be ruled out for that data. A self-hosted cluster must show that it meets the same controls, which adds work for the team running it. Often the outcome is that audit and security logs stay in a tightly controlled store while debug logs can go to whichever platform is cheapest.
5Making the Decision
With use cases, costs and constraints in hand, we score each option: self-hosted ELK or OpenSearch, renewed vendor contract, an alternative such as Loki for the high-volume debugging logs, or a split. The scoring is done with representatives of the engineering teams, security and finance, against criteria agreed beforehand, such as five-year total cost, fit for each use case, operational risk and staffing, and compliance.
A common result looks like this: debug logs, the bulk of the volume, go to the cheapest platform that is fast enough for incident work; security logs stay with the security tooling; audit logs go to protected, low-cost long-term storage. The decision is written down with the reasons, the numbers and the conditions under which we would revisit it, such as volume doubling or the vendor's prices changing at the next renewal.
- List use cases with volume, retention, queriesDebugging, security, audit, analytics
- Model five-year total cost per optionStaff, hardware, licences, egress, growth
- Check compliance constraintsResidency, masking, retention, access
- Score options with engineering, security, financeCriteria agreed in advance
- Platform changes?YesDual ship, then cut over by use caseNoRenew with collection on OTel
- Revisit on triggersVolume doubles, prices change, needs change
6 steps in order. Play them, or step through them one at a time.
Collection moves to OpenTelemetry in every branch.
6Planning the Migration
If the decision is to change platforms, we migrate by use case, not all at once. The collectors dual ship, sending the same logs to the old and new platform for one use case at a time, starting with something lower risk such as debugging logs of a few teams. Teams use the new platform in real incidents while the old one is still there as a fallback. Success criteria are agreed before starting: query speed on common searches, alert parity, no lost events, and cost per gigabyte as modelled.
The contract timing matters too. We negotiate the renewal to allow a reduced scope or a shorter extension that covers the cut-over period, rather than a full five-year term for something we plan to leave. After cut-over, the old platform keeps its data until retention expires, read-only, and dashboards, saved searches and alerts are migrated with the teams' help, since that is where most of the human effort goes.
7Follow-up questions
What if the self-hosted team says they can run it with two engineers?
Then the cost model should test that claim against the reality of the current cluster: upgrades, security patches, capacity incidents and the pager. At several terabytes a day, two engineers is usually not enough for a platform that must be more reliable than the systems it monitors. It is better to plan for realistic staffing than to discover the gap during an outage.
Is a split platform harder for engineers?
It can be if engineers must search in several places during an incident. That is why the split should follow use cases that different people use: on-call engineers search debugging logs, security analysts use security tooling. Trace ids and a common schema keep cross-platform correlation possible.
How long should the cut-over period be?
Long enough to include real incidents and peak periods for each phase, typically one to three months per use case. Dual shipping doubles the cost of the data being shipped, so each phase has a planned end date.
8Conclusion
In this answer, we decided a logging platform for five years by starting from use cases, incident debugging, security, audit and analytics, each with its own retention and query needs. We compared options on five-year total cost including staff, hardware, licensing, egress and growth, standardised collection on OpenTelemetry to avoid lock-in at the edge, treated personal data handling, residency and retention as hard constraints, scored the options with engineering, security and finance, and planned any migration by use case with dual shipping, success criteria and a contract that covers the cut-over.
Open with
I'd start from what we use logs for, not from products. Incident debugging needs fast search over the last week or two and trace correlation, and it's most of the volume.
Then, if they want more
Security investigations need a year or so and complex queries, audit needs completeness and regulatory retention but rarely fast queries, and analytics probably belongs in the data warehouse. With volume, retention and query patterns per use case, the question becomes which platform for which use, and a split is often the answer.
Then I'd compare total cost over five years for each option: for self-hosted ELK, hardware, storage, licences or subscriptions, egress and above all the engineers who run it and carry its pager; for the vendor, usage growth, egress and the people still managing the pipeline, with realistic volume growth in both.
Whatever we pick, I'd standardise collection on OpenTelemetry with a common schema, so only the collectors know the backend and switching later is a platform project, not one for every team; that also helps in the negotiation. Compliance is a constraint, not a trade-off: residency, masking personal data, retention and access control decide which options are allowed.
Then we score options with engineering, security and finance, decide, and migrate by use case with dual shipping, success criteria and a contract that covers the cut-over period.
About this answer
- Last updated
- 12 November 2026
- Checked
- Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
- Where the question comes from
- Written by Scrivio for practice. It is not taken from an interview.
- Official documentation
- Spring Cloud documentation, Resilience4j documentation
Report an issue with this answer
Copy the line below and send it to the author with what you found. It carries the address of this page.
Issue with "Logging contracts with an observability vendor are up for renewal and your self-hosted...": https://scrivio-interview-library.netlify.app/spring-boot/observability/22b2b69e74/