Skip to content

Commit

Permalink
remove unused param
Browse files Browse the repository at this point in the history
  • Loading branch information
hannahkm committed Sep 20, 2024
1 parent 485f5d8 commit 913a503
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ddtrace/tracer/rand_go1_22.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ func randUint64() uint64 {
return rand.Uint64()
}

func generateSpanID(startTime int64) uint64 {
func generateSpanID() uint64 {
return rand.Uint64() & math.MaxInt64
}
2 changes: 1 addition & 1 deletion ddtrace/tracer/sqlcomment.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ type SQLCommentCarrier struct {

// Inject injects a span context in the carrier's Query field as a comment.
func (c *SQLCommentCarrier) Inject(ctx *SpanContext) error {
c.SpanID = generateSpanID(now())
c.SpanID = generateSpanID()
tags := make(map[string]string)
switch c.Mode {
case DBMPropagationModeUndefined:
Expand Down
2 changes: 1 addition & 1 deletion ddtrace/tracer/tracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ func SpanStart(operationName string, options ...StartSpanOption) *Span {
}
id := opts.SpanID
if id == 0 {
id = generateSpanID(startTime)
id = generateSpanID()
}
// span defaults
span := &Span{
Expand Down
2 changes: 1 addition & 1 deletion ddtrace/tracer/tracer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2192,7 +2192,7 @@ func BenchmarkStartSpanConcurrent(b *testing.B) {
func BenchmarkGenSpanID(b *testing.B) {
b.ResetTimer()
for n := 0; n < b.N; n++ {
generateSpanID(0)
generateSpanID()
}
}

Expand Down

0 comments on commit 913a503

Please sign in to comment.