Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

OpenTracing Semantic Conventions uses error.object #179

Merged
merged 1 commit into from Apr 8, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions log/field.go
Expand Up @@ -122,10 +122,10 @@ func Float64(key string, val float64) Field {
}
}

// Error adds an error with the key "error" to a Span.LogFields() record
// Error adds an error with the key "error.object" to a Span.LogFields() record
func Error(err error) Field {
return Field{
key: "error",
key: "error.object",
fieldType: errorType,
interfaceVal: err,
}
Expand Down
4 changes: 2 additions & 2 deletions log/field_test.go
Expand Up @@ -24,11 +24,11 @@ func TestFieldString(t *testing.T) {
},
{
field: Error(fmt.Errorf("err msg")),
expected: "error:err msg",
expected: "error.object:err msg",
},
{
field: Error(nil),
expected: "error:<nil>",
expected: "error.object:<nil>",
},
{
field: Noop(),
Expand Down