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

exporter/stackdriver/trace: status code inconsistency between Java and Go #579

Open
odeke-em opened this issue Mar 14, 2018 · 3 comments
Open

Comments

@odeke-em
Copy link
Member

Currently the Java implementation sets a trace's status code as 0 for success unconditionally if there is a message or not.
screen shot 2018-03-13 at 6 07 01 pm

However, the Go implementation doesn't set it and has an explicit check to ensure that we only send the status code if it isn't 0(SUCCESS) or if there is a message

if s.Status.Code != 0 || s.Status.Message != "" {
sp.Status = &statuspb.Status{Code: s.Status.Code, Message: s.Status.Message}
}

screen shot 2018-03-13 at 6 11 19 pm

We need to be consistent, and for each implementation, what's the rule on what status codes to ignore? If there is one, let's document it too in each implementation otherwise

@odeke-em
Copy link
Member Author

/cc @songy23 @sebright @HailongWen

@odeke-em odeke-em added the trace label Mar 14, 2018
@sebright
Copy link

/cc @bogdandrutu

@rakyll
Copy link
Contributor

rakyll commented Mar 16, 2018

What's the difference between having an explicit 0 status vs having none? If it is a significant different, we should also represent this in the APIs by allowing a nil Status case.

If there is no significant difference, then zero value doesn't have to be reported.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants