Skip to content

Commit

Permalink
Report ta field with span; add test to validate
Browse files Browse the repository at this point in the history
  • Loading branch information
pglombardo committed May 8, 2017
1 parent 225b54e commit 56f9fed
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions json_span.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ type jsonSpan struct {
Name string `json:"n"`
From *fromS `json:"f"`
Ec int `json:"ec,omitempty"`
Lang string `json:"ta,omitempty"`
Data *jsonData `json:"data"`
}

Expand Down
1 change: 1 addition & 0 deletions recorder.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ func (r *Recorder) RecordSpan(span *spanS) {
Duration: uint64(span.Duration) / uint64(time.Millisecond),
Name: "sdk",
Ec: span.Ec,
Lang: "go",
From: sensor.agent.from,
Data: data})

Expand Down
1 change: 1 addition & 0 deletions span_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ func TestBasicSpan(t *testing.T) {
assert.Equal(t, "test", span.Data.SDK.Name, "Missing span name")
assert.Nil(t, span.Data.SDK.Custom.Tags, "Tags has an unexpected value")
assert.Nil(t, span.Data.SDK.Custom.Baggage, "Baggage has an unexpected value")
assert.Equal(t, "go", span.Lang, "Missing or wrong ta/lang")
}

func TestSpanHeritage(t *testing.T) {
Expand Down

0 comments on commit 56f9fed

Please sign in to comment.