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

[FLASK] added request and response hook #416

Merged
merged 42 commits into from
Jun 1, 2021
Merged
Changes from 5 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
a0cdcc2
added request and response hook - may be very buggy
NickSulistio Apr 6, 2021
53ddfcd
Merge branch 'main' into flask_hooks
NickSulistio Apr 8, 2021
c0ab6a5
added req/resp hooks and tests
NickSulistio Apr 8, 2021
ddb3077
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
NickSulistio Apr 8, 2021
ea965d1
Merge branch 'flask_hooks' of https://github.com/nicksulistio/opentel…
NickSulistio Apr 8, 2021
74bc40c
Merge branch 'main' into flask_hooks
NickSulistio Apr 9, 2021
8a4f2a3
Update CHANGELOG.md
NickSulistio Apr 12, 2021
4721cdf
removed name callback
NickSulistio Apr 13, 2021
79d04fe
Merge branch 'main' into flask_hooks
NickSulistio Apr 13, 2021
f975067
Merge branch 'main' into flask_hooks
lzchen Apr 15, 2021
1605884
Merge branch 'main' into flask_hooks
NickSulistio Apr 16, 2021
7bffdba
added response header tests
NickSulistio May 24, 2021
84bbec1
Merge branch 'main' into flask_hooks
NickSulistio May 25, 2021
5eaeaf2
solved merge conflicts
NickSulistio May 25, 2021
42e9372
fixed more merge conflicts
NickSulistio May 25, 2021
dc63d37
fixed bug where tracer was being unused
NickSulistio May 25, 2021
738065c
Merge branch 'main' into flask_hooks
NickSulistio May 26, 2021
a520dfa
removed venv
NickSulistio May 26, 2021
a308044
Merge branch 'flask_hooks' of https://github.com/nicksulistio/opentel…
NickSulistio May 26, 2021
2757171
added if callable check
NickSulistio May 26, 2021
327905e
Merge branch 'main' into flask_hooks
lzchen May 26, 2021
6dd503c
Update instrumentation/opentelemetry-instrumentation-flask/src/opente…
NickSulistio May 27, 2021
2f2611e
removed useless comment
NickSulistio May 27, 2021
e941831
Merge branch 'main' into flask_hooks
lzchen Jun 1, 2021
34e7013
tried linting
NickSulistio Jun 1, 2021
5534ed1
Merge branch 'main' of https://github.com/open-telemetry/opentelemetr…
NickSulistio Jun 1, 2021
b867ead
linted and merged
NickSulistio Jun 1, 2021
ddc10d7
Merge branch 'flask_hooks' of https://github.com/nicksulistio/opentel…
NickSulistio Jun 1, 2021
cbc0995
linting and merge
NickSulistio Jun 1, 2021
d4eab75
removed venv
NickSulistio Jun 1, 2021
422d67d
removed venv
NickSulistio Jun 1, 2021
dafb554
Merge branch 'flask_hooks' of https://github.com/nicksulistio/opentel…
NickSulistio Jun 1, 2021
d25c675
Revert "linting and merge"
NickSulistio Jun 1, 2021
e91fb0b
Revert "Merge branch 'flask_hooks' of https://github.com/nicksulistio…
NickSulistio Jun 1, 2021
aa37da5
Revert "Revert "Merge branch 'flask_hooks' of https://github.com/nick…
NickSulistio Jun 1, 2021
7b017ec
Revert "Revert "linting and merge""
NickSulistio Jun 1, 2021
add1367
reverted
NickSulistio Jun 1, 2021
a8f353e
Revert "tried linting"
NickSulistio Jun 1, 2021
1aafe2b
Revert "tried linting"
NickSulistio Jun 1, 2021
e95313f
Merge branch 'flask_hooks' of https://github.com/nicksulistio/opentel…
NickSulistio Jun 1, 2021
ff10d2b
reverted to d4eab7503c
NickSulistio Jun 1, 2021
52cfe53
fixed generate
NickSulistio Jun 1, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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)
Original file line number Diff line number Diff line change
@@ -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(