Skip to content

Commit 9748ef2

Browse files
committed
fix: Ensure apply_gevent_monkey_patch when webhook is active
Signed-off-by: Ferenc Géczi <[email protected]>
1 parent 8eec93f commit 9748ef2

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/instana/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import importlib
2121

2222
from .version import VERSION
23+
from instana.collector.helpers.runtime import is_autowrapt_instrumented, is_webhook_instrumented
2324

2425
__author__ = 'Instana Inc.'
2526
__copyright__ = 'Copyright 2020 Instana Inc.'
@@ -186,7 +187,7 @@ def boot_agent():
186187
else:
187188
# Automatic gevent monkey patching
188189
# unless auto instrumentation is off, then the customer should do manual gevent monkey patching
189-
if ("instana" in os.environ.get("AUTOWRAPT_BOOTSTRAP", "") and
190+
if ((is_autowrapt_instrumented() or is_webhook_instrumented()) and
190191
"INSTANA_DISABLE_AUTO_INSTR" not in os.environ and
191192
importlib.util.find_spec("gevent")):
192193
apply_gevent_monkey_patch()

src/instana/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33

44
# Module version file. Used by setup.py and snapshot reporting.
55

6-
VERSION = "2.5.0"
6+
VERSION = "2.5.1"

0 commit comments

Comments
 (0)