Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cleptric committed Nov 7, 2022
1 parent 74f80b4 commit cb2671b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 29 deletions.
4 changes: 2 additions & 2 deletions dynamic_sampling_context.go
Expand Up @@ -40,8 +40,8 @@ func NewDynamicSamplingContextFromTransaction(span *Span) (DynamicSamplingContex
entries := map[string]string{}
scope := hubFromContext(span.Context()).Scope()

if traceId := span.TraceID.String(); traceId != "" {
entries["trace_id"] = traceId
if traceID := span.TraceID.String(); traceID != "" {
entries["trace_id"] = traceID
}
// if sampleRate := span.SampleRate; sampleRate != 0 {
// entries["sample_rate"] = sampleRate
Expand Down
27 changes: 0 additions & 27 deletions tracing_test.go
Expand Up @@ -147,15 +147,6 @@ func TestStartSpan(t *testing.T) {
Extra: span.Data,
Timestamp: endTime,
StartTime: startTime,
SDKMetaData: SDKMetaData{
DynamicSamplingContextKey: DynamicSamplingContext{
Entries: map[string]string{
"trace_id": span.TraceID.String(),
"transaction": "Test Transaction",
},
Frozen: true,
},
},
}
opts := cmp.Options{
cmpopts.IgnoreFields(Event{},
Expand Down Expand Up @@ -216,15 +207,6 @@ func TestStartChild(t *testing.T) {
Sampled: SampledTrue,
},
},
SDKMetaData: SDKMetaData{
DynamicSamplingContextKey: DynamicSamplingContext{
Entries: map[string]string{
"trace_id": span.TraceID.String(),
"transaction": "Test Transaction",
},
Frozen: true,
},
},
}
opts := cmp.Options{
cmpopts.IgnoreFields(Event{},
Expand Down Expand Up @@ -300,15 +282,6 @@ func TestStartTransaction(t *testing.T) {
Extra: transaction.Data,
Timestamp: endTime,
StartTime: startTime,
SDKMetaData: SDKMetaData{
DynamicSamplingContextKey: DynamicSamplingContext{
Entries: map[string]string{
"trace_id": transaction.TraceID.String(),
"transaction": "Test Transaction",
},
Frozen: true,
},
},
}
opts := cmp.Options{
cmpopts.IgnoreFields(Event{},
Expand Down

0 comments on commit cb2671b

Please sign in to comment.