-
Notifications
You must be signed in to change notification settings - Fork 779
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
StatusCode.OK is not respected as per the OpenTelemetry spec #6207
Comments
@jack-berg do you think this is a bug in |
Yup this seems like a pretty clear bug. Transferring to |
Just want to confirm that my PR will also fix the auto instrumentation from the Java agent. I have reviewed some of the code but can't quite seem to piece together whether or not this PR will fix that use case or not. |
I believe this should also fix the issue with the Java agent once the fix is released and we pull the latest SDK version into the Java agent |
Awesome! Thanks @trask and @jack-berg! This should unblock our team from a huge issue that we are seeing once released. If I understand correctly, this should all be released somewhere around Wednesday next week? |
👍 |
Describe the bug
When using
span.setStatus(StatusCode.OK)
from the Java SDK, the automatic instrumentation does not respect that this is final. The spec clearly states this here. This is affecting our ability to correctly administer our service and is a big problem for us.As far as I can really tell, the issue is that there is some way that the status code is being set to ERROR after we return from our code. I have tried setting to StatusCode.OK right before we return a 500 to the caller and even that does not work. I suspect that there are however multiple locations that do not respect the spec and will need to be updated given the absoluteness of what the spec indicates.
Steps to reproduce
Expected behavior
The span should not be marked as an error span if it has been manually set to StatusCode.OK
Actual behavior
The span is still being set as an error span
Javaagent or library instrumentation version
1.32.1
Environment
JDK: openjdk 11.0.21
OS: linux
Additional context
I am willing to sync up with anyone that will tackle this issue in a call or provide more context as is needed asynchronously. I just want to get this fixed since it is blocking us.
The text was updated successfully, but these errors were encountered: