See CHANGELOG.md for the full list of changes.
4.0.0-rc.2 (2026-11-04)
Reverts
4.0.0-rc.1 (2026-11-03)
⚠ BREAKING CHANGES
- Upgrade Go module to github.com/grafana/loki/v4 (#25972)
- querytee: Configure a primary and a secondary backend (#25552)
- querytee: Remove the request splitting (#25496)
- engine: Unplug the V2 query engine from the config and modules (#25353)
- querytee: Remove the routing modes (#25487)
- Rename remaining
loki_boltdb_shipper_*metrics toloki_tsdb_shipper_*(#25345) - operator: Stop reconciliation of deprecated BoltDB schemas (#24990)
- logql: Stop writing preserve_error as a label (#24877)
- operator: Make schemas field required in storage spec (#24716)
- logql: Let an error filter decide whether a metric query keeps errored samples (#24719)
- logql: Apply grouping to an errored sample's labels (#24712)
- Remove deprecated ruler_remote_write_* per-tenant limits (#22941)
- frontend: Default frontend.encoding to protobuf (#23985)
- Remove support for experimental LogQL variants() queries (#23823)
- Remove
row_shardsfrom the schema configuration (#23683) - Remove the disable_broad_index_queries setting (#23679)
- Remove unused
period_configsettings that are no longer used by TSDB index (#23665) - ruler: Remove deprecated remote-write 'client' setting (#23453)
- Remove deprecated
per_tenant_override_configandper_tenant_override_period(#22856) - ruler: Always wipe the remote-write WAL on startup (#22509)
- storage: Use Thanos storage clients by default (#22676)
- Remove targets for Simple Scalable Deployment (SSD) (#21481)
- Remove index read cache and index cache validity settings (#22066)
- Remove deprecated write dedupe cache (#22056)
- Remove deprecated BoltDB Shipper storage backend (#21678)
- Remove deprecated per-tenant setting
unordered_writes(#21835) - Remove deprecated
allow_deletesconfiguration option (#21808) - Rename metric
loki_log_flushes(#21765) - Remove deprecated
loki_log_messages_totalmetric (#21764) - ksonnet: Remove boltdb-shipper specific flags from lib (#21656)
- Remove deprecated BoltDB storage backend for indexes (#21637)
- Remove deprecated gRPC storage backend (#21638)
- Remove deprecated DynamoDB storage backend (#21601)
- Remove deprecated Cassandra storage backend (#21574)
- Remove support for BigTable/GCP storage backend (#21502)
Features
- Add a gauge for the max inflight bytes limit (#24209) (110923a)
- Add a metric that reports when goldfish racing is enabled (#21376) (b48a70c)
- Add a minimum number of shuffle shard size in index gateway client (#22573) (7d69c1c)
- Add caching node to dataobjscan node (#21246) (9ed2dd0)
- Add circuit breaker to drop traffic (#23157) (f9ed564)
- Add flag to ignore missing chunks during deletion of logs with line filter (#24204) (22b28a7)
- Add label based access control LBAC (#21266) (976379a)
- Add limit for max inflight bytes (#23188) (7a5c93d)
- Add limit on max buffered bytes in pattern-tee (#21855) (8c6c2ab)
- add metric loki_distributor_dataobj_tee_estimate_rate_bytes (#21441) (cae9486)
- Add more details to failed query usage logs (#25616) (b21487a)
- Add per tenant max push size override (#24194) (443c975)
- add per-phase histogram metrics to engine worker pipeline (#21547) (c0a243b)
- Add policy to limits service and ratestore metrics (#25182) (16149f6)
- Add q param to /config for scoped field access (#24230) (b645ac3)
- add stats and postings index sections with encoding abstraction (#21442) (8553815)
- Add support for otlp protocol to canary for continuous testing of otlp ingestion (#24985) (6abd850)
- Add support for sharding nested streams by rate and time (#24476) (a832813)
- add time sharded estimate (#21463) (47e1e81)
- Add X-Loki-Backfill-Day header to label backfilled streams (#22628) (bb93c60)
- alibaba oss: Alibaba oss ecs ram role (#21989) (5555ff9)
- Align loki_querier_worker_inflight_queries metric betweek Frontend v1 and v2 (#23452) (48444ab)
- Allow overriding rate limits per ingestion policy (#22435) (bd7c05d)
- auth: Add no_auth_tenant config option for single-tenant mode (#21819) (7923fe1)
- Avoid executing tasks for which we have cached empty results (#21437) (fb6abe5)
- Batch cache fetches in schedulers during task pruning (#21548) (f367374)
- canary: Implement support for path prefixes (#24534) (a8b5c92)
- ci: Include linux/riscv64 Loki build in releases (#21597) (76e65d7)
- clamp pointerscans to index start/end timeranges (#21534) (2e0a70d)
- Collapse max request body size and decompressed size (#24076) (3dc5a8e)
- compaction: Build index over compacted log objects in LogMerge (#23214) (eb93257)
- compaction: Compact a configurable lookback of older windows (#23411) (4d0120c)
- compaction: Implement merge for log objects (#23117) (b88aca5)
- compaction: Log object compaction - contract changes (#23065) (d821f2b)
- compaction: Merge unique label sets to one global ID during compaction (#24107) (48e7ae3)
- compaction: Observability for log compaction (#23122) (aa5e221)
- compaction: Track dataobj compaction artifacts via arrow record results (#23364) (47f6607)
- compactor: Add new
increase_generation_numbersendpoint (#22443) (4649720) - compactor: Improve dataobj compaction planner logging (#23752) (cf17501)
- compactor: Reuse logsobj builder metrics (#22138) (bd6316d)
- compactor: Take the LogMerge stream layout from the source objects (#25576) (859aea2)
- dataobj-compactor: Add an IndexFilter compaction task (#25024) (1aac226)
- dataobj-compactor: Add compaction dry-run flag with audit logging (#22308) (0b12196)
- dataobj-compactor: Add CompactionMerge physical-plan node (#21844) (12c419b)
- dataobj-compactor: Add compactor target skeleton, no-op coordinator stub (#21818) (4cd2cf1)
- dataobj-compactor: Add dataobj-compactor-worker target scaffold (#21873) (3a3245b)
- dataobj-compactor: Add metrics for duplicates & log-merge throughput (#24952) (fbafe9e)
- dataobj-compactor: Bucket log compaction bytes by age (#25127) (0c70fcc)
- dataobj-compactor: Calculate compaction runs/jobs (#21845) (3dd8056)
- dataobj-compactor: Check index file reachability before log-merge (#25151) (1b30992)
- dataobj-compactor: Compactor coordinator/planner main loop (#21973) (5790955)
- dataobj-compactor: Index compaction metrics (#22087) (89ea0d4)
- dataobj-compactor: IndexMerge executor over postings + stats sections (#22233) (030dd44)
- dataobj-compactor: Introduce sized compaction levels (#24987) (4a7284a)
- dataobj-compactor: Keep unmerged runs by filtering the source index (#25027) (a2a927d)
- dataobj-compactor: Log compaction planning and scheduling (#23125) (6034cdc)
- dataobj-compactor: Log merge executor planning (#23201) (03cf02a)
- dataobj-compactor: Tighten Planner<>Worker result contract (#24796) (83669cd)
- dataobj-compactor: Treat unfilled levels as Converged (#25000) (e1cbc94)
- dataobj-inspect: support more section types (#21269) (286bca7)
- dataobj/explorer: Decode indexpointers rows in inspect endpoint (#22276) (fe7529a)
- dataobj/postings,stats: Add merge builders and row decoders (#22229) (03cd800)
- dataobj: Add an indexer that builds one index object per data object (#24638) (c630246)
- dataobj: Add bloom and regex pushdown predicates to dataset scans (#22551) (fa9c6f4)
- dataobj: Add metadata cache mechanism for data object opens (#24553) (174912b)
- dataobj: Add Metastore.SectionsStream() support (#25426) (4f8e001)
- dataobj: Add postings Scanner with pushed-down selection (#22582) (71a5792)
- dataobj: Add sort_schema config and feature flag (#21460) (30549ac)
- dataobj: Add stream-first data-object query integration test (#24986) (e16bfc3)
- dataobj: Back off idle compaction workers to spare object storage (#23372) (1c57d2c)
- dataobj: Build single-tenant data objects and ToCs (#24791) (41a02c2)
- dataobj: Decide data object routing in the query-frontend (#25117) (f006543)
- dataobj: Enable lazy downloading of pages in batches when reading dataobj (#24041) (bf703b0)
- dataobj: Export required builder replicas from the builder of partition 0 (#25198) (6731504)
- dataobj: Filter streams by shard bucket range (#24594) (8522c1a)
- dataobj: Flush the builders of a flush concurrently (#25164) (64465da)
- dataobj: Implement sort schema (#21557) (a2c4884)
- dataobj: Introduce per-tenant shard factor override (#25200) (7383d1a)
- dataobj: Keep consuming records while the previous flush runs (#25375) (58b23c2)
- dataobj: Match stream IDs in the streams row reader (#24592) (98def97)
- dataobj: Persist shard bucket in index objects (#24010) (3b9130a)
- dataobj: Plan reads as the metastore streams sections (#25500) (fdb6b7a)
- dataobj: Plug the metadata cache into the querier (#25014) (804975b)
- dataobj: Project columns in the logs row reader (#24585) (51a4cb1)
- dataobj: Prune index rows by shard bucket range when resolving sections (#25138) (3fc344f)
- dataobj: Read the stream layout only from the streams section (#25578) (a26d83b)
- dataobj: Record index sizes (file + uncompressed logs) in the ToC (#23331) (0172979)
- dataobj: Record the stream layout in the streams section (#25575) (4b85657)
- dataobj: Reduce postings indexing allocations via observe/aggregate pattern (#21610) (96a0574)
- dataobj: Schedule LogMerge via per-tenant IndexMerge/LogMerge flip-flop (#23316) (c70cfc5)
- dataobj: Split per-tenant compaction into index and log toggles (#23371) (7a34f30)
- dataobj: Write min/max shard buckets to index files (#24225) (8b80648)
- default loki-mixin dashboards to TSDB (#18732) (d5fa6f7)
- distributor: Add a configurable cap on ratestore based stream shard count (#25023) (0935e4b)
- distributor: Add histogram metric for streams per push request (#24943) (fdb9de0)
- distributor: Add live mode for limits-service stream sharding (#24788) (8181fd0)
- distributor: Add OTLP parser config to defer resource and scope attribute expansion (#24818) (d54d3a3)
- distributor: Add produce latency histogram to dataobj-tee (#22068) (047870d)
- distributor: Compare shard counts against the ingest-limits service (#24687) (5f9c1fc)
- distributor: Generalize backfill day to opaque shard and disable Loki time sharding for backfill (#23248) (d083dcd)
- distributor: Skip reject_old_samples validation for backfill streams (#23723) (74c40cf)
- Drop streams with special labels in pattern ingesters (#25362) (efa4300)
- engine/physicalpb: Add IndexMerge node marshalling (#22231) (b3e9265)
- engine/workflow: Add dormant taskTypeCompaction admission lane (#21813) (4e9a034)
- engine: Name the unimplemented feature when the v2 engine falls back (#22365) (9967e80)
- fluentd: bump version (#21337) (33fdfa1)
- handle context cancelation in memcached batching (#21625) (abc30f5)
- helm: Update charts for GEL (#21590) (733fb71)
- Improve index builder performance by not holding the lock during the whole
Calculate(#21632) (08820d7) - index-gateway: Add
/sync-indexesendpoint for on-demand index sync (#22637) (cc1f4f4) - index-gateway: Cache expanded TSDB postings (#24453) (5592b35)
- index-gateway: Reuse postings cache entries across fingerprint shards (#25038) (605cb65)
- indexgateway: Add admission control to bound concurrent requests (#23932) (d8e1eaa)
- ingester: Add /flush/tenant endpoint to flush a tenant and ship its index (#22499) (5da6fee)
- ingester: Add stream-first sample order to the ingester (#24684) (9f86cc9)
- ingester: Flush only chunks by default in /flush/tenant (#25201) (016176b)
- ingester: Set chunk IngestedAt at flush for backfilled streams (#22812) (ba89e12)
- Introduce max-age option for index-builder (#21294) (4772bfc)
- Introduce per-tenant setting to allow rejecting partial pushes for policies (#25074) (de0378b)
- Introduce tsdb.shipper.index-reader-mode feature flag (#23663) (828efbc)
- iter: Add stream-first sample iterator merge (#24539) (77a72aa)
- kafka: Add native histograms for Produce latency (#25069) (88b4d9b)
- kafka: Kafka decoders support both formats (#24244) (52c7d20)
- kafka: Kafka encoder for InternalPushRequest proto (#24412) (fd9742a)
- kafka: Reject partial produces when the buffer is full (#22417) (1be4ce7)
- lbac: Promote label-based access control to GA (#25231) (b13a0ab)
- limits-service: Persist streamShardStore state (#24752) (0603711)
- logcli: Return errors from library and handle fatal in CLI (#18778) (68171cf)
- logline: Add correctness as a Loki target (#24799) (e5ca8ec)
- logline: Add hint-time-range wire contracts (#24606) (b875553)
- logline: Add v4 index version with 9-digit numeric n-grams (#24468) (7bea31c)
- logline: Apply hint ranges in queriers (#24714) (2fc573e)
- logline: Attach hint ranges instead of envelope fan-out (#24740) (febb425)
- logline: Better regex literals selection (#24800) (e3ebecb)
- logline: Carry hint ranges through query transport (#24607) (58d7fb6)
- logline: Dry-run supported instant metric queries (#25507) (f5362e5)
- logline: Dry-run supported range metric queries (#25214) (40286e6)
- logline: Fork v3/v4 into in-development v5 (#24820) (4d5c2cf)
- logline: Let the compactor write Elias-Fano postings (#25435) (2348cbd)
- logline: Read Elias-Fano postings (#24859) (d795bca)
- logline: Report Logline query stats on the metrics.go line (#24991) (864308d)
- logline: Report Logline stats and outcome in data.stats.logline (#25082) (a351ab5)
- logline: Report the hint wait time per query (#25251) (bad4df1)
- logline: Route cache-miss hint lookups through queriers (#24678) (d041a69)
- logline: Run the compaction scheduler and compactor as Loki targets (#25146) (1c0a52e)
- logline: Run the index builder as a Loki target (#24480) (65a51cd)
- logline: Split Logline filters into k gap-cut envelopes (#24475) (8853153)
- logline: Wire logline filtering into the query frontend (#24727) (3105b2b)
- logql: Add approx_count_distinct syntax and extractor (#24112) (e70b294)
- logql: Add per-tenant query bytes counter metric (#23382) (3fd2d13)
- logql: Add support to evaluate sum(count_over_time) in stream-first order (#24851) (404dfbf)
- logql: Evaluate approx_count_distinct with HyperLogLog (#24114) (21d9d6b)
- logql: Evaluate CountDistinctSketchExpr as mergeable HLL sketches (#24196) (79c7a7d)
- logql: Evaluate sum of sum_over_time in stream-first order (#25438) (d459abd)
- logql: Log stream-first and timestamp-first query counts in metrics.go (#25017) (c434fe9)
- logql: Log the error on the query stats line (#25004) (46fec29)
- logql: Report estimated_query_bytes from index-stats lookups (#21796) (35ca2f6)
- logql: Shard and transport approx_count_distinct sketches (#24120) (3969791)
- logql: Track stream-first query stats, add integration test (#24984) (d3faa49)
- loki-canary: Support bearer token auth (#24533) (0473a09)
- lokitool: Rename
rules linttorules format(#21671) (01f2177) - metastore: Add postings metrics (#22946) (35d5a2a)
- metastore: Add read-path metrics and locality stats for postings index (#22493) (667368f)
- metastore: Add TableOfContentsWriter.ReplaceIndexPointers method (#21932) (10fc249)
- metastore: Drive stream selection through the postings Scanner (#22583) (e3b83f0)
- metastore: Enable range stats for postings section columns (#23185) (0e298b6)
- metastore: Open postings sections concurrently (#23187) (5a871e4)
- more accurate counts of max_inflight_bytes (#21611) (4965669)
- Move logline hintprovider and logline/v3 to Loki (#24440) (9c24b8d)
- Move logline query-frontend and limits to Loki (#24455) (f25906d)
- Move some logline packages to Loki (#24435) (d769a31)
- On-disk serialization for postings and stats index sections (#21591) (deff86d)
- operator: Add CPU and memory utilization ratio telemetry recording rules (#23379) (4cc1c43)
- operator: Add LokiStack telemetry recording rules for OpenShift (#22505) (18ad527)
- operator: Add passthrough-gateway component (#20382) (bf06e45)
- operator: Add support for full TLS compliance for OCP 5.0 (#24216) (8ce415a)
- operator: Allow custom certs to be used by the passthrough gateway tenancy (#23896) (abf69d1)
- operator: Allow removal of expired schemas based on retention period (#24456) (16446f8)
- operator: Enable flush_on_shutdown and increase ingester terminationGracePeriodSeconds (#24325) (90c3797)
- operator: Enable multi-variant queries (#21009) (709e318)
- operator: Introduce passthrough tenancy (#20573) (ca8aac8)
- operator: Make schemas field required in storage spec (#24716) (071148c)
- operator: migrate to thanos objstore backend (#20475) (ffcac2c)
- operator: Produce metrics about managed LokiStacks (#21838) (2f0e0ba)
- operator: Remove obsolete warning about old schema versions (#25155) (1d6f9e2)
- operator: Stop reconciliation of deprecated BoltDB schemas (#24990) (4c138a9)
- operator: Support private VPC S3 endpoints in endpoint validation (#22395) (394caef)
- operator: Update Loki operand to 3.7.7 (#24448) (04417f4)
- operator: Update Loki operand to 3.7.8 (#24743) (f1f1b23)
- operator: Update Loki operand to v3.7.2 (#22075) (01499dc)
- operator: Update Loki operand to v3.7.3 (#22645) (f64e9ac)
- operator: Update ServiceMonitors to use serviceDiscoveryRole: EndpointSlice (#21731) (d3a12c7)
- operator: Watch object storage Services for NetworkPolicy updates and surface ports in status (#22436) (12822d5)
- otlp: add event_name to OTLP log structured metadata (#21229) (c9a1785)
- otlp: Adds a reporter to view attributes expanded to structured metadata (#23637) (88a08ba)
- pattern-ingester: Add a gRPC method that accepts InternalPushRequest (#25006) (f0dfaa0)
- pattern: Make stream ownership pluggable for Kafka ingestion (#25408) (a3b624e)
- pattern: Support both gRPC and Kafka ingestion (#25432) (ebd3000)
- postings: Add postings data locality to xcap (#23070) (5de9bad)
- querier: Add object-store and section resolution metrics to data-object queries (#25034) (e1f0dc3)
- querier: Read metric queries from data objects (#24699) (d2d7405)
- querier: Read stream-first metric queries from data objects (#24897) (b0fcdb8)
- query engine: Add workflow optimizer to clamp predicates on scan nodes (#21327) (4e187b1)
- query engine: Implement line_format and label_format with new engine (#20123) (7be7c9d)
- querylimits: Allow TSDB sharding strategy overrides (#22332) (a0f24ce)
- querytee: Add selection strategies for the secondary backend (#25615) (78990d2)
- querytee: Add the data object flags and read only the limits from the Loki config (#25633) (8cd4007)
- querytee: Compare the stats of the secondary backend with the primary's (#25623) (ed69fdc)
- querytee: route v2-unsupported request types directly to v1 in SplittingHandler (#21450) (4515b4b)
- Remove Promtail support (#21245) (572df01)
- Remove support for experimental LogQL variants() queries (#23823) (132e5f9)
- Remove task_pruning_cache_fetch_batch_size in favor of existing memcached batching (#21593) (24ca0e4)
- Rendezvous shuffle sharding algorithm for data objects with opt in configuration (#22167) (60db1ba)
- Resolve cached tasks in parent task (#21558) (904c963)
- retention: Use chunk IngestedAt for retention decisions (#22819) (e16efe7)
- return caching stats in new engine (#21369) (c32b57f)
- ruler: Always wipe the remote-write WAL on startup (#22509) (636c007)
- s3: Update thanos-io/objstore fork to add connection metrics (#25170) (89564d0)
- storage: Add custom TLS CA certificate support for Azure Blob Storage connections (#23062) (3a68a80)
- storage: Add stream-first sample order to the chunk store (#24562) (8eb103b)
- Support more kafka producer options (#24402) (bd2cc6f)
- Support per-policy stream sharding overrides (#22451) (8ee465e)
- tools: Adds a CLI for measuring postings and logs locality (#23103) (61f1bb4)
- tsdb: Add FormatV4 reader and writer foundation (#22370) (3b7142e)
- Upgrade Go module to github.com/grafana/loki/v4 (#25972) (7af5f26)
- Use
AppendOrderedstrategy to avoid sorting and merging stripes (#21395) (bd7530f) - use query logger on metastore workflow (#21511) (b68de56)
- validation: Add inherit_limits flag to per-policy override limits (#23751) (bcc85b0)
- WIP: Task level caching (#21160) (bd51fca)
- Write all Kafka records at once (#21542) (fe7f43b)
Performance Improvements
- Allocate capacity for fewer pattern samples up front (#23600) (0756067)
- avoid unnecessary shuffle sharding (#21344) (34e5cc9)
- blooms: return full slice to pool after use (#20981) (9d9c7af)
- chunkenc: Remove the per-sample allocation from the dedup hash (#23821) (b3676fa)
- compactor: Key TSDB builder streams by labels hash (#25593) (ba46804)
- dataobj: Compile predicates once per read instead of once per row (#24982) (ffd778d)
- dataobj: Flush the largest builder first (#25376) (0fbc71b)
- dataobj: Memoize repeated stream ID lookups in the logs row reader (#25016) (9732690)
- dataobj: Prefetch 64 KiB when Sections opens an index object (#25244) (d819053)
- dataobj: Speed up index compaction (O(1) stats size, trim postings bitmaps) (#23274) (f3388e0)
- engine: Short-circuit DataObjScan when logs predicate is unsatisfiable (#22162) (a7adf30)
- Hold on to less memory by trimming results down to request limit (#24198) (8c1864a)
- idx-gateway: Use the label values fast path when no matchers are given (#24831) (f3c840c)
- index-gateway: Deduplicate concurrent postings cache lookups (#25039) (76a0ce2)
- indexgateway: Avoid retaining chunk refs during shard sizing (#24723) (6e9c738)
- indexgateway: Only calculate chunk groups if we're going to return them (#24113) (7325deb)
- indexshipper: Open downloaded index files before taking the index set write lock (#24832) (df68cbc)
- Lazy instantiation of drains for pattern ingesters (#23944) (3d6cc54)
- logline: Compress postings blocks at zstd level 3 (#24824) (b6ffedf)
- logline: Merge index shards concurrently (#24713) (a54ada3)
- logline: Run pass-through intervals without waiting for the hint lookup (#25259) (d3b010f)
- logql/log: Hash labels before building them, not after (#24933) (f32bf19)
- logql: Add constant-label fast path for sample extraction (#24368) (eb837b0)
- logql: Cap series accumulation at the max_query_series limit (#23123) (871ed63)
- Optimise rendezvous shuffle sharding algorithm (#22269) (69822a3)
- querier: Avoid expensive shuffle sharding when shardSize=0 (#22912) (f8aad8a)
- querier: Evaluate the pushed line filter on the decoded column (#25233) (4c2cfd3)
- querier: Narrow the dataobj read projection for a query that can error (#24853) (db94fd0)
- querier: Push line filters into the data-object read (#25147) (f0a69b5)
- querier: Run each pushed line filter once (#25189) (59878bf)
- Read the streaming index window with pread (#24437) (417faee)
- Replace drain prefix tree map with a slice (#23949) (d13b0b2)
- short-circuit cache when over max cacheable size (#21277) (5f06abe)
- support shuffle shard by tenant to increase cache hits (#21357) (787276e)
- tsdb: Add defer closure missed from #20970 (#20978) (e9d724c)
- tsdb: Merge postings lists with a loser tree (#25165) (e4a3b30)
- tsdb: Only pool streaming postings list buffers of 256 bytes or more (#25508) (cf6ef69)
- tsdb: Read a streaming postings lookup through one decbuf (#25368) (11568ef)