Skip to content

Commit

Permalink
Merge branch 'master' into neel/remove-relay-aws
Browse files Browse the repository at this point in the history
  • Loading branch information
antonpirker authored and sl0thentr0py committed May 5, 2023
2 parents 47ab86d + 019f10c commit 13853af
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ help:
$(VENV_PATH)/bin/pip install tox

dist: .venv
rm -rf dist dist-serverless build
rm -rf dist build
$(VENV_PATH)/bin/pip install wheel
$(VENV_PATH)/bin/python setup.py sdist bdist_wheel
.PHONY: dist
Expand Down
2 changes: 1 addition & 1 deletion scripts/aws-deploy-local-layer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ aws lambda publish-layer-version \
--region "eu-central-1" \
--zip-file "fileb://dist/$ZIP" \
--description "Local test build of SentryPythonServerlessSDK (can be deleted)" \
--compatible-runtimes python3.6 python3.7 python3.8 python3.9
--compatible-runtimes python3.6 python3.7 python3.8 python3.9 \
--no-cli-pager

echo "Done deploying zipped Lambda layer to AWS as 'SentryPythonServerlessSDK-local-dev'."
Expand Down
1 change: 1 addition & 0 deletions sentry_sdk/integrations/boto3.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def _sentry_request_created(service_id, request, operation_name, **kwargs):
span.set_data("aws.request.url", parsed_url.url)
span.set_data(SPANDATA.HTTP_QUERY, parsed_url.query)
span.set_data(SPANDATA.HTTP_FRAGMENT, parsed_url.fragment)
span.set_data(SPANDATA.HTTP_METHOD, request.method)

# We do it in order for subsequent http calls/retries be
# attached to this span.
Expand Down
4 changes: 2 additions & 2 deletions sentry_sdk/integrations/httpx.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def send(self, request, **kwargs):
op=OP.HTTP_CLIENT,
description="%s %s" % (request.method, parsed_url.url),
) as span:
span.set_data("method", request.method)
span.set_data(SPANDATA.HTTP_METHOD, request.method)
span.set_data("url", parsed_url.url)
span.set_data(SPANDATA.HTTP_QUERY, parsed_url.query)
span.set_data(SPANDATA.HTTP_FRAGMENT, parsed_url.fragment)
Expand Down Expand Up @@ -89,7 +89,7 @@ async def send(self, request, **kwargs):
op=OP.HTTP_CLIENT,
description="%s %s" % (request.method, parsed_url.url),
) as span:
span.set_data("method", request.method)
span.set_data(SPANDATA.HTTP_METHOD, request.method)
span.set_data("url", parsed_url.url)
span.set_data(SPANDATA.HTTP_QUERY, parsed_url.query)
span.set_data(SPANDATA.HTTP_FRAGMENT, parsed_url.fragment)
Expand Down
2 changes: 1 addition & 1 deletion sentry_sdk/integrations/stdlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def putrequest(self, method, url, *args, **kwargs):
description="%s %s" % (method, parsed_url.url),
)

span.set_data("method", method)
span.set_data(SPANDATA.HTTP_METHOD, method)
span.set_data("url", parsed_url.url)
span.set_data(SPANDATA.HTTP_QUERY, parsed_url.query)
span.set_data(SPANDATA.HTTP_FRAGMENT, parsed_url.fragment)
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def get_file_text(file_name):
'urllib3>=1.25.7; python_version<="3.4"',
'urllib3>=1.26.9; python_version=="3.5"',
'urllib3>=1.26.11; python_version >="3.6"',
'urllib3<2.0.0',
"certifi",
],
extras_require={
Expand Down
2 changes: 1 addition & 1 deletion tests/integrations/httpx/test_httpx.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def before_breadcrumb(crumb, hint):
assert crumb["category"] == "httplib"
assert crumb["data"] == {
"url": url,
"method": "GET",
SPANDATA.HTTP_METHOD: "GET",
SPANDATA.HTTP_FRAGMENT: "",
SPANDATA.HTTP_QUERY: "",
"status_code": 200,
Expand Down
2 changes: 1 addition & 1 deletion tests/integrations/requests/test_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def test_crumb_capture(sentry_init, capture_events):
assert crumb["category"] == "httplib"
assert crumb["data"] == {
"url": url,
"method": "GET",
SPANDATA.HTTP_METHOD: "GET",
SPANDATA.HTTP_FRAGMENT: "",
SPANDATA.HTTP_QUERY: "",
"status_code": response.status_code,
Expand Down
6 changes: 3 additions & 3 deletions tests/integrations/stdlib/test_httplib.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def test_crumb_capture(sentry_init, capture_events):
assert crumb["category"] == "httplib"
assert crumb["data"] == {
"url": url,
"method": "GET",
SPANDATA.HTTP_METHOD: "GET",
"status_code": 200,
"reason": "OK",
SPANDATA.HTTP_FRAGMENT: "",
Expand All @@ -75,7 +75,7 @@ def before_breadcrumb(crumb, hint):
assert crumb["category"] == "httplib"
assert crumb["data"] == {
"url": url,
"method": "GET",
SPANDATA.HTTP_METHOD: "GET",
"status_code": 200,
"reason": "OK",
"extra": "foo",
Expand Down Expand Up @@ -133,7 +133,7 @@ def test_httplib_misuse(sentry_init, capture_events, request):
assert crumb["category"] == "httplib"
assert crumb["data"] == {
"url": "http://localhost:{}/200".format(PORT),
"method": "GET",
SPANDATA.HTTP_METHOD: "GET",
"status_code": 200,
"reason": "OK",
SPANDATA.HTTP_FRAGMENT: "",
Expand Down

0 comments on commit 13853af

Please sign in to comment.