Skip to content

Commit

Permalink
Merge pull request #114 from Yelp/post_handler_hook_zipkin_span
Browse files Browse the repository at this point in the history
add zipkin_span_context argument to post_handker_hook
  • Loading branch information
acer618 authored Oct 28, 2021
2 parents f8d1916 + 584fb8c commit 9b3bdae
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
1.0.0 (2021-10-27)
-------------------
- The post_handler_hook api is changed to pass the zipkin_span context
so users can add more content to the span during post processing

0.27.0 (2020-04-07)
-------------------
- Change tween ordering to be close to INGRESS rather than EXCVIEW
Expand Down
2 changes: 1 addition & 1 deletion pyramid_zipkin/tween.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def tween(request):
)

if zipkin_settings.post_handler_hook:
zipkin_settings.post_handler_hook(request, response)
zipkin_settings.post_handler_hook(request, response, zipkin_context)

return response

Expand Down
1 change: 1 addition & 0 deletions tests/tween_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def test_zipkin_tween_post_handler_hook(
mock_post_handler_hook.assert_called_once_with(
dummy_request,
dummy_response,
mock_span.return_value.__enter__.return_value,
)


Expand Down

0 comments on commit 9b3bdae

Please sign in to comment.