Compares the main log platforms for .NET teams (Application Insights and Log Analytics, Seq, Elasticsearch/OpenSearch, Grafana Loki) on storage and indexing model, query language, licensing, cost drivers, retention tiers and Australian data residency, and how to choose.
All four store structured logs and let you search them, but they differ in how much they index, which drives cost.
I choose by team size, volume, existing cloud and who runs it, and I ship logs with OpenTelemetry so the choice stays reversible. The trade-off is index everything and query fast versus index little and pay less.
"The first thing I look at is how each platform indexes data, because that decides both the query experience and the bill. Log Analytics, which sits behind workspace-based Application Insights, ingests every field into columnar tables and lets you query with KQL; you pay mainly per GB ingested, and there are cheaper Basic and Auxiliary table plans plus long-term retention for data you rarely query. Elasticsearch and its fork OpenSearch build an inverted index on fields, so full-text search is fast, but the index costs disk, heap and someone to run the cluster. Grafana Loki goes the other way: it indexes only a few labels like service and environment, stores compressed chunks in object storage, and greps the chunks at query time. Seq is a single, self-hosted server that is lovely for structured logs from Serilog or OTLP and free for one user.
For a .NET team already on Azure, I usually start with Application Insights through the Azure Monitor OpenTelemetry distro, because logs, requests, dependencies and traces share an operation id and I get alerts and workbooks for free. I'd use Seq for local development and small internal systems, Loki when we already run Grafana and Kubernetes and volume is high, and Elastic or OpenSearch when the organisation already has a search cluster or needs heavy full-text analytics. Whatever we pick, the services emit through OpenTelemetry, so switching backends is a collector change, not a code change.
The mistake I see is choosing on features and discovering the cost later: a chatty Information log at 2,000 requests per second is tens of GB a day. A senior answer is that the platform matters less than what you send to it and how long you keep it."
| Platform | Storage and index | Query language | Who runs it | Licence (as of late 2026) | |
|---|---|---|---|---|---|
| Application Insights / Log Analytics | Columnar tables, every column queryable | KQL | Microsoft (PaaS) | Commercial, pay per GB | |
| Seq | Embedded storage with indexes on properties | Seq query language (SQL-like) | You | Commercial; free Individual licence for one user | |
| Elasticsearch | Inverted index per field (Lucene) | Query DSL, ES | QL, KQL-style Kibana queries | You or Elastic Cloud | AGPL v3 option added in 2024, alongside SSPL and Elastic Licence |
| OpenSearch | Inverted index (Lucene fork) | DSL, PPL, SQL | You or AWS OpenSearch Service | Apache 2.0, governed by the OpenSearch Software Foundation (Linux Foundation) | |
| Grafana Loki | Labels indexed; log lines in compressed chunks in object storage | LogQL | You or Grafana Cloud | AGPL v3 |
| Cost driver | Log Analytics | Elastic / OpenSearch | Loki |
|---|---|---|---|
| Ingestion | Per GB (cheaper for Basic/Auxiliary tables) | CPU to index | Low, no full index |
| Storage | Free interactive window, then per GB per month; long-term retention up to 12 years | Index is often 1-1.5x raw size, on fast disk | Object storage, cheap |
| Querying | Free for Analytics tables, billed for Basic/Auxiliary | Cluster capacity | Scans chunks, so wide queries are slow |
| Operations | None | High: shards, heap, upgrades | Medium |
| Choice | Fits | Avoid when |
|---|---|---|
| Application Insights | Azure-hosted .NET, small platform team, need correlation and alerts | Very high volume of low-value logs with no sampling or table plans |
| Seq | Dev machines, small teams, on-premises apps | Large multi-team estate needing RBAC at scale and long retention |
| Elastic / OpenSearch | Existing cluster, heavy full-text and security analytics | No one to own the cluster |
| Loki | Kubernetes plus Grafana, high volume, label-driven queries | You need fast free-text search across months |
A team of [12] services sent about [40 GB/day] of logs to Log Analytics, 70% of it Information-level HTTP noise. We moved the noisy container stdout table to the Basic plan, kept AppRequests, AppExceptions and audit events on Analytics, and set 30 days interactive with 1 year of long-term retention for audit. Ingestion cost dropped by about [55%] without losing anything we had queried during the previous six months of incidents.
Checks whether the candidate understands how log platforms differ underneath and can choose on cost, operations and risk rather than familiarity.
Green flags
Red flags
Full index (Elastic/OpenSearch) Columnar (Log Analytics) Label index (Loki)
------------------------------- ------------------------- ------------------
"order 42 failed" -> | Time | Svc | Level | Msg | {svc="orders",env="prod"}
term index: order->doc1 | ... | ... | ... | ... | -> chunk1.gz, chunk2.gz
failed->doc1 columns compressed, scanned grep at query time
fast term lookup, big index fast aggregations tiny index, cheap storage
failed AND order is a set intersection. The price is storage and heap, and mapping explosions when every log has different property names.summarize count() by bin(TimeGenerated, 5m).ILogger<T> --> OpenTelemetry logging provider --> OTLP --> Collector --> backend(s)
| |
+--> Serilog sinks (Seq, Elastic) [alternative] +--> Azure Monitor exporter
In .NET 10, ILogger plus the OpenTelemetry provider is the vendor-neutral path. The Azure Monitor OpenTelemetry distro (Azure.Monitor.OpenTelemetry.AspNetCore) is Microsoft's recommended way for new apps; the Application Insights SDK 3.x (released early 2026) also runs on OpenTelemetry under the hood for apps that still use TelemetryClient. Do not mix the 3.x SDK and the distro in one app.
| Plan | Use for | Query | Free interactive retention |
|---|---|---|---|
| Analytics | Data you alert on and query often | Full KQL, free queries | 31 days (90 with Sentinel) |
| Basic | High-volume troubleshooting data | KQL, queries billed per GB scanned | 30 days |
| Auxiliary | Verbose, rarely read, compliance | Slower, billed queries | 30 days |
All plans can keep data in long-term retention for up to 12 years. Check which tables support which plan before designing around it.
Logs often hold personal information by accident (emails, IP addresses, names in exception messages). Under the Privacy Act 1988, APP 11 requires reasonable steps to protect it and to destroy it when no longer needed, and a leaked log store can be a notifiable data breach. Keep the workspace in Australia East or Southeast, mask at source and set retention per data class rather than one long default.
requests/s x log lines per request x bytes per line x 86,400
= 500 x 6 x 600 B x 86,400 ~= 155 GB/day
That arithmetic, done before go-live, is what stops the end-of-month surprise.
datalust/seq), point an ASP.NET Core app at it with the OTLP exporter and query by a property.Usage | where TimeGenerated > ago(30d) | summarize GB = sum(Quantity) / 1024 by DataType | order by GB desc to see which tables cost the most.Sending ILogger output through OpenTelemetry so the backend is a configuration choice, not a code change:
// Program.cs (.NET 10)
using Azure.Monitor.OpenTelemetry.AspNetCore;
using OpenTelemetry.Logs;
var builder = WebApplication.CreateBuilder(args);
var backend = builder.Configuration["Observability:Backend"]; // "AzureMonitor" or "Otlp"
if (backend == "AzureMonitor")
{
// Logs, traces and metrics to Application Insights (connection string from config/Key Vault)
builder.Services.AddOpenTelemetry().UseAzureMonitor();
}
else
{
// Seq, Loki (via a collector), Elastic or OpenSearch all accept OTLP
builder.Logging.AddOpenTelemetry(o =>
{
o.IncludeFormattedMessage = true;
o.IncludeScopes = true;
o.AddOtlpExporter(); // endpoint from OTEL_EXPORTER_OTLP_ENDPOINT
});
}
var app = builder.Build();
app.MapGet("/orders/{id:int}", (int id, ILogger<Program> logger) =>
{
logger.LogInformation("Fetched order {OrderId}", id); // structured: OrderId becomes a column/field
return Results.Ok(new { id });
});
app.Run();
// Which tables cost the most in the last 30 days (Log Analytics)
Usage
| where TimeGenerated > ago(30d) and IsBillable
| summarize GB = sum(Quantity) / 1024 by DataType
| order by GB desc
ILogger with OpenTelemetry and route through a collector or distro.Seniors treat the log platform as a cost, risk and people decision, not a tooling preference. The questions are how much you index, how long you keep it, who operates it, and whether the team will actually use it at 3 am. A platform the team already knows (KQL for an Azure shop, Kibana for a team with an Elastic history) usually beats a technically better one nobody can query under pressure. I involve the people who will live with it (on-call engineers, security, finance) and record the choice in an ADR with the volume estimate it was based on, so it can be revisited when volume changes.
| Option | When it fits | Cost profile | When not to |
|---|---|---|---|
| Application Insights + Log Analytics | Azure, small platform team, want correlation and alerts out of the box | Per GB; table plans and long-term retention help | Unfiltered high-volume logs with no budget |
| Seq | Dev, small teams, on-premises | Cheap licence, one VM | Large estates needing scale and fine RBAC |
| Elastic / OpenSearch | Existing cluster, full-text and SIEM-style analytics | Infrastructure and people | No owner |
| Loki | Kubernetes + Grafana, high volume | Object storage, cheap | Frequent free-text searches over long ranges |
| Retention and query behaviour | Log Analytics | Seq | Elastic / OpenSearch | Loki |
|---|---|---|---|---|
| How retention is set | Per table: interactive period plus long-term retention up to 12 years | Retention policies by age and filter; storage-limited on the Individual licence | Index lifecycle policies (hot, warm, cold, delete) | Per tenant or stream retention in object storage |
| Query speed on old data | Long-term retention needs search jobs or restore (slower, billed) | Same as recent data while stored | Slower on cold/frozen tiers | Same scan cost, grows with range |
| Effect of longer retention | Linear storage cost | Disk on your server | Disk and shard count, can hurt cluster health | Cheap object storage |
Most of the saving comes from sending less (levels, sampling, dropping health-check noise) and tiering retention, not from changing vendor. I measure the decision with the Usage table (or equivalent ingestion metrics): GB per day per service, and which tables were actually queried in the last 90 days.
Your code always logs through ILogger<T>; the choice is what sits underneath.
AddSerilog). Destinations are sinks (Seq, files, Elastic, OTLP); enrichers add properties such as machine name or user id. It has rich destructuring and a bootstrap logger for start-up failures.UseNLog) uses targets and layouts, configured in nlog.config, popular in older enterprise estates.AddOpenTelemetry().WithLogging() exports to OTLP or Azure Monitor, with logs correlated to traces and metrics.For a new .NET 10 service on Azure I'd start with built-in + OpenTelemetry; I'd keep Serilog or NLog where a team already relies on their sinks. The trade-off is fewer moving parts versus richer formatting and sink choice.
First measure, don't guess: in Log Analytics run union * | summarize sum(_BilledSize) by itemType, then break traces down by category and message template (OriginalFormat). One or two sources usually dominate: a Debug level left on, EF Core SQL command logging, HTTP body logging, health probes, or two pipelines sending the same data.
Latency rises because logging runs on the request thread: synchronous sinks, a full console queue, or formatting large payloads.
Fix in order: levels per category (configuration, no deploy), remove duplicates and noise, sample traces while keeping metrics complete, then workspace controls: daily cap as a safety net, cheaper table plans, retention, and a cost anomaly alert. The trade-off: every gigabyte you cut must not be the one you need at 3 a.m.
Structured logging records an event: a constant message template plus named properties, instead of a pre-built string. In logger.LogInformation("Order {OrderId} placed in {ElapsedMs} ms", id, ms), the provider gets the template and the values separately, so OrderId and ElapsedMs become queryable fields (Application Insights customDimensions, OpenTelemetry attributes, Seq properties).
With string interpolation ($"Order {id} placed") the provider only sees a finished string: no properties, a different message every time, and the string is built even when the level is disabled. Analyser CA2254 warns about this.
The trade-off: templates take discipline in naming, but they turn logs from text you grep into data you can filter, group and alert on.
How to tell it (STAR)
**S:** Our [12] services were sending around [40 GB] of logs a day and the bill was the platform's largest cost. **T:** I was asked to cut it without hurting incident response. **A:** I used the Usage table to find the top tables, then checked LAQueryLogs to see what we actually queried in incidents. I dropped health-check noise at the collector, raised framework log levels, moved console logs to the Basic plan and set retention per data class. **R:** Ingestion cost fell by about [55%], and in the next [three] incidents we never needed data we had dropped.
Last updated 23 Nov 2026.