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
Upgrade to OpenTracing Go 1.2 #525
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -126,7 +126,7 @@ func TestBuildLogs(t *testing.T) { | |
{field: log.Uint64("k", 123), expected: []*j.Tag{{Key: "k", VType: j.TagType_LONG, VLong: &someLong}}}, | ||
{field: log.Float32("k", 123), expected: []*j.Tag{{Key: "k", VType: j.TagType_DOUBLE, VDouble: &someDouble}}}, | ||
{field: log.Float64("k", 123), expected: []*j.Tag{{Key: "k", VType: j.TagType_DOUBLE, VDouble: &someDouble}}}, | ||
{field: log.Error(errors.New(errString)), expected: []*j.Tag{{Key: "error", VType: j.TagType_STRING, VStr: &errString}}}, | ||
{field: log.Error(errors.New(errString)), expected: []*j.Tag{{Key: "error.object", VType: j.TagType_STRING, VStr: &errString}}}, | ||
{field: log.Object("k", someSlice), expected: []*j.Tag{{Key: "k", VType: j.TagType_STRING, VStr: &someSliceString}}}, | ||
{ | ||
field: log.Lazy(func(fv log.Encoder) { | ||
|
@@ -146,7 +146,7 @@ func TestBuildLogs(t *testing.T) { | |
}, | ||
// this is a bit fragile, but ¯\_(ツ)_/¯ | ||
expected: []*j.Tag{ | ||
{Key: "error", VType: j.TagType_STRING, VStr: getStringPtr("non-even keyValues len: 1")}, | ||
{Key: "error.object", VType: j.TagType_STRING, VStr: getStringPtr("non-even keyValues len: 1")}, | ||
{Key: "function", VType: j.TagType_STRING, VStr: getStringPtr("LogKV")}, | ||
}, | ||
}, | ||
|
@@ -403,7 +403,8 @@ func compareTags(t *testing.T, expected, actual *j.Tag, testName string) { | |
return | ||
} | ||
if expected == nil || actual == nil { | ||
assert.Fail(t, "one of the tags is nil", testName) | ||
t.Logf("one of the tags is nil, test=%s, expected=%v, actual=%v", testName, expected, actual) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the way assert.Fail prints the message was not helpful, so adding explicit log |
||
assert.Fail(t, "one of the tags is nil") | ||
return | ||
} | ||
assert.Equal(t, expected.Key, actual.Key, testName) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Newer versions of Prom client have dependencies on libraries using go modules with v2, which does not work with glide. Since this is legacy anyway, I am pinning to the current versions (unfortunately glide doesn't allow updating a single dep).