We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 72e00b3 commit e95cdf1Copy full SHA for e95cdf1
ddtrace/contrib/gevent/provider.py
@@ -30,6 +30,7 @@ def activate(self, context):
30
current_g = gevent.getcurrent()
31
if current_g is not None:
32
setattr(current_g, self._CONTEXT_ATTR, context)
33
+ super(GeventContextProvider, self).activate(context)
34
return context
35
36
def active(self):
tests/contrib/gevent/test_provider.py
@@ -0,0 +1,15 @@
1
+from ddtrace.contrib.gevent import provider
2
+
3
4
+def test_call_hooks(tracer):
5
+ data = {}
6
7
+ def record(context):
8
+ if "trace" not in data:
9
+ data["trace"] = context
10
11
+ tracer.configure(context_provider=provider.GeventContextProvider())
12
+ tracer.context_provider._on_activate(record)
13
+ with tracer.trace("test123") as mytrace:
14
+ pass
15
+ assert data["trace"] is mytrace
0 commit comments