Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove SpanID from sampling parameters #775

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 0 additions & 1 deletion api/trace/always_off_sampler.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ func (ns alwaysOffSampler) ShouldSample(
_ SpanContext,
_ bool,
_ ID,
_ SpanID,
_ string,
_ SpanKind,
_ []kv.KeyValue,
Expand Down
2 changes: 1 addition & 1 deletion api/trace/always_off_sampler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (

func TestNeverSamperShouldSample(t *testing.T) {
gotD := AlwaysOffSampler().ShouldSample(
SpanContext{}, false, ID{}, SpanID{}, "span", SpanKindClient, []kv.KeyValue{}, []Link{})
SpanContext{}, false, ID{}, "span", SpanKindClient, []kv.KeyValue{}, []Link{})
wantD := Decision{Sampled: false}
if diff := cmp.Diff(wantD, gotD); diff != "" {
t.Errorf("Decision: +got, -want%v", diff)
Expand Down
1 change: 0 additions & 1 deletion api/trace/always_on_sampler.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ func (as alwaysOnSampler) ShouldSample(
_ SpanContext,
_ bool,
_ ID,
_ SpanID,
_ string,
_ SpanKind,
_ []kv.KeyValue,
Expand Down
2 changes: 1 addition & 1 deletion api/trace/always_on_sampler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (

func TestAlwaysOnSamplerShouldSample(t *testing.T) {
gotD := AlwaysOnSampler().ShouldSample(
SpanContext{}, false, ID{}, SpanID{}, "span", SpanKindClient, []kv.KeyValue{}, []Link{})
SpanContext{}, false, ID{}, "span", SpanKindClient, []kv.KeyValue{}, []Link{})
wantD := Decision{Sampled: true}
if diff := cmp.Diff(wantD, gotD); diff != "" {
t.Errorf("Decision: +got, -want%v", diff)
Expand Down
1 change: 0 additions & 1 deletion api/trace/sampler.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ type Sampler interface {
sc SpanContext,
remote bool,
traceID ID,
spanID SpanID,
spanName string,
spanKind SpanKind,
attributes []kv.KeyValue,
Expand Down
1 change: 0 additions & 1 deletion sdk/trace/sampling.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ type Sampler interface {
type SamplingParameters struct {
ParentContext api.SpanContext
TraceID api.ID
SpanID api.SpanID
Name string
HasRemoteParent bool
Kind api.SpanKind
Expand Down
1 change: 0 additions & 1 deletion sdk/trace/span.go
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,6 @@ func makeSamplingDecision(data samplingData) SamplingResult {
sampled := sampler.ShouldSample(SamplingParameters{
ParentContext: data.parent,
TraceID: spanContext.TraceID,
SpanID: spanContext.SpanID,
Name: data.name,
HasRemoteParent: data.remoteParent,
Kind: data.kind,
Expand Down