Skip to content

Commit

Permalink
Add support for time range queries on jaeger plugin
Browse files Browse the repository at this point in the history
Signed-off-by: Ruben Vargas <ruben.vp8510@gmail.com>
  • Loading branch information
rubenvp8510 committed Aug 12, 2022
1 parent 4e48657 commit 019361a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* [CHANGE] Add new querier service in deployment jsonnet to serve `/status` endpoint. [#1474](https://github.com/grafana/tempo/pull/1474) (@annanay25)
* [CHANGE] Swapped out Google Cloud Functions serverless docs and build for Google Cloud Run. [#1483](https://github.com/grafana/tempo/pull/1483) (@joe-elliott)
* [CHANGE] **BREAKING CHANGE** Change spanmetrics metric names and labels to match OTel conventions. [#1478](https://github.com/grafana/tempo/pull/1478) (@mapno)
* [ENHANCEMENT] Add support for time picker in jaeger query plugin. [#1631](https://github.com/grafana/tempo/pull/1631) (@rubenvp8510)
Old metric names:
```
traces_spanmetrics_duration_seconds_{sum,count,bucket}
Expand Down
5 changes: 5 additions & 0 deletions cmd/tempo-query/tempo/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ const (
operationSearchTag = "name"
minDurationSearchTag = "minDuration"
maxDurationSearchTag = "maxDuration"
startTimeMaxTag = "end"
startTimeMinTag = "start"
numTracesSearchTag = "limit"
)

Expand Down Expand Up @@ -188,6 +190,9 @@ func (b *Backend) FindTraceIDs(ctx context.Context, query *jaeger_spanstore.Trac
urlQuery.Set(minDurationSearchTag, query.DurationMin.String())
urlQuery.Set(maxDurationSearchTag, query.DurationMax.String())
urlQuery.Set(numTracesSearchTag, strconv.Itoa(query.NumTraces))
urlQuery.Set(startTimeMaxTag, fmt.Sprintf("%d", query.StartTimeMax.Unix()))
urlQuery.Set(startTimeMinTag, fmt.Sprintf("%d", query.StartTimeMin.Unix()))

for k, v := range query.Tags {
urlQuery.Set(k, v)
}
Expand Down

0 comments on commit 019361a

Please sign in to comment.