Skip to content

Commit 3786f51

Browse files
authored
Merge pull request #775 from pjanotti/remove-spanId-from-sampling-params
Remove SpanID from sampling parameters
2 parents 67759d6 + 704ea32 commit 3786f51

7 files changed

Lines changed: 2 additions & 7 deletions

File tree

api/trace/always_off_sampler.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ func (ns alwaysOffSampler) ShouldSample(
3333
_ SpanContext,
3434
_ bool,
3535
_ ID,
36-
_ SpanID,
3736
_ string,
3837
_ SpanKind,
3938
_ []kv.KeyValue,

api/trace/always_off_sampler_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424

2525
func TestNeverSamperShouldSample(t *testing.T) {
2626
gotD := AlwaysOffSampler().ShouldSample(
27-
SpanContext{}, false, ID{}, SpanID{}, "span", SpanKindClient, []kv.KeyValue{}, []Link{})
27+
SpanContext{}, false, ID{}, "span", SpanKindClient, []kv.KeyValue{}, []Link{})
2828
wantD := Decision{Sampled: false}
2929
if diff := cmp.Diff(wantD, gotD); diff != "" {
3030
t.Errorf("Decision: +got, -want%v", diff)

api/trace/always_on_sampler.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ func (as alwaysOnSampler) ShouldSample(
3333
_ SpanContext,
3434
_ bool,
3535
_ ID,
36-
_ SpanID,
3736
_ string,
3837
_ SpanKind,
3938
_ []kv.KeyValue,

api/trace/always_on_sampler_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424

2525
func TestAlwaysOnSamplerShouldSample(t *testing.T) {
2626
gotD := AlwaysOnSampler().ShouldSample(
27-
SpanContext{}, false, ID{}, SpanID{}, "span", SpanKindClient, []kv.KeyValue{}, []Link{})
27+
SpanContext{}, false, ID{}, "span", SpanKindClient, []kv.KeyValue{}, []Link{})
2828
wantD := Decision{Sampled: true}
2929
if diff := cmp.Diff(wantD, gotD); diff != "" {
3030
t.Errorf("Decision: +got, -want%v", diff)

api/trace/sampler.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ type Sampler interface {
2424
sc SpanContext,
2525
remote bool,
2626
traceID ID,
27-
spanID SpanID,
2827
spanName string,
2928
spanKind SpanKind,
3029
attributes []kv.KeyValue,

sdk/trace/sampling.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ type Sampler interface {
3232
type SamplingParameters struct {
3333
ParentContext api.SpanContext
3434
TraceID api.ID
35-
SpanID api.SpanID
3635
Name string
3736
HasRemoteParent bool
3837
Kind api.SpanKind

sdk/trace/span.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,6 @@ func makeSamplingDecision(data samplingData) SamplingResult {
394394
sampled := sampler.ShouldSample(SamplingParameters{
395395
ParentContext: data.parent,
396396
TraceID: spanContext.TraceID,
397-
SpanID: spanContext.SpanID,
398397
Name: data.name,
399398
HasRemoteParent: data.remoteParent,
400399
Kind: data.kind,

0 commit comments

Comments
 (0)