-
Notifications
You must be signed in to change notification settings - Fork 511
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 arq tests in POTel #3875
base: potel-base
Are you sure you want to change the base?
Fix arq tests in POTel #3875
Conversation
❌ 345 Tests Failed:
View the top 3 failed tests by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
sentry_sdk/integrations/arq.py
Outdated
status_unset = ( | ||
hasattr(span._otel_span, "status") | ||
and span._otel_span.status.status_code == StatusCode.UNSET | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like that we're accessing the underlying _otel_span
here -- would prefer to have POTelSpan
manage the proxying as much as possible. We could add a status
property to POTelSpan
that returns _otel_span.status
and use that here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes you are right. I thought this is done in multiple integrations and I will fix it in another Pr. But I guess I misremembered.
Will fix it in this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have now implemented a status property. Have a look at the tests, because the Otel span statuses and the Sentry span status are different, the Sentry status one can get with the status property can be different from the one that has been set with set_status() before. And I default to "UNKNOWN_ERROR". Does this look ok to you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this makes sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, see one last comment
@status.setter | ||
def status(self, value): | ||
# type: (Optional[Any]) -> None | ||
raise NotImplementedError("Use set_status instead") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe let's just get rid of this altogether.
Make sure OK status is set, only when there has not been a error status set before.