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 http.URL field segment for Aiohttp extension #37

Merged
merged 2 commits into from
Mar 14, 2018

Conversation

pfreixes
Copy link
Contributor

Current implementation sends an invalid payload for the URL segment field once is serialized. The following snippet shows the output that is sent:

{"end_time": 1520921976.0243928, "http": {"request": {"client_ip": "127.0.0.1", "method": "GET", "url": [["http", "localhost:5000", "/operations/healthcheck", "", ""]], "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36"}, "response": {"status": 200}}, "id": "713f9e1ef69bce80", "in_progress": false, "name": "test", "start_time": 1520921976.023138, "trace_id": "1-5aa76d78-99ea86b4976213b1548fb9ae"} to xray:2000.

The serializer tries to serialize the URL object that is not a string is basically a YARL object, so having as an output this weird [["http", "localhost:5000", "/operations/healthcheck", "", ""]] value that is not well interpreted by the AWS Console.

The fix basically castes the field to a string and test properly this casting, having an alignment with other implementations such as the Flask one.

Copy link
Contributor

@haotianw465 haotianw465 left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution. Merging in.

@haotianw465 haotianw465 merged commit ab8cde7 into aws:master Mar 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants