736 Commits
Author SHA1 Message Date
8f3af7dba2 Rewrite conditions on same attribute to equivalent array operation (#6353)
* Add operators IN, NOT IN, MATCH ANY, and MATCH NONE

* Implement Static.append()

* Print string arrays with '`' instead of '"'

Example ["aa", "bb"] -> [`aa`, `bb`]

* Rewrite binary operations to array equivalent

The rewriter handles the following cases:
- { .a =  "a" || .a =  "b" } => { .a IN  ["a", "b"] }
- { .a != "a" && .a != "b" } => { .a NOT IN ["a", "b"] }
- { .a =~ "a" || .a =~ "b" } => { .a MATCH ANY ["a", "b"] }
- { .a !~ "a" && .a !~ "b" } => { .a MATCH NONE ["a", "b"] }

* Add test cases with arrays to TestBinOp

* traceql.Parse() applies AST optimizations by default

* Rename predicate_test.go to predicates_test.go

* Add array predicates to parquetquery

* BREAKING CHANGE: more precise regex validation

BinaryOperation.validate() considered everythin a valid regex where
FieldExpression.EncodeToString(false) happened to return a valid regex.
With this change the RHS of a regex operation is required to be a string
or string array

* vp4: handle predicates with arrays correctly

* vp5: handle predicates with arrays correctly

* vp3: handle predicates with arrays correctly

* Add test cases for optimized queries

* Update query test examples with optimizable queries

* vp3: fix handling of array types

* CHANGELOG.md

* Pass array operators down to fetch layer

* Read to first virtual row after seeking on a low definition level

This helps avoid additional spans/op in queries with only
resource attributes

---------

Co-authored-by: Martin Disibio <mdisibio@gmail.com>
2026-02-22 00:55:23 -08:00
A. StoewerandZach Kelling 1fde7cf579 Fix query-frontend conversion of dedicated column blob option (#6377)
* Convert blob option correctly to and from tempopb

* Add CHANGELOG.md entry for blob option fix
2026-02-22 00:55:21 -08:00
Martin DisibioandZach Kelling 62f1c91976 [vParquet5] Allow up to 20 dedicated string columns and add new 3% target heuristic (#6282)
* Allow up to 20 dedicated strings in vparquet5, and update tempo-cli analysis tools with new 3% target heurstic for strings, similar to how we are doing for ints

* Fix num int attr default back to 5

* changelog

* Cleanup leftover int fields. Validate dedicated column overrides and treat too many columns as a warning

* Lint to return err last
2026-02-22 00:55:20 -08:00
Ruslan MikhailovandZach Kelling 8a596e7034 [Bugfix] instant rate (#6205)
Pass instant param to detect if request is instant or not
2026-02-22 00:55:19 -08:00
Zach LeslieandZach Kelling ac50daaf63 [jsonnet/microservices]: protect VPA config rendering field references (#6281)
* Compile jsonnet

* [jsonnet/microservices]: protect VPA config rendering field references

* Drop missing fields for lint
2026-02-22 00:55:18 -08:00
Joe ElliottandZach Kelling 3ae918ff89 [Tempo 3.0] Remove compactor and v2 block encoding code (#6273)
* o7 compactor

Signed-off-by: Joe Elliott <number101010@gmail.com>

* wip: o7 v2

Signed-off-by: Joe Elliott <number101010@gmail.com>

* test cleanup

Signed-off-by: Joe Elliott <number101010@gmail.com>

* remove compactor from jsonnet

Signed-off-by: Joe Elliott <number101010@gmail.com>

* changelog

Signed-off-by: Joe Elliott <number101010@gmail.com>

* gen manifest

Signed-off-by: Joe Elliott <number101010@gmail.com>

* config cleanup

Signed-off-by: Joe Elliott <number101010@gmail.com>

* docs

Signed-off-by: Joe Elliott <number101010@gmail.com>

* jsonnet

Signed-off-by: Joe Elliott <number101010@gmail.com>

* remove encoding

Signed-off-by: Joe Elliott <number101010@gmail.com>

* remove data encoding

Signed-off-by: Joe Elliott <number101010@gmail.com>

* lint and cleanup

Signed-off-by: Joe Elliott <number101010@gmail.com>

* unflake TestWorker\?

Signed-off-by: Joe Elliott <number101010@gmail.com>

---------

Signed-off-by: Joe Elliott <number101010@gmail.com>
2026-02-22 00:55:18 -08:00
Ruslan MikhailovandZach Kelling c63f424583 Use sonic lib for dedicated columns (#6262) 2026-02-22 00:55:18 -08:00
Zach Kelling bc4e42b9a0 chore: sync uncommitted changes 2026-02-13 22:16:24 -08:00
Ruslan MikhailovandGitHub cf4ffe7256 [bugfix] avg_over_time calculation fix (#6252) 2026-01-19 16:22:26 +01:00
Martin DisibioandGitHub b94e6c41de Promote vParquet5 to stable preview (#6219)
* Promote vParquet5 to stable preview

* changelog
2026-01-15 10:03:05 -05:00
Martin DisibioandGitHub 240c5b5a02 Convert vParquet5 service stats from map to list (#6216)
* Convert vParquet5 service stats from map to list

* changelog
2026-01-14 15:50:09 -05:00
J PhamandGitHub eea7894f34 return empty resposne for unsupported blocks instead of nil (#6213) 2026-01-14 12:42:20 -06:00
J PhamandGitHub 7f62c947cd [tempo-cli] add suggest dedicated columns cli command (#6131)
* add suggest dedicated columns cli command

* add option to provide an outfile path

* lint

* remove json

* make output-file a string instead of path arg

* make not global options

* revert overrides args

* back to what it was
2026-01-14 09:08:59 -06:00
Carles GarciaandGitHub 39b229b388 compactor: return error if encoding is unsupported (#6209)
Otherwise it will panic.
This happens when trying to compact preview blocks.
2026-01-14 11:44:42 +01:00
Martin DisibioandGitHub 4800007564 vParquet5 - Change array handling for dedicated columns (#6199)
* Change vp5 array handling, to not separate array vs non-array types for dedicated columns.  This restores the precondition that all values of the given primitive type (string,int) exist in the column, and read path operations (search, fetch, tag lookup) will work as expected

* changelog
2026-01-13 14:45:49 -05:00
Martin DisibioandGitHub 0b25ad03ce vParquet5 - remove LIST meta from column paths (#6134)
* Remove all parquet LIST meta for simpler column paths for debugging and readability

* bump version number

* changelog
2026-01-13 08:15:13 -05:00
J PhamandGitHub 855afa6d8e fix special operands search tags handling bug (#6179)
* fix special operands search tags handling bug

* add more tests to cover more scenarios

* remove span well known handling in vparquet5 and added event dedicated columns tests

* oops typo

* add dedicated events to expected values for test
2026-01-09 12:54:17 -06:00
Zach LeslieandGitHub 9ce2a81b03 Implement GCS delete retry when marking a block compacted (#6133)
* Implement GCS delete retry when marking a block compacted

* Include retry in additional delete for ClearBlock

* Include max retries configuration for GCS compactor/retention operations

* Update config manifest

* Play golf using atomic.Int32 instead of an int32
2026-01-09 15:23:18 +00:00
Oleg V. KozlyukandGitHub c33e5559c1 chore: Use Buf to generate go definitions (#6130) 2026-01-07 09:12:36 -05:00
Martin DisibioandGitHub fc3212ff6a Support span:childCount intrinsic with new column in vp5 (#6126)
* Support span:childCount intrinsic with new column in vp5

* Fix tests, update build image and re-gen traceql

* changelog
2026-01-06 09:07:36 -05:00
Alf KennyandGitHub 861819165c Set maxKeys to 1 for S3 confirm list operation (#6114)
* Set maxKeys to 1 for S3 confirm list operation

* changelog
2026-01-05 10:00:55 -05:00
Martin DisibioandGitHub cb4c73ebe1 Initial support for analyzing and configuring integer dedicated columns (#6103)
* Initial support for configuring integer dedicated columns

* lint

* changelog
2025-12-19 10:37:30 -05:00
A. StoewerandGitHub a7511089ad vParquet5: fix two smaller bugs (#6100)
* Fix DedicatedColumns.Validate() to accept 'blob' as an option

* Convert event dedicated attrs when reading trace from parquet
2025-12-18 13:16:21 +01:00
A. StoewerandGitHub 92c786de3c vParquet5: remove orphan DedicatedAttributes nodes from schema (#6095)
* vParquet5: remove orphan DedicatedAttributes nodes from schema

When a scope does not have any dedicated attributes, we have to
remove the empty / orphan DedicatedAttributes group node

* CHANGELOG.md
2025-12-17 15:07:37 +01:00
Martin DisibioandGitHub da906189fe vParquet5 - Dedicated event attributes and detection/support of blobs (#5946)
* New analyse block data, more dedicated columns

* Add analyse block arg to output quoted/spaced list for other cli command

* Committing cli cardinality analysis

* Different dedicated columns per scope, turn dictionary on and off dynamically based on column cardinality

* Experiments

* First version of working RewriteSchema

* Simple version

* Updates

* Update to new options pattern in test branch

* Fixes after merging main

* Cleanup/simplify analyse block code for blobs

* Make blob detection in analyse block optional

* Update to same default

* Update to final parquet-go StructTag option

* Delete unused dedicated columns, update all references of schema/reader/write to account for it

* cli cleanup and support blobs in jsonnet

* Upgrade parquet-go to get remaining fix

* cleanup

* Fix event dedicated attr writes. Readd tests and cleanup

* cleanup

* lint

* Support vParquet5 for analyse block cli command

* changelog + bump encoding version

* Fix analyse blocks combination of data

* More test coverage of event dedicated columns

* Fix wal block, search, and tag lookup on event dedicated columns. More test coverage

* Revert printing scope in simple summary
2025-12-14 16:10:31 -05:00
Martin DisibioandGitHub ac4d4b653d Delete vParquet2 format (#6071)
* Delete vParquet2

* changelog

* Update tempo cli docs
2025-12-12 14:13:17 -05:00
renovate-sh-app[bot]GitHubrenovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com>Oleg Kozliuk
df166b1b2d fix(deps): update module github.com/uber-go/atomic to v1.11.0 (#5905)
* fix(deps): update module github.com/uber-go/atomic to v1.11.0

| datasource | package                   | from   | to      |
| ---------- | ------------------------- | ------ | ------- |
| go         | github.com/uber-go/atomic | v1.4.0 | v1.11.0 |


Signed-off-by: renovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com>

* Renamed atomic module

* Go mod vendor

---------

Signed-off-by: renovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com>
Co-authored-by: renovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com>
Co-authored-by: Oleg Kozliuk <oleg.kozliuk@grafana.com>
2025-12-11 13:36:23 +01:00
Martin DisibioandGitHub 74b857ed6b Refactor to make encodings state if they are writeable or not, instead of special-case checks in all tests (#6062) 2025-12-10 13:04:07 -05:00
Martin DisibioandGitHub 4d1b24f168 Fix many lint errors in /tempodb (#6039)
* lint fixes in /tempodb

* fix more lint errors

* whoops missed a test
2025-12-09 09:02:29 -05:00
Martin DisibioandGitHub 02528de0fd Tighten up block builder encoding validation, fix tests to actually run (#6037)
* Tighten up block builder encoding validation, fix tests to actually run

* changelog

* Better shutdown checks?
2025-12-08 15:59:46 -05:00
Kaustubh KurveandGitHub f68a697077 Fix delete implementation for s3/gcs/azure backends to account for prefix (#6011)
* Fix delete impl for s3/gcs/azure backends to account for prefix

* Update changelog

* Omit prefix from backend.readerWriter.Find result set

The backend delete function (which prepends the prefix) is being used
in two places: first to delete indexes directly using the file path,
and secondly, the results from the Find function are iterated over to
delete the files for a tenant. If the result set from the Find
function returns the full path (including the prefix), the delete
function would prepend the prefix again and hence would not target the
correct path. Hence all Find implementations are updated to return
unprefixed key in the result set (we trim the prefix from key before passing
over to the FindFunc arg). This is consistent with the List implementation.

* Add prefix for keypath for versioned deletes

* Remove bucket prefix in backend.Find instead of entire prefix
2025-12-05 12:23:13 -05:00
Martin DisibioandGitHub b4d6e5532a Fixes for intrinsic = nil and other stuff != nil (#6004)
* Make intrinsic=nil queries fail validation

* No autocomplete on invalid queries, check in missing test case for previous commit

* Fix to only validate tag lookup if parsing succeeded

* Disallow resource.service.name=nil since we dont' support that in storage.  Push down operator OpExists so that != nil for performance and correctness of metrics queries, cleanup vp4

* cleanup and port all changes to vp3/5

* Add missing predicate support for OpExists

* Update autocomplete for OpExists and port changes to vp3/5

* lint

* vp2

* Cleanup/simplify

* changelog

* Review feedback, cleanup to use shared func
2025-12-03 09:45:01 -05:00
A. StoewerandGitHub 7b00d6cf47 vParquet5: virtual span row numbers (#5943)
* Add field SpanCount to ScopeSpans

* Make new vp5 preview version

* Convert vp5 test-data

* Move rowNumberIterator to own file

* Implement virtualRowNumberIterator

* Improve tests for virtualRowNumberIterator

* Set correct span count for vp5 test data

* Use virtualRowNumberIterator instead of StatusCode colum iter

* CHANGELOG.md
2025-11-28 09:23:22 +10:00
258c551f8b [bugfix] Add nil support for tags lookup (#5967)
* [bugfix] support attr = nil for tags

* add other vparquet versions

* added tests

* changelog

* Accumulate distinct results at a higher level

Signed-off-by: Joe Elliott <number101010@gmail.com>

* Add logic to wal blocks

Signed-off-by: Joe Elliott <number101010@gmail.com>

---------

Signed-off-by: Joe Elliott <number101010@gmail.com>
Co-authored-by: Joe Elliott <number101010@gmail.com>
2025-11-24 09:44:58 -05:00
Martin DisibioandGitHub 454dd73b26 Fix potential hash collisions of traceql StringArray + compare() improvement (#5835)
* Fix potential hash collisions of traceql StringArray, reduce map key re-computations in compare() function, replace usage of unsafe.StringData

* changelog

* Review feedback

* Review
2025-11-12 07:07:53 -05:00
22da63ba29 removing references to aws-sdk-go v1 (#5856)
* Migrate S3 backend to AWS SDK v2

* cleanup: remove all aws-sdk-go refs (incl. s3_test.go), replace with minio.NoSuchKey, clean backup, ran go mod tidy & vendor,add to changelog.md, make test-e2e-api pass

* fix: format

---------

Co-authored-by: Javi <javiermolinar@live.com>
2025-11-10 08:59:45 +00:00
J PhamandGitHub 33cfdad6e6 {.a = nil } (#4905)
* niliter

* mewo

* it kinda works..?

* no events and links

* rebase

* move conditions around - added more test assertions

* clean up

* testing remove this

* add nil value handling

* lint

* fix ast condition

* update test examples

* fix tests

* select all should print nil for dedicated columns with nil values

* remove prints

* fixed comments

* lint

* remove not needed params

* add support for vparquet3 and vparquet5

* vparquet2 shakefist

* fix test and lint

* add support for links and events

* fix nil iterator returning last row and add test

* rebase, lint, changelog, docs

* fix test

* fix test, add column chunk null check

* logic to return correct rn for events and links and return attr key in response

* fix test from rebase

* fix column name for wellknown and custom attr

* one more from vparquet3
2025-11-04 08:00:37 -06:00
Constantin SchreiberandGitHub 0a96779c9e Respect configured S3 part size for compatibility with Cloudflare R2 (#5838)
* Respect configured S3 part size for compatibility with Cloudflare R2

* Updated manifest

* Preserve old chunking behavior if PartSize is unset
2025-11-03 09:54:30 +01:00
Ruslan MikhailovandGitHub a97f399545 [bugfix] Fix search by trace:id for short IDs with leading zeros (#5587) 2025-10-31 16:04:57 +01:00
A. StoewerandGitHub 27b4e33827 vParquet5: dedicated columns support array values (#5760)
* Tune benchmarks

* Add options field to dedicated attribute columns

* Dedicated columns have slice values

* New encoding vParquet5-preview4

* Reuse slices in DedicatedAttributes

* Run make generate-manifest

* Fix lint/fmt warning

* CHANGELOG.md

* Process options in DedicatedColumns.Hash()

* vp3 and vp4 ignore dedicated columns with options

* Refactor filterDedicatedColumns() functions

* Avoid collistions when hashing dedicated attribute slices

* Fix hashing for rebatchTrace() and add tests
2025-10-28 08:29:42 +10:00
Steffen SassallaandGitHub ce6d3d7440 feat(s3): Support S3 SSE-C encryption (#5789)
* feat(s3): Support S3 SSE-C encryption

* feat(s3): Outsource sse options and add manifest file
2025-10-27 10:59:26 +01:00
Steffen SassallaandGitHub dcbd3bdd7a fix(s3): Fix compactor copy metadata via sse (#5774) 2025-10-21 15:42:53 +02:00
A. StoewerandGitHub c5b4b55622 vParquet5: remove well-known attribute columns (#5696)
* Define default dedicated attribute columns

* Use default dedicated columns in block config

* vp4 ignores well-known attrs in dedicated columns

* vp3 ignores well-known attrs in dedicated columns

* Improve tenantindex benchmarks

* Use LRU cache for unmarshaled JSON columns

* Set version to vParquet5-preview3

* Remove well-known attribute columns on span level

* Remove well-known attribute columns on resource level

* Convert vp5 test-data and re-enable find by ID test

* Generate manifest.md

* vp3 and vp4 ignore all unsupported attributes

* vp5 ignores unsupported attributes

* CHANGELOG.md
2025-10-17 15:05:26 +10:00
A. StoewerandGitHub f64ce21334 vParquet5: fix issues related to integer dedicated columns (#5716)
* resourceSpanHash() takes int dedicated columns into account

* DedicatedColumns.Validate() takes int dedicated columns into account

* Remove Validate() for individual dedicated columns
2025-10-13 10:45:26 +10:00
Ruslan MikhailovandGitHub ed91dfd206 Proposal: introduce hints for frontend performance tests (#5723)
{} with (debug_return_in=100s, debug_std_dev=10s, debug_data_factor=0.1)

debug_return_in - adds latency for queriers (disabled by default)
debug_std_dev - adds dispersion to wait time (0 by default)
debug_data_factor - probability of non-empty response from a querier (0 by default)
2025-10-10 14:33:49 +00:00
10e09769ba Deprecating vParquet2 block format (#5688)
* deprecate vParquet2 for writes

* add changelog

* lint

* remove vparquet2 tests

* missed one

* skip more vparquet2 tests

* Update docs/sources/tempo/configuration/_index.md

Co-authored-by: Martin Disibio <mdisibio@gmail.com>

* revert

---------

Co-authored-by: Martin Disibio <mdisibio@gmail.com>
2025-09-29 20:34:19 -05:00
Martin DisibioandGitHub a2fccc26f0 [Metrics] Fix series handling of conflicting string and integer values (#5659)
* wip: first batch of eliminating promLabels from traceql metrics

* Finish adding helper methods and fix tests

* Fix frontend, more tests

* Fix test

* cleanup

* changelog

* More cleanup

* Use proto reserved to prevent reuse of promlabels instead of just commenting it out

* Add e2e test for fixed type handling

* lint

* Cleanup prom_labels from instant series

* Relabel as breaking change and update with notes on breaking changes and rollout consideration
2025-09-23 10:50:05 -04:00
Rodrigo MecheriandGitHub 5578bec297 fix: fix identify root spans with child_of links (#5557)
* feat: add support for identifying root spans with child_of links in traceToParquet

* feat: add pr in changelog

* Verify if link childs are internal to the trace
2025-09-18 15:18:30 -05:00
8d7feda9a0 [TraceQL] Fix string comparison bug of strings starting with numbers (#5658)
* Fix string comparison bug of strings starting with numbers

* Add tempodb-level test case for fixed string comparison

* Fix traceql engine regex validation to be against unquoted raw value

* changelog

* Update CHANGELOG.md

Co-authored-by: Ruslan Mikhailov <195758209+ruslan-mikhailov@users.noreply.github.com>

---------

Co-authored-by: Ruslan Mikhailov <195758209+ruslan-mikhailov@users.noreply.github.com>
2025-09-17 13:00:30 -04:00
Martin DisibioandGitHub fb7027054d Gracefully handle unsupported block encodings (#5543)
* test

* Refactor dupe errors, skip compaction, fix error handling in search

* Lint, tests

* Fix tests
2025-09-16 10:29:49 +10:00