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

Hotfix/django flask pyramid status code #755

Conversation

victoraugustolls
Copy link
Contributor

Updating http.status_code to be an int, as discussed with @reyang. This affects the following contributions:

  • Django
  • Flask
  • Httplib
  • Pyramid

Copy link
Contributor

@reyang reyang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@reyang
Copy link
Contributor

reyang commented Aug 7, 2019

I haven't taken a deep look into the system test failures. It seems some of the system tests are looking for span labels instead of attributes, and label value is always string.

@victoraugustolls
Copy link
Contributor Author

I can update the tests to get the attributes instead, if possible!

@reyang
Copy link
Contributor

reyang commented Aug 7, 2019

I haven't done the archaeology, would be curious to understand why we had labels instead of attributes in the first place.

@victoraugustolls
Copy link
Contributor Author

Who might know this? And is this a block for merging? If so, I can either swap for attributes or try to understand why we are using labels!

@reyang
Copy link
Contributor

reyang commented Aug 7, 2019

I don't think it's blocking unless @c24t says otherwise.

@victoraugustolls
Copy link
Contributor Author

Waiting for his input so, and if is a block, I would please ask if @c24t can give an explanation of why we are using labels and if there is any workaround!

@reyang reyang mentioned this pull request Aug 7, 2019
@victoraugustolls
Copy link
Contributor Author

@c24t any comments here?

@victoraugustolls
Copy link
Contributor Author

Pinging @c24t, if there are no responses, should we merge @reyang ?

@reyang
Copy link
Contributor

reyang commented Aug 13, 2019

@victoraugustolls sorry for my delayed response. We can move forward by changing the test cases to use attributes instead of labels. Once the CI passed, we're good to merge.

@victoraugustolls
Copy link
Contributor Author

Will update later today!

Copy link
Contributor

@songy23 songy23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Stackdriver should use int for status code too.

@victoraugustolls
Copy link
Contributor Author

@songy23 and what about the failing system tests?

@victoraugustolls
Copy link
Contributor Author

A course of action is needed here, system tests fails but the changes were approved. @c24t @songy23 @reyang

@reyang
Copy link
Contributor

reyang commented Aug 16, 2019

It seems that Stackdriver labels are always strings. @victoraugustolls would the system test pass if you convert status from int to str in the Stackdriver exporter?

@victoraugustolls
Copy link
Contributor Author

Google client only accepts labels as strings due to the proto format, and during the conversion inside the client, it loses the status code. If I transform the status code to string, it would work, but wouldn’t be “right”. But I think this could be tracked in another issue so we can move this forward!

@victoraugustolls
Copy link
Contributor Author

@c24t @songy23 @reyang added tests to see if status code was being converted correctly, but still not enough for the system tests. Can someone take a look?

reyang added a commit that referenced this pull request Aug 20, 2019
@victoraugustolls
Copy link
Contributor Author

Merged @reyang solution, thanks for the help!
@songy23 @c24t we are receiving 429 from Google Client here, any tips?

@reyang reyang merged commit 52b974f into census-instrumentation:master Aug 21, 2019
@victoraugustolls victoraugustolls deleted the hotfix/django-flask-pyramid-status-code branch August 22, 2019 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants