File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ func (m *statusMapper) ocStatus() *tracepb.Status {
7474 }
7575 }
7676
77- if s .codePtr != nil || s . message != "" {
77+ if s .codePtr != nil {
7878 code := int32 (0 )
7979 if s .codePtr != nil {
8080 code = * s .codePtr
Original file line number Diff line number Diff line change @@ -116,6 +116,14 @@ func TestStatusCodeMapperCases(t *testing.T) {
116116 },
117117 },
118118
119+ {
120+ name : "http: message only, nil" ,
121+ expected : nil ,
122+ attributes : map [string ]string {
123+ "http.status_message" : "something" ,
124+ },
125+ },
126+
119127 {
120128 name : "http: 500" ,
121129 expected : & tracepb.Status {Code : 13 , Message : "a message" },
@@ -161,8 +169,8 @@ func TestStatusCodeMapperCases(t *testing.T) {
161169 },
162170
163171 {
164- name : "oc: description only, status ok " ,
165- expected : & tracepb. Status { Code : 0 , Message : "a description" } ,
172+ name : "oc: description only, no status " ,
173+ expected : nil ,
166174 attributes : map [string ]string {
167175 "opencensus.status_description" : "a description" ,
168176 },
You can’t perform that action at this time.
0 commit comments