Skip to content

Commit

Permalink
idk
Browse files Browse the repository at this point in the history
Signed-off-by: Kaviraj <[email protected]>
  • Loading branch information
kavirajk committed Jan 30, 2024
1 parent c39b68d commit e4fbe8f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/querier/queryrange/downstreamer.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,16 @@ type instance struct {
handler queryrangebase.Handler
}

// withoutOffset returns the given DownstreamQuery with offsets removed and timestamp adjusted accordingly. If no offset is present in original query, it will be returned as is.
func withoutOffset(query logql.DownstreamQuery) logql.DownstreamQuery {
expr := query.Params.GetExpression()
expr.Walk()
}

func (in instance) Downstream(ctx context.Context, queries []logql.DownstreamQuery) ([]logqlmodel.Result, error) {
return in.For(ctx, queries, func(qry logql.DownstreamQuery) (logqlmodel.Result, error) {
qry = withoutOffset(qry)

req := ParamsToLokiRequest(qry.Params).WithQuery(qry.Params.GetExpression().String())
sp, ctx := opentracing.StartSpanFromContext(ctx, "DownstreamHandler.instance")
defer sp.Finish()
Expand Down

0 comments on commit e4fbe8f

Please sign in to comment.