-
Notifications
You must be signed in to change notification settings - Fork 679
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
Update StatusCodes enum to comply with specs and another opentelemetry libraries. #1402
Comments
This might not necessarily be a discrepancy from the specs. The specs merely says that these options should be available, not that there should be any enum ordering enforced. Some implementations may not even use enums. Go, javascript and java all have different ordering implementations. Perhaps instead of showing the numerical value in the exported span tag in the exporter, we should use the name instead, so we don't rely on the the enum value. |
@DariaPlotnikova |
Looked at code links and yes, here codes are different from python. But how do this clients send status code to jaeger (as string representation or as number)? I'm agree that in fact it shouldn't have matter which code is used in language specific library, while this code isn't sent as number to another library with differ code interpretation.
The main things is that in python
Then "magic" happens in jaeger-agent, where they try to transform number back to code and got I'm not abolutely sure that problem is in jaegertracing agent, cause I also have .net services and there everything is ok. Changing status codes in jaegertracing agent will affect every client library which sends statuses as number. This is why I created issue here. Maybe we can change somehow the manner which is used to output status code to jaeger (string representation instead of number). |
@DariaPlotnikova
Yes this is the avenue that would be best to pursue: if possible change our exporter behaviour instead of enforcing ordering in the specs for this use case. The only outstanding question is what the jaeger-agent EXPECTS from the tag. This line specifically:
If the jaeger backend EXPECTS 0 - OK, 1 - UNSET, 2 - ERROR, this might be a specs issue. Is there any documentation on the behaviour of jaeger detecting status tags and translating them into statuses? |
I didn't find anything in docs. The only thing I found is code in repo, but I'm not so good in golang to be sure that jaeger can understand tag |
We will probably just modify the behaviour of the jaeger exporter to account for this. We can either remove the statuscode from the tags, use a different tag that's not a number (just the string representation), or manually switch the enum values before export. |
Tryed without I'm not sure is that ok, because accordind to spec, span status should be presented (set by default Anyway, I asked in jaegertracing gitter community, is it possible to send string representation of status code. Hope they will answer. |
@DariaPlotnikova |
Closing this in favour of #1474 |
Hi. I'm trying to implement opentelemetry tracing with jaeger+elastichsearch from python app using
jaegertracing/jaeger-opentelemetry-*
latest docker images. I found that if python jaeger client do nothing specific with correct spans (without errors) it comes to jaeger-agent with code1
(see print of batch at the last line of code snippet), which is wrong according to opentelemetry spec (UNSET
is the first, so it should have code0
).Describe your environment
I use Python 3.5, Linux and such opentelemetry packages:
Steps to reproduce
docker-compose.yaml
:docker-compose up -d jaeger-query jaeger-agent jaeger-collector kibana
python main.py
What is the expected behavior?
span.status.status_code
is equal toStatusCode.UNSET
with code is0
instead of1
.status_code
tag in elasticsearch is equal to python enum.What is the actual behavior?
UNSET
) are accepted with code1
, which isSTATUS_CODE_OK
, according to opentelemetry-collector enum:Additional context
UNSET=0
,OK=1
,ERROR=2
.main.py
, jaeger UI will display spans as expected (OK
in python will beOK
in jaeger,UNSET
will beUNSET
):The text was updated successfully, but these errors were encountered: