Skip to content

Commit

Permalink
Merge 2ddbfb3 into ef7a367
Browse files Browse the repository at this point in the history
  • Loading branch information
vprithvi committed Feb 8, 2018
2 parents ef7a367 + 2ddbfb3 commit 6c39046
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
8 changes: 4 additions & 4 deletions model/converter/thrift/zipkin/fixtures/jaeger_02.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
"process": {
"serviceName": "service-x",
"tags": [
{
"key": "jaeger.version",
"vStr": "Go-1.1"
},
{
"key": "hostname",
"vStr": "some-host.com"
Expand All @@ -16,10 +20,6 @@
"key": "ip",
"vNum": 12345,
"vType": "int64"
},
{
"key": "jaeger.version",
"vStr": "Go-1.1"
}
]
},
Expand Down
4 changes: 0 additions & 4 deletions model/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,8 @@ type Process struct {
}

// NewProcess creates a new Process for given serviceName and tags.
// The tags are sorted in place and kept in the the same array/slice,
// in order to store the Process in a canonical form that is relied
// upon by the Equal and Hash functions.
func NewProcess(serviceName string, tags []KeyValue) *Process {
typedTags := KeyValues(tags)
typedTags.Sort()
return &Process{ServiceName: serviceName, Tags: typedTags}
}

Expand Down
2 changes: 1 addition & 1 deletion model/process_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import (

func TestProcessEqual(t *testing.T) {
p1 := model.NewProcess("s1", []model.KeyValue{
model.String("x", "y"),
model.Int64("a", 1),
model.String("x", "y"),
})
p2 := model.NewProcess("s1", []model.KeyValue{
model.Int64("a", 1),
Expand Down

0 comments on commit 6c39046

Please sign in to comment.