Skip to content
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

fix(tracing): only set span.status=OK if UNSET #1248

Conversation

odeke-em
Copy link
Contributor

@odeke-em odeke-em commented Dec 3, 2024

In modernized OpenTelemetry-Python, if the SpanStatus was not already set to OK, it can be changed and
the code for trace_call was accidentally unconditionally setting the status to OK if there was no exception. This change fixes that and adds tests to lock this behavior in.

Fixes #1246

@odeke-em odeke-em requested review from a team as code owners December 3, 2024 09:42
@product-auto-label product-auto-label bot added the size: s Pull request size is small. label Dec 3, 2024
@product-auto-label product-auto-label bot added the api: spanner Issues related to the googleapis/python-spanner API. label Dec 3, 2024
@odeke-em odeke-em force-pushed the trace-fix-trace_call-unconditionally-setting-span_status_OK branch from d1018ac to f1d41ee Compare December 4, 2024 11:39
@odeke-em odeke-em requested a review from harshachinta December 4, 2024 11:40
@harshachinta harshachinta added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 4, 2024
@harshachinta harshachinta added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Dec 4, 2024
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 4, 2024
In modernized OpenTelemetry-Python, if the SpanStatus
was not already set to OK, it can be changed and
the code for trace_call was accidentally unconditionally
setting the status to OK if there was no exception.
This change fixes that and adds tests to lock this behavior in.

Fixes googleapis#1246
@odeke-em odeke-em force-pushed the trace-fix-trace_call-unconditionally-setting-span_status_OK branch from f1d41ee to 981fab5 Compare December 5, 2024 06:35
@harshachinta harshachinta added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 5, 2024
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 5, 2024
@harshachinta harshachinta added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 5, 2024
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 5, 2024
@harshachinta harshachinta added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 5, 2024
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 5, 2024
@harshachinta harshachinta added kokoro:force-run Add this label to force Kokoro to re-run the tests. and removed do not merge Indicates a pull request not ready for merge, due to either quality or timing. labels Dec 6, 2024
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 6, 2024
@harshachinta harshachinta enabled auto-merge (squash) December 6, 2024 06:09
@harshachinta harshachinta merged commit 1d393fe into googleapis:main Dec 6, 2024
12 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the googleapis/python-spanner API. size: s Pull request size is small.
Projects
None yet
4 participants