Skip to content

Commit

Permalink
changelog, docs and lint
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Elliott <[email protected]>
  • Loading branch information
joe-elliott committed Oct 25, 2024
1 parent 5c4b2dd commit 67a3cbb
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
* [ENHANCEMENT] Speedup collection of results from ingesters in the querier [#4100](https://github.com/grafana/tempo/pull/4100) (@electron0zero)
* [ENHANCEMENT] Speedup DistinctValue collector and exit early for ingesters [#4104](https://github.com/grafana/tempo/pull/4104) (@electron0zero)
* [ENHANCEMENT] Add disk caching in ingester SearchTagValuesV2 for completed blocks [#4069](https://github.com/grafana/tempo/pull/4069) (@electron0zero)
* [ENHANCEMENT] Added most_recent=true query hint to TraceQL to return most recent results. [#4238](https://github.com/grafana/tempo/pull/4238) (@joe-elliott)
* [BUGFIX] Replace hedged requests roundtrips total with a counter. [#4063](https://github.com/grafana/tempo/pull/4063) [#4078](https://github.com/grafana/tempo/pull/4078) (@galalen)
* [BUGFIX] Metrics generators: Correctly drop from the ring before stopping ingestion to reduce drops during a rollout. [#4101](https://github.com/grafana/tempo/pull/4101) (@joe-elliott)
* [BUGFIX] Correctly handle 400 Bad Request and 404 Not Found in gRPC streaming [#4144](https://github.com/grafana/tempo/pull/4144) (@mapno)
Expand Down
9 changes: 9 additions & 0 deletions docs/sources/tempo/traceql/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,15 @@ TraceQL can select arbitrary fields from spans. This is particularly performant
{ status=error } | select(span.http.status_code, span.http.url)
```

## Retrieving most recent results (experimental)

The TraceQL query hint `most_recent=true` can be used with any TraceQL selection query to force Tempo to return the most recent results ordered by time. Examples:

```
{} with (most_recent=true)
{ span.foo = "bar" } >> { status = error } with (most_recent=true)
```

## Experimental TraceQL metrics

TraceQL metrics are experimental, but easy to get started with. Refer to [the TraceQL metrics]({{< relref "../operations/traceql-metrics.md" >}}) documentation for more information.
Expand Down
6 changes: 4 additions & 2 deletions modules/frontend/search_sharder.go
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,10 @@ func buildIngesterRequestChan(ctx context.Context, tenantID string, parent pipel
return nil
}

type shardIterFn func(jobs int, sz uint64, completedThroughTime uint32)
type jobIterFn func(m *backend.BlockMeta, shard, startPage, pages int)
type (
shardIterFn func(jobs int, sz uint64, completedThroughTime uint32)
jobIterFn func(m *backend.BlockMeta, shard, startPage, pages int)
)

// backendJobsFunc provides an iter func with 2 callbacks designed to be used once to calculate job and shard metrics and a second time
// to generate actual jobs.
Expand Down
1 change: 0 additions & 1 deletion pkg/traceql/combine.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ type MetadataCombiner interface {
}

const TimestampNever = uint32(math.MaxUint32)
const TimestampAllTime = uint32(1)

func NewMetadataCombiner(limit int, keepMostRecent bool) MetadataCombiner {
if keepMostRecent {
Expand Down

0 comments on commit 67a3cbb

Please sign in to comment.