Skip to content
Merged
Changes from 1 commit
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
4 changes: 1 addition & 3 deletions plugin/storage/cassandra/spanstore/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ package spanstore
import (
"encoding/json"
"strings"
"sync/atomic"
"time"
"unicode/utf8"

Expand Down Expand Up @@ -85,7 +84,6 @@ type SpanWriter struct {
writerMetrics spanWriterMetrics
logger *zap.Logger
tagIndexSkipped metrics.Counter
bucketCounter uint32
tagFilter dbmodel.TagFilter
}

Expand Down Expand Up @@ -200,7 +198,7 @@ func (s *SpanWriter) indexByDuration(span *dbmodel.Span, startTime time.Time) er
}

func (s *SpanWriter) indexBySerice(traceID model.TraceID, span *dbmodel.Span) error {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while you're here, do you mind doing s/indexBySerice/indexByService :D

bucketNo := atomic.AddUint32(&s.bucketCounter, 1) % defaultNumBuckets
bucketNo := span.SpanHash % defaultNumBuckets
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good call

query := s.session.Query(serviceNameIndex)
q := query.Bind(span.Process.ServiceName, bucketNo, span.StartTime, span.TraceID)
return s.writerMetrics.serviceNameIndex.Exec(q, s.logger)
Expand Down