-
-
Save Qard/8b652eb1379c140d2db0d7e6a7efe8ad to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/oboeware/middleware.py b/oboeware/middleware.py | |
index e3ac5d9..e10ab40 100644 | |
--- a/oboeware/middleware.py | |
+++ b/oboeware/middleware.py | |
@@ -125,15 +125,10 @@ class OboeMiddleware(object): | |
result = self.wrapped_app(environ, wrapped_start_response) | |
except Exception: | |
- if oboe.Context.get_default().is_valid(): | |
- endEvt.add_edge(oboe.Context.get_default()) | |
self.send_end(ctx, endEvt, environ, threw_error=True) | |
raise | |
# check current TLS context and add to end event if valid | |
- if oboe.Context.get_default().is_valid(): | |
- endEvt.add_edge(oboe.Context.get_default()) | |
- | |
self.send_end(ctx, endEvt, environ, stats=stats) | |
return result | |
@@ -143,6 +138,10 @@ class OboeMiddleware(object): | |
if not ctx.is_valid(): | |
return | |
+ def_ctx = oboe.Context.get_default() | |
+ if def_ctx.is_valid(): | |
+ evt.add_edge(def_ctx) | |
+ | |
evt.add_edge(ctx) | |
if stats: | |
evt.add_info("Profile", stats) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment