Skip to content

Commit

Permalink
fix: properly use iterators
Browse files Browse the repository at this point in the history
  • Loading branch information
tdakkota committed Dec 7, 2024
1 parent 67796ba commit 69d0d53
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cmd/chotel/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ func (a *App) send(ctx context.Context, now time.Time) error {
OnResult: func(ctx context.Context, block proto.Block) error {
exported.TraceID = append(exported.TraceID, t.TraceID...)
exported.SpanID = append(exported.SpanID, t.SpanID...)
for _, r := range t.Rows() {
for r := range t.Rows() {
exported.ExportedAt.Append(now)
stub := tracetest.SpanStub{
SpanKind: r.Kind,
Expand Down
10 changes: 5 additions & 5 deletions internal/chstorage/querier_traces.go
Original file line number Diff line number Diff line change
Expand Up @@ -702,14 +702,14 @@ func getTraceQLAttributeColumns(attr traceql.Attribute) iter.Seq[string] {
switch attr.Scope {
case traceql.ScopeNone:
return func(yield func(string) bool) {
yield(colAttrs)
yield(colResource)
yield(colScope)
_ = yield(colAttrs) &&
yield(colResource) &&
yield(colScope)
}
case traceql.ScopeResource:
return func(yield func(string) bool) {
yield(colScope)
yield(colResource)
_ = yield(colScope) &&
yield(colResource)
}
case traceql.ScopeSpan:
return func(yield func(string) bool) {
Expand Down

0 comments on commit 69d0d53

Please sign in to comment.