Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…emetry-python-contrib into flask_hooks
  • Loading branch information
NickSulistio committed Jun 1, 2021
2 parents b867ead + e941831 commit ddc10d7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ def _start_response(status, response_headers, *args, **kwargs):
"missing at _start_response(%s)",
status,
)
if response_hook:
response_hook(span, status, response_headers)
if response_hook is not None:
response_hook(span, status, response_headers)
return start_response(status, response_headers, *args, **kwargs)

return wsgi_app(wrapped_app_environ, _start_response)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,6 @@ def request_hook_test(span, environ):

def response_hook_test(span, environ, response_headers):
span.set_attribute("hook_attr", "hello world without app")
# environ.headers.set("apple", "cat")
response_headers.append(hook_headers)

FlaskInstrumentor().instrument(
Expand Down

0 comments on commit ddc10d7

Please sign in to comment.