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 11, 2022
1 parent 4e48657 commit c9aabe4
Showing 1 changed file with 5 additions and 0 deletions.
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 c9aabe4

Please sign in to comment.