Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ linters:
- hugeParam
- importShadow
- paramTypeCombine # WON'T FIX
- rangeValCopy
- returnAfterHttpError
- todoCommentWithoutDetail
- unnamedResult
Expand Down
5 changes: 3 additions & 2 deletions cmd/anonymizer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@ func main() {
logger.Error("Failed to close grpc client connection", zap.Error(err))
}

for _, span := range spans {
if err := w.WriteSpan(&span); err != nil {
for i := range spans {
span := &spans[i]
if err := w.WriteSpan(span); err != nil {
if errors.Is(err, writer.ErrMaxSpansCountReached) {
logger.Info("max spans count reached")
os.Exit(0)
Expand Down
5 changes: 3 additions & 2 deletions internal/storage/v1/grpc/shared/grpc_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,14 @@ func (c *GRPCClient) FindTraces(ctx context.Context, query *spanstore.TraceQuery
return nil, fmt.Errorf("stream error: %w", err)
}

for i, span := range received.Spans {
for i := range received.Spans {
span := &received.Spans[i]
if trace == nil || span.TraceID != traceID {
trace = &model.Trace{}
traceID = span.TraceID
traces = append(traces, trace)
}
trace.Spans = append(trace.Spans, &received.Spans[i])
trace.Spans = append(trace.Spans, span)
}
}
return traces, nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ func (link *LinkColumnSet) linkInput() proto.Input {
func (acm attributeColumnsMap) attributesInput() proto.Input {
var result []proto.InputColumn
for _, pair := range acm {
result = append(result,
result = append(result,
input(pair.keyColName, pair.keyCol),
input(pair.valueColName, pair.valueCol),
)
Expand Down Expand Up @@ -476,7 +476,8 @@ func (acm attributeColumnsMap) appendNestedAttributeGroup(nestedGroup NestedAttr
var strValues [][]string
var bytesKeys [][]string
var bytesValues [][]string
for _, group := range nestedGroup.AttributesGroups {
for i := range nestedGroup.AttributesGroups {
group := &nestedGroup.AttributesGroups[i]
boolKeys = append(boolKeys, group.BoolKeys)
boolValues = append(boolValues, group.BoolValues)
doubleKeys = append(doubleKeys, group.DoubleKeys)
Expand Down
Loading