Skip to content

Commit

Permalink
test: remove span cache cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mathnogueira committed May 10, 2024
1 parent f5d7cb6 commit fbaa185
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions agent/workers/poller.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,22 +234,22 @@ func (w *PollerWorker) poll(ctx context.Context, request *proto.PollingRequest)
return err
}

spanIDs := make([]string, 0, len(pollingResponse.Spans))
// spanIDs := make([]string, 0, len(pollingResponse.Spans))
for _, span := range pollingResponse.Spans {
spanIDs = append(spanIDs, span.Id)
// spanIDs = append(spanIDs, span.Id)

// mark span as sent
runKey := fmt.Sprintf("%d-%s-%s", request.RunID, request.TestID, span.Id)
w.logger.Debug("Marking span as sent", zap.String("runKey", runKey))
// TODO: we can set the expiration for this key to be
// 1 second after the pollingProfile max waiting time
// but we need to get that info here from controlplane
w.sentSpansCache.Set(request.TraceID, runKey)
// w.sentSpansCache.Set(request.TraceID, runKey)
}

if w.traceCache != nil {
w.traceCache.RemoveSpans(request.TraceID, spanIDs)
}
// if w.traceCache != nil {
// w.traceCache.RemoveSpans(request.TraceID, spanIDs)
// }

return nil
}
Expand Down

0 comments on commit fbaa185

Please sign in to comment.